• File: build_ext.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyc
  • Date Modified: 12/19/2017 2:16 PM
  • File size: 13.67 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

9Zc@`sVdZddlmZmZmZddlZddlZddlmZddlm	Z	ddl
mZddl
mZmZmZddlmZdd	lmZdd
lmZddlmZddlmZmZmZmZmZmZm Z m!Z!dd
l"m#Z#ye$Wn!e%k
r;ddl&m'Z$nXdefdYZdS(sC Modified version of build_ext that handles fortran source files.

i(tdivisiontabsolute_importtprint_functionN(tglob(tnewer_group(t	build_ext(tDistutilsFileErrortDistutilsSetupErrortDistutilsError(t	copy_file(tlog(texec_command(t
combine_paths(tfilter_sourcest
has_f_sourcesthas_cxx_sourcestget_ext_source_filestget_numpy_include_dirstis_sequencetget_build_architecturetmsvc_version(tshow_fortran_compilers(tSetRcB`seZdZejddgZejdddefgZdZd	Z	d
Z
dZdZd
Z
dZdZdZRS(s:build C/C++/F extensions (compile/link to build directory)s
fcompiler=s!specify the Fortran compiler types	parallel=tjsnumber of parallel jobsshelp-fcompilers list available Fortran compilerscC`s#tj|d|_d|_dS(N(t
old_build_exttinitialize_optionstNonet	fcompilertparallel(tself((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyR.s
	cC`s|jrByt|j|_WqBtk
r>tdqBXnt|jtro|jjtj|_n|jp{g}|j	jdkrg|j	_n|j	j|_|jj|tj
||jdddS(Ns)--parallel/-j argument must be an integertbuildR(RR(Rtintt
ValueErrort
isinstancetinclude_dirststrtsplittostpathseptdistributionRtextendRtfinalize_optionstset_undefined_options(Rt	incl_dirs((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyR)3s	


c
C`s|js
dS|jd|jjr|jr|jjjdritjd|jj	d}q|jj	d}d|_|j
|jd|jjd<n|jd|jd}|j
j|jnd}ddlm}ddlm}|j}|d|d	|jd
|jd|j|_|jj|j|jj||jji}|dk	rx{|jpgD]g\}}||kr|||krtjd|t||d
 t|d
 fn|||<qWnx<|jjpgD](\}}||kr*qn|||<qWt}x~|jD]s}	t}
g}g}g}
x|	jD]}||kr||}||jdg7}||jdg7}x9|jdgD]"}||
kr|
j|qqWnx3|j|ijdgD]}|
j|qWqvW|r|	j|}tj d|	j!|	j|f||	_|	j
||	_
n|
rtj d|	j!|
f|	j"|
|	_"nt#|	j$r|
jdnt%|	j$r|
jdn|	j&p|jj'|	j$}|r(|
j|nd|
kr=d}n0d|
krRd}nd|
krgd}nd}|r||kr|	j&rtjd|	j!||fn||	_&|j(|
qKWd|k}d|k}d|k}|ra|d|d	|jd
|jd|j|_)|j)}|j|jd||j||j|j*|_)n	d|_)|r,|j+}|d|j+d	|jd
|jd|jdt,d|j|_-|j-}|r|j.}|j|jn|r|j/r|j||jq5|jd|d|_-n	d|_-|r|j+}|d|j+d	|jd
|jd|jdt0d|j|_1|j1}|r|j.}|j|jn|r|j/r|j||jq|jd|d|_1n	d|_1|j2dS(Nt	build_srct
build_clibsMbuild_clib already run, it is too late to ensure in-place build of build_clibii(tnew_compiler(t
new_fcompilertcompilertverbosetdry_runtforcesKlibrary %r defined more than once, overwriting build_info
%s... 
with
%s...i,t	librariestlibrary_dirstmacrostsource_languagess-updating extension %r libraries from %r to %rs-extending extension %r defined_macros with %rtf77sc++tf90tcs.resetting extension %r language from %r to %r.tneed_cxxt
requiref90t
c_compilers!f77_compiler=%s is not available.s!f90_compiler=%s is not available.(3t
extensionstrun_commandR'thas_c_librariestinplacethave_runtgetR
twarntget_command_objtensure_finalizedtruntget_finalized_commandR5tappendR-Rtdistutils.ccompilerR.tnumpy.distutils.fcompilerR/R0R1R2R3t	customizet
customize_cmdtshow_customizationR4treprtsettaddtinfotnamet
define_macrosRtsourcesRtlanguagetdetect_languagetupdatet
_cxx_compilertcxx_compilerRtFalset
_f77_compilert
compiler_typetget_versiontTruet
_f90_compilertbuild_extensions(RR-R.R/R]tclibstlibnamet
build_infot
all_languagestextt
ext_languagestc_libst
c_lib_dirsR6tbinfotmtlt
new_c_libstext_languagetneed_f90_compilertneed_f77_compilertneed_cxx_compilerR0tctypeR((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyRGMs	
	
	


			
	,		
%
											

							

								

		cC`s|S(N((RRU((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pytswig_sourcessc#C`sG|j}|dks"t|r@tddd|jnt|}|sVdS|j|j}|jr|jd}dj	|dd!}|d}|j
d}|j|}tj
j	||j|}	n!tj
j	|j|j|}	||j}
|jp%t|
|	ds?tjd	|jdStjd
|j|jp^g}|j}x!|jD]}
|j|
fquWt|j\}}}}|jjdkr|r|jdn||7}g}n|jd
kr|j}n-|jdkr|j}n|jp*|j}|dk	rt |drW|j!pZgng|_!t |dr~|j"pgng|_"n|j#}|r|dkrt$d|jn|s|r|dkrt$d|jn|jd*kr|dkr|j%d|jn|jdkrM|dkrM|j%d|jni|jd6}|j&}|j't(}g}|rtjd|jj)|d|d|d|d|jd||}n|rtjd||j)|d|d|d|d|jd||7}ng}g}|rtjd|j*}tj
j	|j&tj
j+|j|}|j,||j-dkrt.d}n||j/||7}||j)|d|j&d|d|d|jd|d|j7}|j-dkrxt.dD]}||kr qntj
j	||}tj
j0|tj
j0|kr_qntj
j1|rtj2|ny|j3||Wqt4k
rtj%d ||fqXqWqn|r tjd!||j)|d|j&d|d|d|jd|d|j7}n||}|j5rF|j6|j5n|j7pRg}|j8|} |j9}!|jj:}"|jjd+kr|j;|| |!n'|jd,kr|dk	r|j:}"n|jdkr|dk	r|j:}"n|"||	d$| d%|!d&|j<d|d'|j=|d|jd(|j&d)|jdS(-Ns*in 'ext_modules' option (extension '%s'), s&'sources' must be present and must be sa list of source filenamest.iitbuild_pytnewers$skipping '%s' extension (up-to-date)sbuilding '%s' extensiontmsvcs/Zm1000R9R8textra_f77_compile_argstextra_f90_compile_argss5extension %r has C++ sourcesbut no C++ compiler founds>extension %r has Fortran sources but no Fortran compiler foundsTextension %r has Fortran libraries but no Fortran linker found, using default linkersc++sLextension %r has C++ libraries but no C++ linker found, using default linkertdependsscompiling C sourcest
output_dirR6R"tdebugtextra_postargsscompiling C++ sourcess#compiling Fortran 90 module sourcess*.modsfailed to move %r to %rscompiling Fortran sourcestintelwtintelemwR4R5truntime_library_dirstexport_symbolst
build_tempttarget_lang(R8R9(RwR~R(R8R9(>RURRRRStlisttget_ext_fullnameRAR$tjoinRHtget_package_dirR%tpathtget_ext_filenamet	build_libRzR3RR
R|RRtextra_compile_argsRTtundef_macrosRIR
R0R]RVR`R\thasattrRxRyRYRRDRR"Rtcompiletmodule_dirstdirnametmkpathtmodule_dir_switchRtmodule_optionstabspathtisfiletremovet	move_fileRt
extra_objectsR(textra_link_argst
get_librariesR5tlink_shared_objectt_libs_with_msvc_and_fortranRtget_export_symbols(#RRfRUtfullnametmodpathtpackagetbaseRutpackage_dirtext_filenameRzt
extra_argsR6tundeft	c_sourcestcxx_sourcest	f_sourcestfmodule_sourcesRRZtkwsR{R"t	c_objectsR}t	f_objectsRtmodule_build_dirtexisting_modulestftttobjectsR4R5tlinker((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pytbuild_extensions		



	'*				
	
	


	
	
		
$
	
		
	
			cC`sw|jdj}|jdj}|jjtjj|dgd|j}|jj	|dd|d|j
