%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyo

�
�9Zc@`s�dZddlmZmZmZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZddlmZddlmZmZddlmZdd	lmZmZmZmZmZdd
lmZdd
lmZ d�Z!dejfd
��YZ"ej#dej$�j%Z&ej#dej$�j%Z'ej#dej$�j%Z(ej#dej$�j)Z*ej#dej$�j)Z+d�Z,d�Z-d�Z.ej#dej$�j%Z/ej#dej$�j%Z0d�Z1dS(s Build swig and f2py sources.
i(tdivisiontabsolute_importtprint_functionN(t	build_ext(tnewer_grouptnewer(tget_platform(tDistutilsErrortDistutilsSetupError(tlog(tfortran_ext_matcht
appendpatht	is_stringtis_sequencetget_cmd(tprocess_filecC`s�tjd�}t|d�}z�t|d�}zmxf|D]^}|j|�}|r�|j|jd|jd�||jd���q:|j|�q:WWd|j�XWd|j�XdS(sOSubstitute any occurence of @foo@ by d['foo'] from source file into
    target.s@([a-zA-Z_]+)@trtws@%s@iN(tretcompiletopentsearchtwritetreplacetgrouptclose(ttargettsourcetdtvartfstfttltm((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyt
subst_varss
6t	build_srccB`s�eZdZd*d,d-d.d/d0d1d2ddddfg	ZddgZgZd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd �Zd!�Zd"�Zd#�Zgd$�Zd%�Zd&�Zd'�Zd(�Zd)�ZRS(3s1build sources from SWIG, F2PY files or a functions
build-src=Rsdirectory to "build" sources tos
f2py-opts=s!list of f2py command line optionssswig=spath to the SWIG executables
swig-opts=s!list of SWIG command line optionssswig-cppsAmake SWIG create C++ files (default is autodetected from sources)s
f2pyflags=s3additional flags to f2py (use --f2py-opts= instead)s
swigflags=s3additional flags to swig (use --swig-opts= instead)tforcetfs2forcibly build everything (ignore file timestamps)tinplacetis=ignore build-lib and put compiled extensions into the source s,directory alongside your pure Python modulescC`s�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_dS(N(tNonet
extensionstpackaget
py_modulestpy_modules_dictR#t	build_libt
build_baseR$R&tpackage_dirt	f2pyflagst	f2py_optst	swigflagst	swig_optstswig_cpptswig(tself((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pytinitialize_optionsCs 															cC`s�|jdddd�|jdkr7|jj|_n|jj|_|jjpUg|_|jjpjg|_|jj	pg|_	|j
dkr�dt�tj
dd!f}tjj|jd|�|_
ni|_|jr|jr�tjd	�n|j|_d|_n|jdkr1g|_ntj|j�|_|jr�|jrhtjd
�n|j|_d|_n|jdkr�g|_ntj|j�|_|jd�}|jdkr�|j|_n|jdkr�|j|_nx�dd
gD]�}d|jdd�}t||d�}|rt||�r_tjd|�q�tj d||f�t!|||�qqWdS(NtbuildR.R-R$s.%s-%siitsrcs0ignoring --f2pyflags as --f2py-opts already useds0ignoring --swigflags as --swig-opts already usedRR5tswig_opts--t_t-s-both build_src and build_ext define %s options+using "%s=%s" option from build_ext command(R.R.(R-R-(R$R$("tset_undefined_optionsR*R(tdistributiontext_packagetext_modulesR)t	librariesR+t
data_filesR#RtsystversiontostpathtjoinR.R,R0R1R	twarntshlextsplitR2R3tget_finalized_commandR&R4Rtgetattrtinfotsetattr(R6tplat_specifierRtctotv((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pytfinalize_optionsUsV	"					cC`s1tjd�|jp|js#dS|j�dS(NR#(R	RMR)RAt
build_sources(R6((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pytrun�s
cC`s�|jr!|jd�j|_n|j�x|jD]}|j|�q5W|jr�|j|j�x!|jD]}|j|�qoWn|j	�|j
�dS(Ntbuild_py(R&RKtget_package_dirtbuild_py_modules_sourcesRAtbuild_library_sourcesR)tcheck_extensions_listtbuild_extension_sourcestbuild_data_files_sourcestbuild_npy_pkg_config(R6tlibname_infotext((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyRT�s	
	
cC`s�|js
dStjd�ddlm}g}x�|jD]�}t|t�r_|j|�q:t|t�r�|\}}|j	r�|j
dj|jt
j���}nt
jj|j|�}g|D]}t|d�r�|^q�}g|D]}t|d�s�|^q�}x�|D]�}|jjdkr@||�}	n	|�}	|	dk	rt|	t�rt|j|	�q�t|	t�r�|j|	�q�tt|	���qqW|||f�}
|j||
f�q:tt|���q:W||j(dS(Nsbuilding data_files sourcesi(tget_data_filest.t__call__i(RBR	RMtnumpy.distutils.misc_utilR`t
isinstancetstrtappendttupleR&RWRGRJREtsepRFR#thasattrt__code__tco_argcountR(tlisttextendt	TypeErrortrepr(R6R`tnew_data_filestdataRtfilest	build_dirR%tfuncstst	filenames((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR\�s:	
	'((
	cC`sddl}|\}}}tjj|�}x$|j�D]\}}	|	||<q:W|jdkr{tjj||�}
ntjj|j||�}
tjjtjj	|�d�}tjj|
|�}tjj
|
�s�tj|
�nt|||�tjj||�}
|
|fS(Nii(
tshutilRERFtdirnametitemsR&RGR#tbasenametsplitexttexiststmakedirsR"(R6RMtgdRwttemplatetinstall_dirt
subst_dictttemplate_dirtkRRt
generated_dirt	generatedtgenerated_pathtfull_install_dir((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyt_build_npy_pkg_config�s 	"c
C`s<tjd�tjtd��}|jdks>|j�nt}i}|jdkrhd}t}n!t	|d�r�|j
}t}n|r8x�|jjj
�D]�\}}|jj|}tjjtjj|�|�}i|d6}	xB|D]:}
|j|
|	�\}}|jjj||gf�q�Wq�WndS(Ns(build_src: building npy-pkg config filestinstalliRatinstall_libbasetprefix(R	RMtcopyRt	finalizedRStFalseR&tTrueRiR�R>tinstalled_pkg_configRyR/RERFRGtabspathR�RBRf(
R6tinstall_cmdt
build_npkgR~t
top_prefixtpkgtinfostpkg_pathR�RRMR�R�((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR]�s*

			!

cC`sT|js
dStjd�g}x#|jD]}t|�r5t|�dkr5|\}}}|jrx|j|�}n-tjj	|j
tjj	|jd���}t|d�r�tjj	||d�}||�}n|dkr�q*n|||fg}||jkrg|j|<n|j|c|7<q*|j|�q*W||j(dS(Nsbuilding py_modules sourcesiRaRbs.py(R+R	RMR
tlenR&RWRERFRGR#RJRiR(R,Rf(R6tnew_py_modulesRR*tmodule_baseRsRtmodules((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyRXs,	
	cC`s�t|jdg��}|s"dStjd|�|j|||f�}|j|||f�}|j|�\}}|r�tjd|j|�n||d<dS(Ntsourcessbuilding library "%s" sourcess#%s - nothing done with h_files = %s(RltgetR	RMtgenerate_sourcesttemplate_sourcestfilter_h_filesR*(R6tlib_namet
build_infoR�th_files((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyRYs	
cC`s�t|j�}tjd|j�|j|j�}|jd�}dj|dd!�}|jrx|j	|�|_
n|j||�}|j||�}|j
||�}|j||�}|j||�}|j|�\}}||jkrg|j|<ng}xF|D]>}tjjtjj|��d}	|j||	|f�qW|j|c|7<|j|�\}}
|
r�tjd||
�n||_dS(Nsbuilding extension "%s" sourcesRaii����s#%s - nothing done with h_files = %s(RlR�R	RMtnametget_ext_fullnameRJRGR&RWtext_target_dirR�R�tswig_sourcestf2py_sourcest
pyrex_sourcestfilter_py_filesR,RERFR{RzRfR�(R6R_R�tfullnametmodpathR*tpy_filesR�R%tmoduleR�((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR[5s2	
"	
c
C`s^g}g}x7|D]/}t|�r5|j|�q|j|�qW|sP|S|jrrt|�rr|j}nKt|�r�|d}n	|j}tjj|j	g|j
d�d �}|j|�x�|D]�}|||�}|s�q�nt|�r5g|D]}	tj
d|	f�^q|j|�q�tj
d|f�|j|�q�W|S(NiRai����s  adding '%s' to sources.(RRfR&R
R�R�RERFRGR#RJtmkpathR	RMRm(
R6R�t	extensiontnew_sourcestfunc_sourcesRRsR�tfuncRu((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR�]s4

	

'cC`s|j|dg�S(Ns.py(tfilter_files(R6R�((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��scC`s|j|dddg�S(Ns.hs.hpps.inc(R�(R6R�((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��scC`shg}g}xO|D]G}tjj|�\}}||krM|j|�q|j|�qW||fS(N(RERFR{Rf(R6R�textsR�RrRtbaseR_((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s
cC`s�g}t|�r;|djd�}|djd�}n|j}|j}x�|D]�}tjj|�\}}|dkr�|jr�tjj|�}	nt	|j
tjj|��}	|j|	�tjj|	tjj
|��}
|jst|g||
�ryt|�r3tjd|
�t|�}ntjd|
�t|�}t|
d�}|j|�|j�nt|
�r�tjj|
�}
|
|kr�tjd|
�|j|
�q�n|j|
�qT|j|�qTW|S(	Nitdependstinclude_dirss.srcsfrom_template:> %ssconv_template:> %sRs  adding '%s' to include_dirs.(R
R�R�R�RERFR{R&RxRR#R�RGRzR$Rt_f_pyf_ext_matchR	RMtprocess_f_filetprocess_c_fileRRRt_header_ext_matchRf(R6R�R�R�R�R�RR�R_t
target_dirttarget_filetoutstrtfidR((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s>		
	
!

c	C`s�g}|jjd�d}xg|D]_}tjj|�\}}|dkru|j||||�}|j|�q#|j|�q#W|S(s@Pyrex not supported; this remains for Cython support (see below)Rai����s.pyx(R�RJRERFR{tgenerate_a_pyrex_sourceRf(	R6R�R�R�text_nameRR�R_R�((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s
	cC`sgS(s�Pyrex is not supported, but some projects monkeypatch this method.

        That allows compiling Cython code, see gh-6955.
        This method will remain here for compatibility reasons.
        ((R6R�R�RR�((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��scC`s�g}g}g}i}g}|jjd�d}d}	x�|D]�}
