Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/site-packages/Cython/Build/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/site-packages/Cython/Build/__pycache__/Cythonize.cpython-35.pyc



���^~�@sEddlmZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
y&ddlZeej�d	�ZWnek
r�dZdZYnXGd
d�de�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zddd�ZedkrAe�dS)�)�absolute_importN)�setup�)�	cythonize�extended_iglob�)�is_package_dir)�Optionsg�?c@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�	_FakePoolcCs.ddlm}x|||�D]}q WdS)Nr)�imap)�	itertoolsr)�self�func�argsr�_�r�I/opt/alt/python35/lib64/python3.5/site-packages/Cython/Build/Cythonize.py�	map_asyncsz_FakePool.map_asynccCsdS)Nr)r
rrr�closesz_FakePool.closecCsdS)Nr)r
rrr�	terminatesz_FakePool.terminatecCsdS)Nr)r
rrr�joinsz_FakePool.joinN)�__name__�
__module__�__qualname__rrrrrrrrr
sr
cCs\|j}tt|j|tj���}tj|ddd|�}t|j||�dS)NZrelaxed_boolTZcurrent_settings)�dest�dict�getattr�valuesr	�get_directive_defaultsZparse_directive_list�setattr)�option�name�value�parserrZold_directives�
directivesrrr�parse_directives s	r%c	Cs�|j}tt|j|i��}xg|jd�D]V}d|krs|jdd�\}}|j�d	k}n
|d}}|||<q4Wt|j||�dS)
N�,�=r�false�f�0�noT)r(r)r*r+)rrrr�split�lowerr)	r r!r"r#r�options�opt�n�vrrr�
parse_options)s	
r2cCsrtjj|�\}}xMtjjtjj|d��rgtjj|�\}}d||f}qW||fS)Nz__init__.pyz%s/%s)�os�pathr,�isfiler)r4�base_dirZpackage_path�parentrrr�find_package_base6s
$r8cs�d}ttjjt|��}y�x�|D]}}|jr{|�x>tjj��sbt��rwtjj���qCWnd�tjj|�r�tjj	|dd�g}n	|g}t
|d|jd|jd|j
d|jd|jd|j|j�}|r+|jr+t|�d	kr�|jd	kr�|dkrrytj|j�}Wntk
rqt�}YnX|jt�fd
d�|D��q+t�|f�q+WWn!|dk	r�|j��Yn!X|dk	r�|j�|j	�dS)Nz**z
*.{py,pyx}�nthreadsZexclude_failures�exclude�compiler_directives�force�quietrcsg|]}�|gf�qSrr)�.0�ext)r6rr�
<listcomp>cs	z"cython_compile.<locals>.<listcomp>)�mapr3r4�abspathr�
build_inplace�isdirr�dirnamerr�parallel�
keep_going�excludesr$r<r=r.�build�len�multiprocessingZPool�OSErrorr
r�
run_distutilsrr)Zpath_patternr.�poolZ	all_pathsr4�paths�ext_modulesr)r6r�cython_compile>sL
	"						!
	

rQc
Cs�|\}}ddg}tj�}d}zU|retj|�tjd|�}|jd|g�tddd|d|�Wd|r�tj|�|r�tjj|�r�t	j
|�XdS)	N�	build_extz-i�dirz--build-temp�script_namezsetup.py�script_argsrP)r3�getcwd�chdir�tempfile�mkdtemp�extendrr4rD�shutil�rmtree)rr6rPrU�cwdZtemp_dirrrrrMps"

rMcCsrddlm}|dd�}|jddddd	d
dtdd
d
tdidd�|jddddd	ddtdd
d
tdidd�|jdd	ddddd�|jddd	ddddd�|jdddd d	d!dd"dgdd#�|jd$d%d	d&dddd'�|jd(d)d	d*dddd+�|jd,d-d	d.dd/dtdtdd0tpzd1�|jd2d3d	d4dddd5�|jd6d7d	d8dddd9�|jd:d	d;dddd<�|jd=d>d	d?dddd@�|j|�\}}|s+|j	dA�|j
r=dB|_tdkrRd|_
|jrhdC|jdD<||fS)ENr)�OptionParser�usagez'%prog [options] [sources and packages]+z-Xz--directive�metavarzNAME=VALUE,...rr$�type�action�callback�default�helpzset a compiler directivez-sz--optionz
NAME=VALUEr.zset a cythonize optionz-3�python3_mode�
store_truez#use Python 3 syntax mode by defaultz-az
--annotate�annotatez-generate annotated HTML page for source filesz-xz	--exclude�PATTERNrH�appendz2exclude certain file patterns from the compilationz-bz--buildrIz'build extension modules using distutilsz-iz	--inplacerCz=build extension modules in place using distutils (implies -b)z-jz
--parallelrF�Nz+run builds in N parallel jobs (default: %d)rz-fz--forcer<zforce recompilationz-qz--quietr=z"be less verbose during compilationz	--lenient�lenientzBincrease Python compatibility by ignoring some compile time errorsz-kz--keep-goingrGz8compile as much as possible, ignore compilation failureszno source files providedT�Zlanguage_level)�optparser^�
add_option�strr%r2�int�parallel_compiles�
parse_args�errorrCrIrKrFrfr.)rr^r#r.rrrrs�sR
				
rscCsat|�\}}|jr-dt_dt_|jr?dt_x|D]}t||�qFWdS)NFT)rsrlr	Zerror_on_unknown_namesZerror_on_uninitializedrhrQ)rr.rOr4rrr�main�s					
ru�__main__)�
__future__rr3r[rX�distutils.corerZDependenciesrrZUtilsrZCompilerr	rKrq�	cpu_countrr�ImportError�objectr
r%r2r8rQrMrsrurrrrr�<module>s.
	
21