dS(NR,R-sgfortran_vs2003_hack.cR{t_gfortran_workaroundR|(RHR,R-R0RR%RRRtcreate_static_libR|(RRR,R-R((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyt_add_dummy_mingwex_symscC`s|dkrdSx;|D]3}|jdr2qnt}xI|pDgD];}tjj|d|}tjj|rEt}PqEqEW|rqnt}x|D]}tjj|d|}tjj|rtjj|j|d}t	|||j|kr|j
|jnt}PqqW|r3qntjd||fqWg}	x`|j
D]U}
|
jdrtdd|
gd	t\}}|s|}
qn|	j
|
q^W|j|	x|jD]}
|
jds|j
|
t|	d
|
d}|rwtjj|j|
d}tjj|sOt	|d|n|j|krt|j
|jqtqwqqWdS(
NRws%s.libslib%s.as.libs+could not find library %r in directories %ss/usr/libtcygpaths-wtuse_teetlibs.ai(Rt
startswithR[R%RRRR_RR	RIR
RDR5RR(R4R(RRtc_librariestc_library_dirsRct
fileexiststlibdirtlibfiletlibfile2t
f_lib_dirstdirtstoRtptdst_name((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyRsZ


	!

cC`sA|j|jg}x$|jD]}|jt|q W|S(N(tcheck_extensions_listR>R(R(Rt	filenamesRf((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pytget_source_filess
cC`sw|j|jg}xZ|jD]O}|js5q n|j|j}|jtjj|j	|j
|q W|S(N(RR>RURRSRIR%RRRR(RtoutputsRfR((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pytget_outputss	N(s
fcompiler=Ns!specify the Fortran compiler type(s	parallel=Rsnumber of parallel jobs(t__name__t
__module__tdescriptionRtuser_optionsRthelp_optionsRRR)RGRsRRRRR(((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyRs$
	
							6	((t__doc__t
__future__RRRR%tsysRtdistutils.dep_utilRtdistutils.command.build_extRRtdistutils.errorsRRRtdistutils.file_utilR	tnumpy.distutilsR
tnumpy.distutils.exec_commandRtnumpy.distutils.system_infoRtnumpy.distutils.misc_utilR
RRRRRRRt'numpy.distutils.command.config_compilerRRPt	NameErrortsetsR(((sT/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/command/build_ext.pyt<module>s$: