Current File : //usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyc
�
E�`Qc@s�ddlZddlZddlZddlmZmZddlmZddlm	Z	m
Z
ddlmZ
ddlmZmZddlmZmZddlmZdd	lmZdd
lmZmZddlmZddlmZd
�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Zd�Z)d�Z*d�Z+d�Z,d�Z-d�Z.d�Z/d�Z0d �Z1d!�Z2d"�Z3d#�Z4d$�Z5d%�Z6d&�Z7d'e
fd(��YZ8dS()i����N(tjointdirname(tDistutilsPlatformError(tDistutilsExecErrortDistutilsSetupError(t	build_ext(t	CCompilertnew_compiler(t	FCompilert
new_fcompiler(tfind_executable(tlog(tis_bootstrappingtget_cmd(tget_numpy_include_dirs(t
get_exceptioncCsddlm}|�S(sqReturn the top path where everything produced by scons will be put.

    The path is relative to the top setup.pyi����(tget_scons_build_dir(tnumsconsR(R((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyRscCs&ddlm}tt�||��S(siReturn the build directory for the given package (foo.bar).

    The path is relative to the top setup.pyi����(tpkg_to_path(tnumscons.core.utilsRtpjoinR(tpkgR((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_scons_pkg_build_dirscCsddlm}|�S(sqReturn the top path where everything produced by scons will be put.

    The path is relative to the top setup.pyi����(tget_scons_configres_dir(RR(R((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyR%scCsddlm}|�S(sqReturn the top path where everything produced by scons will be put.

    The path is relative to the top setup.pyi����(tget_scons_configres_filename(RR(R((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyR,scCsddlm}|�S(sEThis returns the full path where scons.py for scons-local is located.i����(tget_scons_path(RR(R((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_scons_local_path3scCszddlm}ddlm}t|�||��}|jtj�}tjjgt	|d�D]}tj
^qd�S(Ni����(R(Ri(RRRRRtcounttostsepRtrangetpardir(RRRtscdirtnti((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt_get_top_dir8s
cCstt|�|j�S(s`Returns the path where distutils install libraries, relatively to the
    scons build directory.(RR#t	build_lib(tcmdR((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_distutils_libdirCscCstt|�|j�S(s6Returns the path where distutils put pure C libraries.(RR#t
build_clib(R%R((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_distutils_clibdirHscCsUddlm}|dkr&||�Std�jd�}t|j||��SdS(s6Returns the installation path for the current package.i����(RitinstallN(RRR
tget_finalized_commandRtinstall_libbase(RtinplaceRtinstall_cmd((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_distutils_install_prefixLs

cCstjS(sEThis returns the python executable from which this file is invocated.(tsyst
executable(((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_python_exec_invocUscCs�ddlm}t|�t|��}|jtj�}t�}g}xP|D]H}|jttjj	gt
|d�D]}tj^qy�|��qPW|S(sYReturn include dirs for numpy.

    The paths are relatively to the setup.py script path.i����(Ri(RRRtpdirnameRRRt_incdirtappendRRR(tsconscript_pathRR R!tdirstrdirstdR"((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyR_s	
FcCstjj|�S(s�Given a list of directories, returns a string where the paths are
    concatenated by the path separator.

    example: ['foo/bar', 'bar/foo'] will return 'foo/bar:bar/foo'.(RtpathsepR(tdirlist((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytdirl_to_strmscCs8|j}|dkrdS|dkr)dS|jdSdS(s�This converts the name passed to distutils to scons name convention (C
    compiler). compiler should be a CCompiler instance.

    Example:
        --compiler=intel -> intelctmsvctinteltintelciN(t
compiler_typetcompiler(R@R?((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytdist2sconsccts	cCsT|jdkrdS|jdkr&dS|jdkr9dS|jdkrLdSd	Sd
S(s�This converts the name passed to distutils to scons name convention
    (Fortran compiler). The argument should be a FCompiler instance.

    Example:
        --fcompiler=intel -> ifort on linux, ifl on windowsR=tiforttgnutg77tgnu95tgfortrantsuntsunf77tfortranN(R?(R@((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytdist2sconsfc�scCs!|jdkr|jS|jdS(s�This converts the name passed to distutils to scons name convention
    (C++ compiler). The argument should be a Compiler instance.R<i(R?tcompiler_cxx(R@((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt
dist2sconscxx�scCs"|jdkrdS|jdSdS(s�For any give CCompiler instance, this gives us the name of C compiler
    (the actual executable).

    NOTE: does NOT work with FCompiler instances.R<scl.exeiN(R?R@(R@((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_compiler_executable�scCs|jdS(sdFor any give FCompiler instance, this gives us the name of F77 compiler
    (the actual executable).i(tcompiler_f77(R@((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_f77_compiler_executable�scCs"|jdkrdS|jdSdS(s�For any give CCompiler instance, this gives us the name of CXX compiler
    (the actual executable).

    NOTE: does NOT work with FCompiler instances.R<scl.exeiN(R?RK(R@((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_cxxcompiler_executable�scCs7tt|��}|r't|�}ntd��|S(sjGiven a distutils.ccompiler.CCompiler class, returns the path of the
    toolset related to C compilation.s1Could not find compiler executable info for scons(R
RMR2R(R@t
fullpath_exectfullpath((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt
get_tool_path�s
cCs7tt|��}|r't|�}ntd��|S(slGiven a distutils.ccompiler.FCompiler class, returns the path of the
    toolset related to F77 compilation.s5Could not find F77 compiler executable info for scons(R
ROR2R(R@RQRR((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_f77_tool_path�s
cCs7tt|��}|r't|�}ntd��|S(sjGiven a distutils.ccompiler.CCompiler class, returns the path of the
    toolset related to C compilation.s1Could not find compiler executable info for scons(R
RPR2R(R@RQRR((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytget_cxx_tool_path�s
cCs|rd|dSdSdS(sxConvert path (given as a string) to something the shell will have no
    problem to understand (space, etc... problems).t"s""N((tpath((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytprotect_path�scCs
|jd�S(Nt,(tsplit(tpkglist((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytparse_package_list�scCs[tg|D]}|df^q
�}gtt|��D]}|j||�r8|^q8S(s�Given two list, return the index of the common items.

    The index are relative to seq1.

    Note: do not handle duplicate items.N(tdicttNoneRtlenthas_key(tseq1tseq2R"tdict2((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytfind_common�s%cCsDt||�}t|�t|�ks@d|}t|��n|S(s[Given a list of packages in pkglist, return the list of packages which
    match this list.sYthe package list contains a package not found in the current list. The current list is %s(RdR_t
ValueError(tsconspkgR[tcommontmsg((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytselect_packages�scCs�yddl}Wn0tk
rBt�}tdt|���nXy�ddlm}t|dt�r�tdt|���nt|�}|d |kr�tdt|�t|d �f��nWn*tk
r�td	||j	f��nXdS(
s`Check that we can use numscons.

    minver is a 3 integers tuple which defines the min version.i����Nslimporting numscons failed (error was %s), using scons within distutils is not possible without this package (tversion_infois/Numscons %s or above expected (detected 0.10.0)is'Numscons %s or above expected (got %s) sTYou need numscons >= %s to build numpy with numscons (imported numscons path is %s).(
RtImportErrorRtRuntimeErrortstrRjt
isinstanceRettuplet__file__(tminverRteRj((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytcheck_numsconss$
	'
tsconscBs�eZdZd/d0d1d2d3d4d5gZd6d7d8d9d:d;d<d=d>d?d@dAgeZd'�Zd(�Zd)�Zd*�Z	d+�Z
d,�Zd-�ZRS(Bs
Scons builders
with-perflib=sdSpecify which performance library to use for BLAS/LAPACK/etc...Examples: mkl/atlas/sunper/accelerates
with-mkl-lib=tTODOswith-mkl-include=swith-mkl-libraries=swith-atlas-lib=swith-atlas-include=swith-atlas-libraries=sjobs=tjs4specify number of worker threads when executingsconsR,R"sIf specified, build in place.s
import-envRrs<If specified, import user environment into scons env["ENV"].tbypasstbs3Bypass distutils compiler detection (experimental).sscons-tool-path=s:specify additional path (absolute) to look for scons toolsssilent=sespecify whether scons output should less verbose(1), silent (2), super silent (3) or not (0, default)s
log-level=sVspecify log level for numscons. Any value valid for the logging python module is valids
package-list=syIf specified, only run scons on the given packages (example: --package-list=scipy.cluster). If empty, no package is builts
fcompiler=s!specify the Fortran compiler types	compiler=sspecify the C compiler typescxxcompiler=s4specify the C++ compiler type (same as C by default)tdebugtgs'compile/link with debugging informationcCstj|�d|_d|_d|_d|_d|_d|_d|_	d|_
d|_t|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_g|_g|_g|_g|_g|_g|_g|_dS(Niti2(t
old_build_exttinitialize_optionsR^R'RyR@tcxxcompilert	fcompilertjobstsilentt
import_envtscons_tool_pathtFalset_bypass_distutils_cctscons_compilertscons_compiler_pathtscons_fcompilertscons_fcompiler_pathtscons_cxxcompilertscons_cxxcompiler_pathtpackage_listR,Rwt	log_leveltwith_perflibtwith_mkl_libtwith_mkl_includetwith_mkl_librariestwith_atlas_libtwith_atlas_includetwith_atlas_libraries(tself((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyR}Ls8
																										c	Cs�|dkrt|_ny~td|d|jd|jd|j�}|j|j�t|d�rq|j	�nt
|�|_tt
|��|_Wn5tk
r�t�}|js�|�q�||_nXdS(NR<R@tverbosetdry_runtforcet
initialize(tTrueR�RR�R�R�t	customizetdistributionthasattrR�RAR�RXRSR�RR(R�R?tdistutils_compilerRr((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt_init_ccompilerws"		

			c	Cs�td|d|jd|jd|j�|_|jdk	r||jj|j�t|j�|_	t
t|j��|_ndS(NR@R�R�R�(
R	R�R�R�RR^R�R�RJR�RXRTR�(R�R?((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt_init_fcompiler�s		c	Cs�td|d|jd|jd|j�}|dk	r�|j|jdd�|j|�|j�|_	yt
|j	�Wntk
r�d|_	nX|j	r�t|j	�|_
tt
|j	��|_q�ndS(NR@R�R�R�tneed_cxxi(RR�R�R�R^R�R�t
customize_cmdtcxx_compilerR~RURRLR�RXR�(R�R?R~((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt_init_cxxcompiler�s		


	cCs�tj|�g|_g|_g|_g|_g|_|jj�r�xs|jj	D]e}|jj
|j�|jj
|j�|jj
|j
�|jj
|j�|jj
|j�qVWtd�jd�}|j|_n|js�|j|_nt|j�dkrs|jr@|j|_|j|_|j|_qs|j|j�|j|j�|j|j�n|jr�t|j�|_ndS(NR'i( R|tfinalize_optionstsconscriptst	pre_hookst
post_hookst	pkg_namest	pkg_pathsR�thas_scons_scriptst
scons_dataR4t
scons_pathtpre_hookt	post_hooktparent_nametpkg_pathR
R*R'R~R@R_RwR�RR�R�R�R�R�R�R\(R�R"tbuild_clib_cmd((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyR��s6
							
	cCsU|d|dg}|jr8|jdt|j��n|jrQ|jd�n|jd|j�|jdt|��|jd|�|jd|�|jd	|j�|jd
tt||���|jdtt	||���t
||j�}|jdt|��|js;|jd
|j�n|j
r[|jd|j
�n|jd
|j�|jd|j�|jr�|jd|j�n|jr�|jd|j�n|jr�|jd|j�n|jr|jd|j�n|jdtt|���|jd|j�|jd|j�|jr�t|j�dkrv|jd�q�t|j�dkr�|jd�q�n|jdt|j��|jd|�dj|�}t|j�dkrtjd||�ntjd |�tj|�}	|	rQd!}
|
d"7}
|
d#7}
t|
��ndS($Ns-fs-I.s
 --jobs=%ds	inplace=1sscons_tool_path="%s"ssrc_dir="%s"s
pkg_path="%s"s
pkg_name="%s"slog_level=%ssdistutils_libdir=%ssdistutils_clibdir=%ssdistutils_install_prefix=%ss	cc_opt=%sscc_opt_path=%ssdebug=%ss
f77_opt=%ssf77_opt_path=%ss
cxx_opt=%sscxx_opt_path=%ssinclude_bootstrap=%ss	bypass=%ss
import_env=%sis-Qis-ss	silent=%dsbootstrapping=%dt is(Executing scons command (pkg is %s): %s s5======== Executing scons command for pkg %s =========s$Error while executing scons command.s! See above for more information.
s�If you think it is a problem in numscons, you can also try executing the scons
command with --log-level option for more detailed output of what numscons is
doing, for example --log-level=0; the lowest the level is, the more detailed
the output it.(R�R4tintR,R�R2R�RXR&R(R.R�R�R�RyR�R�R�R�R;RRwR�R�RRtinfoRtsystemR(R�t
scons_exect
sconscripttpkg_nameR�t
bootstrappingR%tprefixtcmdstrtstRh((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt_call_scons�sf												
cCs�t|j�dkrdStdd	�|jdk	r�t|j|j�}g|D]}|j|^qQ}g|D]}|j|^qq}g|D]}|j|^q�}g|D]}|j|^q�}g|D]}|j	|^q�}n-|j}|j}|j}|j}|j	}t
�r,d}nd}t�}	|	dtt
t�d��7}	x�t|||||�D]h\}
}}}
}|r�|�n|
r�|j|	|
|
||�n|rt|i|
d6|d6�qtqtWdS(
NiRqiiR�sscons.pyR�t	scons_cmd(iii(R_R�RsR�R^RiR�R�R�R�RR1RXRRtzipR�(R�tidR"R�R�R�R�R�R�R�R�R�R�R�R�((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pytrun%s:
    #								 	
N(s
with-perflib=NsdSpecify which performance library to use for BLAS/LAPACK/etc...Examples: mkl/atlas/sunper/accelerate(s
with-mkl-lib=NRu(swith-mkl-include=NRu(swith-mkl-libraries=NRu(swith-atlas-lib=NRu(swith-atlas-include=NRu(swith-atlas-libraries=NRu(sjobs=Rvs4specify number of worker threads when executingscons(sinplaceR"sIf specified, build in place.(s
import-envRrs<If specified, import user environment into scons env["ENV"].(sbypassRxs3Bypass distutils compiler detection (experimental).(sscons-tool-path=Ns:specify additional path (absolute) to look for scons tools(ssilent=Nsespecify whether scons output should less verbose(1), silent (2), super silent (3) or not (0, default)(s
log-level=NsVspecify log level for numscons. Any value valid for the logging python module is valid(s
package-list=NsyIf specified, only run scons on the given packages (example: --package-list=scipy.cluster). If empty, no package is built(s
fcompiler=Ns!specify the Fortran compiler type(s	compiler=Nsspecify the C compiler type(scxxcompiler=Ns4specify the C++ compiler type (same as C by default)(sdebugRzs'compile/link with debugging information(
t__name__t
__module__tdescriptionR^tlibrary_optionstuser_optionsR}R�R�R�R�R�R�(((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyRt%s@		+				1	J(9RR/tos.pathRRRR2tdistutils.errorsRRRt!numpy.distutils.command.build_extRR|tnumpy.distutils.ccompilerRRtnumpy.distutils.fcompilerRR	tnumpy.distutils.exec_commandR
tnumpy.distutilsRtnumpy.distutils.misc_utilRR
RR3tnumpy.distutils.compatRRRRRRR#R&R(R.R1R;RARJRLRMRORPRSRTRURXR\RdRiRsRt(((sC/usr/lib64/python2.7/site-packages/numpy/distutils/command/scons.pyt<module>sP