ok

Mini Shell

Direktori : /opt/alt/python35/lib64/python3.5/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/distutils/command/__pycache__/build_clib.cpython-35.pyc



M�MaV�@srdZddlZddlmZddlTddlmZddlmZdd�Z	Gd	d
�d
e�Z
dS)z�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�A/opt/alt/python35/lib64/python3.5/distutils/command/build_clib.pyrsrc@s�eZdZdZd"d#d$d%d&gZddgZdddefgZdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d d!�ZdS)'�
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�f�2forcibly build everything (ignore file timestamps)�	compiler=�c�specify the compiler typez
help-compilerNzlist available compilerscCsUd|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r
�
build_temp�	libraries�include_dirs�define�undefrr�compiler)�selfrrr	�initialize_options4s								zbuild_clib.initialize_optionscCs�|jdddd	d
d�|jj|_|jrD|j|j�|jdkrh|jjpbg|_t|jt�r�|jjtj	�|_dS)NZbuildrr
rrr)rr
)rr)rr)rr)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathsep)r rrr	�finalize_optionsDs		zbuild_clib.finalize_optionscCs�|js
dSddlm}|d|jd|jd|j�|_t|j�|jdk	rs|jj|j�|j	dk	r�x*|j	D]\}}|jj
||�q�W|jdk	r�x!|jD]}|jj|�q�W|j
|j�dS)Nr)�new_compilerr�dry_runr)rrr)rr*rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)r r)�name�valueZmacrorrr	�run^s 		
zbuild_clib.runcCs�t|t�std��x�|D]�}t|t�rVt|�dkrVtd��|\}}t|t�s}td��d|ks�tjdkr�tj|kr�td|d��t|t�s"td��q"Wd	S)
a`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z+'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 separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r#�list�DistutilsSetupError�tuple�lenr$r&�sep�dict)r r�libr,�
build_inforrr	r"vs"
	
"		*zbuild_clib.check_library_listcCs>|js
dSg}x$|jD]\}}|j|�qW|S)N)r�append)r Z	lib_names�lib_namer8rrr	�get_library_names�s	zbuild_clib.get_library_namescCs�|j|j�g}xe|jD]Z\}}|jd�}|dks]t|ttf�rmtd|��|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#r1r3r2�extend)r �	filenamesr:r8r<rrr	�get_source_files�s"
zbuild_clib.get_source_filescCs�x�|D]�\}}|jd�}|dksDt|ttf�rTtd|��t|�}tjd|�|jd�}|jd�}|jj|d|j	d|d|d|j
�}|jj||d|jd|j
�qWdS)Nr<zfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' library�macrosrZ
output_dirr)
r=r#r1r3r2r�infor�compilerrZcreate_static_libr
)r rr:r8r<rArZobjectsrrr	r+�s$"
		zbuild_clib.build_libraries)rrr
)rrr)rrr)rrr)rrr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrZhelp_optionsr!r(r.r"r;r@r+rrrr	r
s*	$r
)�__doc__r&Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrr
rrrr	�<module>s


Zerion Mini Shell 1.0