Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/Cython/Build/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/Cython/Build/__pycache__/Cythonize.cpython-37.pyc

B

��Fd~�@s�ddlmZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
yddlZee��d	�ZWnek
r�dZdZYnXGd
d�de�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zddd�Zedkr�e�dS)�)�absolute_importN)�setup�)�	cythonize�extended_iglob�)�is_package_dir)�Optionsg�?c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�	_FakePoolcCs$ddlm}x|||�D]}qWdS)Nr)�imap)�	itertoolsr)�self�func�argsr�_�r�I/opt/alt/python37/lib64/python3.7/site-packages/Cython/Build/Cythonize.py�	map_asyncsz_FakePool.map_asynccCsdS)Nr)r
rrr�close�z_FakePool.closecCsdS)Nr)r
rrr�	terminaterz_FakePool.terminatecCsdS)Nr)r
rrr�joinrz_FakePool.joinN)�__name__�
__module__�__qualname__rrrrrrrrr
sr
cCs>|j}tt|j|t����}tj|d|d�}t|j||�dS)NT)Zrelaxed_boolZcurrent_settings)�dest�dict�getattr�valuesr	�get_directive_defaultsZparse_directive_list�setattr)�option�name�value�parserrZold_directives�
directivesrrr�parse_directives s
r&c	Csv|j}tt|j|i��}xJ|�d�D]<}d|krN|�dd�\}}|��dk}n
|d}}|||<q$Wt|j||�dS)N�,�=r)�false�f�0�noT)rrrr�split�lowerr )	r!r"r#r$r�options�opt�n�vrrr�
parse_options)s
r3cCsPtj�|�\}}x6tj�tj�|d��rFtj�|�\}}d||f}qW||fS)Nz__init__.pyz%s/%s)�os�pathr-�isfiler)r5�base_dirZpackage_path�parentrrr�find_package_base6s
r9c
szd}ttjjt|��}�y"�x|D�]}|jrZ|�x*tj���rHt��rVtj����q4Wnd�tj�|�r~tj�	|dd�g}n|g}t
|f|j|j|j
|j|j|jd�|j��}|r"|jr"t|�dk�r(|jdk�r(|dk�ryt�|j�}Wntk
�r
t�}YnX|�t�fdd�|D��q"t�|f�q"WWn |dk	�rT|���YnX|dk	�rv|��|�	�dS)Nz**z
*.{py,pyx})�nthreadsZexclude_failures�exclude�compiler_directives�force�quietrcsg|]}�|gf�qSrr)�.0�ext)r7rr�
<listcomp>csz"cython_compile.<locals>.<listcomp>)�mapr4r5�abspathr�
build_inplace�isdirr�dirnamerr�parallel�
keep_going�excludesr%r=r>r/�build�len�multiprocessingZPool�OSErrorr
r�
run_distutilsrr)Zpath_patternr/�poolZ	all_pathsr5�paths�ext_modulesr)r7r�cython_compile>sL




rRc	Cs�|\}}ddg}t��}d}z:|rFt�|�tj|d�}|�d|g�td||d�Wd|r�t�|�|r�tj�|�r�t	�
|�XdS)N�	build_extz-i)�dirz--build-tempzsetup.py)�script_name�script_argsrQ)r4�getcwd�chdir�tempfile�mkdtemp�extendrr5rE�shutil�rmtree)rr7rQrV�cwdZtemp_dirrrrrNps"

rNcCsxddlm}|dd�}|jddddtd	tid
d�	|jdd
ddtd	tidd�	|jddddd�|jdddddd�|jdddddgdd �|jd!d"d#dd$d�|jd%d&d'dd(d�|jd)d*d+d,ttd-tp�d.d/�|jd0d1d2dd3d�|jd4d5d6dd7d�|jd8d9dd:d�|jd;d<d=dd>d�|�|�\}}|�s@|�	d?�|j
�rNd@|_tdk�r^d|_
|j�rpdA|jdB<||fS)CNr)�OptionParserz'%prog [options] [sources and packages]+)�usagez-Xz--directivezNAME=VALUE,...r%�callbackzset a compiler directive)�metavarr�type�actionra�default�helpz-sz--optionz
NAME=VALUEr/zset a cythonize optionz-3�python3_mode�
store_truez#use Python 3 syntax mode by default)rrdrfz-az
--annotate�annotatez-generate annotated HTML page for source filesz-xz	--excludeZPATTERNrI�appendz2exclude certain file patterns from the compilation)rbrrdrerfz-bz--buildrJz'build extension modules using distutilsz-iz	--inplacerDz=build extension modules in place using distutils (implies -b)z-jz
--parallelrG�Nz+run builds in N parallel jobs (default: %d)r)rrbrcrerfz-fz--forcer=zforce recompilationz-qz--quietr>z"be less verbose during compilationz	--lenient�lenientzBincrease Python compatibility by ignoring some compile time errorsz-kz--keep-goingrHz8compile as much as possible, ignore compilation failureszno source files providedT�Zlanguage_level)�optparser_�
add_option�strr&r3�int�parallel_compiles�
parse_args�errorrDrJrLrGrgr/)rr_r$r/rrrrs�sR





rscCsFt|�\}}|jrdt_dt_|jr*dt_x|D]}t||�q0WdS)NFT)rsrlr	Zerror_on_unknown_namesZerror_on_uninitializedrirR)rr/rPr5rrr�main�s
ru�__main__)N)�
__future__rr4r\rY�distutils.corerZDependenciesrrZUtilsrZCompilerr	rLrq�	cpu_countrr�ImportError�objectr
r&r3r9rRrNrsrurrrrr�<module>s.
	
21