£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

]V                 @   sl   d  d l  Z  d  d l m Z d  d l Td  d l m Z d  d l m Z d d   Z Gd d	   d	 e  Z	 d S)
    N)Command)*)customize_compiler)logc              C   s   d d l  m }  |    d  S)Nr   )show_compilers)distutils.ccompilerr   )r    r   //opt/alt/python35/lib64/python3.5/build_clib.pyr      s    r   c               @   s   e  Z d  Z d Z d" d# d$ d% d& g Z d d g Z d d d e f g Z d d   Z d d   Z	 d d   Z
 d d   Z d d   Z d d   Z d  d!   Z d S)'
build_clibz/build C/C++ libraries used by Python extensionsbuild-clib=b%directory to build C/C++ libraries tobuild-temp=t,directory to put temporary build by-productsdebugg"compile with debugging informationforcef2forcibly build everything (ignore file timestamps)	compiler=cspecify the compiler typezhelp-compilerNzlist available compilersc             C   sU   d  |  _  d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d |  _ d  |  _ d  S)Nr   )	r
   
build_temp	librariesinclude_dirsdefineundefr   r   compiler)selfr   r   r	   initialize_options4   s    								zbuild_clib.initialize_optionsc             C   s   |  j  d d d d	 d
 d  |  j j |  _ |  j rD |  j |  j  |  j d  k rh |  j j pb g  |  _ t |  j t  r |  j j t j	  |  _ d  S)NZbuildr   r
   r   r   r   )r   r
   )r   r   )r   r   )r   r   )r   r   )
Zset_undefined_optionsZdistributionr   check_library_listr   
isinstancestrsplitospathsep)r    r   r   r	   finalize_optionsD   s    		zbuild_clib.finalize_optionsc             C   s   |  j  s d  Sd d l m } | d |  j d |  j d |  j  |  _ t |  j  |  j d  k	 rs |  j j |  j  |  j	 d  k	 r x* |  j	 D] \ } } |  j j
 | |  q W|  j d  k	 r x! |  j D] } |  j j |  q W|  j |  j   d  S)Nr   )new_compilerr   dry_runr   )r   r   r)   r   r*   r   r   r   Zset_include_dirsr   Zdefine_macror   Zundefine_macrobuild_libraries)r    r)   namevalueZmacror   r   r	   run^   s     		zbuild_clib.runc             C   s   t  | t  s t d   x | D] } t  | t  rV t |  d k rV t d   | \ } } t  | t  s} t d   d | k s t j d k r t j | k r t d | d   t  | t  s" t d   q" Wd  S)	Nz+'libraries' option must be a list of tuples   z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)/z;bad library name '%s': may not contain directory separatorsr   zMsecond element of each tuple in 'libraries' must be a dictionary (build info))	r#   listDistutilsSetupErrortuplelenr$   r&   sepdict)r    r   libr,   
build_infor   r   r	   r"   v   s"    
	"		*zbuild_clib.check_library_listc             C   s>   |  j  s d  Sg  } x$ |  j  D] \ } } | j |  q W| S)N)r   append)r    Z	lib_nameslib_namer8   r   r   r	   get_library_names   s    	zbuild_clib.get_library_namesc             C   s   |  j  |  j  g  } xe |  j D]Z \ } } | j d  } | d  k s] t | t t f  rm t d |   | j |  q  W| S)Nsourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)r"   r   getr#   r1   r3   r2   extend)r    	filenamesr:   r8   r<   r   r   r	   get_source_files   s    "
zbuild_clib.get_source_filesc             C   s   x | D] \ } } | j  d  } | d  k sD t | t t f  rT t d |   t |  } t j d |  | j  d  } | j  d  } |  j j | d |  j	 d | d | d |  j
 } |  j j | | d |  j d |  j
 q Wd  S)Nr<   zfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' librarymacrosr   Z
output_dirr   )r=   r#   r1   r3   r2   r   infor   compiler   r   Zcreate_static_libr
   )r    r   r:   r8   r<   rA   r   Zobjectsr   r   r	   r+      s$    "
		zbuild_clib.build_libraries)r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   r   r   )__name__
__module____qualname__descriptionZuser_optionsZboolean_optionsr   Zhelp_optionsr!   r(   r.   r"   r;   r@   r+   r   r   r   r	   r
      s*        	$r
   )
r&   Zdistutils.corer   Zdistutils.errorsZdistutils.sysconfigr   Z	distutilsr   r   r
   r   r   r   r	   <module>   s   