tjj|
�\}}|dkr|jr�tjj|�}
nt|jtjj|��}
tjj	|
�r	t
|
�}||kr�td|
||f��ntjj|
|d�}n�t
jd|
�|}d}	tjj|
|d�}tjj	|�s�t
jd	||f�tjj|�}
tjj|
|d�}tjj	|�s�td
|f��nt
jd|�n|j|
�|j|
�|||
<|j|�qAt|�r|j|
�qA|j|
�qAW|p9|s@|Sx|D]}|j|�qGW|j|j}|jjr�xH|jjD]7\}}||jkr�|j|jdg��q�q�Wnt
jd
|�|r�t|�dkrtd|f��n|d}
||
}tjj|�p-d}
|
g|j}|js[t||d�r�|	r�t
jd|
�ddl}|jj |d|
|
g�q�t
jd|
�n	t!|�r�|d}n	|j}tjj|jg|jd�d �}
tjj|
|d�}|j|�||j}|jsLt||d�r�|	r�t
jd|�|j|
�ddl}|jj |dd|
gd|g|�nt
jd|�tjj	|�s�t"d|f��ntjj|jd�}tjj|jd�}t
jd|�|j|�|j|j#krnt
jd|j�|j#j|j�n|	s%ddl}tjj|jj$�}tjj|dd�}tjj|dd�}t%||�s�t%||�ru|jtjj|��|j&||�|j&||�qunPtjj	|�sMtd|f��ntjj	|�sutd|f��nx`dd gD]R}tjj|
||�}tjj	|�r�t
jd|�|j|�q�q�W||S(!NRai����is.pyfs;mismatch of extension names: %s provides %r but expected %rsmodule.cs.  source %s does not exist: skipping f2py'ing.isd  target %s does not exist:
   Assuming %smodule.c was generated with "build_src --inplace" command.s
%r missings&   Yes! Using %r as up-to-date target.tf2py_optionssf2py options: %ssConly one .pyf file is allowed per extension module but got more: %rRsf2py: %ss--build-dirs+  skipping '%s' f2py interface (up-to-date)s	f2py:> %ss--lowers-ms3  skipping f2py fortran files for '%s' (up-to-date)s!f2py target file %r not generatedsfortranobject.csfortranobject.hs  adding '%s' to sources.s  adding '%s' to include_dirs.R9sf2py target_c file %r not foundsf2py target_h file %r not founds-f2pywrappers.fs-f2pywrappers2.f90('R�RJRERFR{R&RxRR#tisfiletget_f2py_modulenameRRGR	tdebugRHRMRfR
R�R�R1R>RARmR�R�R�R$Rt
numpy.f2pytf2pytrun_mainR
RR�t__file__Rt	copy_file(R6R�R�R�R�t	f_sourcestf2py_targetsttarget_dirsR�t	skip_f2pyRR�R_R�R�R�RR�R�R�tnumpyttarget_cttarget_htsource_ctsource_htname_exttfilename((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s�
				



#


	


	%	
	cC`s�g}g}i}g}g}d}d|jkrRd}	t}
|jjd�n$|jrjd}	t}
nd}	t}
d}|jjd�d}x�|D]�}
tj	j
|
�\}}|dkrP|jr�tj	j|�}|j
}n$t|jtj	j|��}|}tj	j|
�rBt|
�}||dkr\td	|
||df��n|	dkr�t|
�}	|	dk}
n�t|
�}|dkr�tjd
|
|	f�n\|	|krtjd|	|
|f�|dkr�tjd�t}
qtjd
|
�n|
r d}ntj	j|d||f�}n�tjd|
�|d}d}t||�}tj	j|�s�tjd||f�tj	j|�}t||�}tj	j|�s�td|f��ntjd|�n|j|�|j|�|jtj	j||d��|j|
�|d||
<q�|j|
�q�W|sk|S|ry||Sx|D]}|j|�q�W|jp�|j�}|dg|j}|
r�|jd�nx"|jD]}|jd|�q�Wx�|D]�}
||
}|
g|j}|js<t||d�r�tj dtj	j!|�|
r`dpcd|
f�|j"||jd|d||
g�qtj#d|
�qW||S(Ns.cs-c++sc++iRai����s.iis;mismatch of extension names: %s provides %r but expected %rs>source %r does not define swig target, assuming %s swig targets0expected %r but source %r defines %r swig targetsAresetting swig target to c++ (some targets may have .c extension)s$assuming that %r has c++ swig targets.cpps	%s_wrap%ss.  source %s does not exist: skipping swig'ing.si  target %s does not exist:
   Assuming %s_wrap.{c,cpp} was generated with "build_src --inplace" command.s
%r missings&   Yes! Using %r as up-to-date target.s.pys-pythons-IRs%s: %ss++ts-os-outdirs+  skipping '%s' swig interface (up-to-date)($R3R�tremoveR4R(R�R�RJRERFR{R&RxR�RR#R�tget_swig_modulenameRtget_swig_targetR	RHRGt_find_swig_targetRfR�R5t	find_swigR�R�R$RRMRztspawnR�(R6R�R�R�R�tswig_targetsR�R�t
target_extttyptis_cppt	skip_swigR�RR�R_R�t
py_target_dirR�ttyp2R�RR5tswig_cmdRR�((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR�[s�		
			
			
		

 



$	(s
build-src=Rsdirectory to "build" sources toN(s
f2py-opts=Ns!list of f2py command line options(sswig=Nspath to the SWIG executable(s
swig-opts=Ns!list of SWIG command line options(sswig-cppNsAmake SWIG create C++ files (default is autodetected from sources)(s
f2pyflags=Ns3additional flags to f2py (use --f2py-opts= instead)(s
swigflags=Ns3additional flags to swig (use --swig-opts= instead)(R$R%s2forcibly build everything (ignore file timestamps)(t__name__t
__module__tdescriptionR(tuser_optionstboolean_optionsthelp_optionsR7RSRURTR\R�R]RXRYR[R�R�R�R�R�R�R�R�R�(((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR#-sB
		:			$					(	'			%			�s".*[.](f90|f95|f77|for|ftn|f|pyf)\Zs.*[.](inc|h|hpp)\ZsQ\s*%module\s*(.*\(\s*package\s*=\s*"(?P<package>[\w_]+)".*\)|)\s*(?P<name>[\w_]+)s-[*]-\s*c\s*-[*]-s-[*]-\s*c[+][+]\s*-[*]-cC`sYt|d�}d}|j�}t|�r6d}nt|�rKd}n|j�|S(NRsc++RP(RR(treadlinet_has_cpp_headert
_has_c_headerR(RR%tresulttline((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s		
cC`sYt|d�}d}x3|D]+}t|�}|r|jd�}PqqW|j�|S(NRR�(RR(t_swig_module_name_matchRR(RR%R�R�R!((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s

cC`sPxIddgD];}tjj|d||f�}tjj|�r
Pq
q
W|S(Ns.cpps.cs	%s_wrap%s(RERFRGR�(R�R�R_R((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s
s%\s*python\s*module\s*(?P<name>[\w_]+)s4\s*python\s*module\s*(?P<name>[\w_]*?__user__[\w_]*)cC`shd}t|�}xE|D]=}t|�}|rt|�rCqn|jd�}PqqW|j�|S(NR�(R(Rt_f2py_module_name_matcht_f2py_user_module_name_matchRR(RR�R%R�R!((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyR��s

(2t__doc__t
__future__RRRRERRCRIR�tdistutils.commandRtdistutils.dep_utilRRtdistutils.utilRtdistutils.errorsRRtnumpy.distutilsR	RcR
RRR
Rtnumpy.distutils.from_templateRR�tnumpy.distutils.conv_templateR�R"R#RtItmatchR�R�R�RR�R�R�R�R�R�R�R�(((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_src.pyt<module>s@(	���							

Zerion Mini Shell 1.0