AlkantarClanX12

Your IP : 3.136.19.203


Current Path : /opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/build_ext.cpython-33.pyo

�
��f�c@sDdZddlZddlZddlZddlmZddlTddlmZm	Z	ddlm
Z
ddlmZddl
mZdd	lmZdd
lmZejdkr�dZdZnddlmZdZejd
krddlmZee��Znejd�Z dd�Z!Gdd�de�Z"dS(u�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).iN(uCommand(u*(ucustomize_compileruget_python_version(uget_config_h_filename(unewer_group(u	Extension(uget_platform(ulogu2.6(u	USER_BASEunt(uget_build_versionu3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS(Ni(ushow_compilers(udistutils.ccompilerushow_compilers(ushow_compilers((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyushow_compilers#sushow_compilerscBs�|EeZdZdZdejZdWdXd	d
de�fdd
ddfdddefdYdZd[dddefd\d]d^d_d`dadbdcgZ	dd%d(d.gZ
er�e	jdd�e
jd4�nd6dVd7e
fgZd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZdNdO�ZdPdQ�ZdRdS�ZdTdU�ZdVS(eu	build_extu8build C/C++ extensions (compile/link to build directory)u (separated by '%s')u
build-lib=ubu(directory for compiled extension modulesubuild-temp=utu1directory for temporary files (build by-products)u
plat-name=upu>platform name to cross-compile for, if supported (default: %s)uinplaceuiu=ignore build-lib and put compiled extensions into the source u,directory alongside your pure Python modulesu
include-dirs=uIu.list of directories to search for header filesudefine=uDuC preprocessor macros to defineuundef=uUu!C preprocessor macros to undefineu
libraries=ulu!external C libraries to link withu
library-dirs=uLu.directories to search for external C librariesurpath=uRu7directories to search for shared C libraries at runtimeu
link-objects=uOu2extra explicit link objects to include in the linkudebugugu'compile/link with debugging informationuforceufu2forcibly build everything (ignore file timestamps)u	compiler=ucuspecify the compiler typeuswig-cppu)make SWIG create C++ files (default is C)u
swig-opts=u!list of SWIG command line optionsuswig=upath to the SWIG executableuuseru#add user include, library and rpathu
help-compilerulist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS(Ni(uNoneu
extensionsu	build_libu	plat_nameu
build_tempuinplaceupackageuinclude_dirsudefineuundefu	librariesulibrary_dirsurpathulink_objectsudebuguforceucompileruswiguswig_cppu	swig_optsuuser(uself((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuinitialize_optionsrs(																			ubuild_ext.initialize_optionsc
	Cs=ddlm}|jdd.d/d0d1d2d3�|jdkrP|jj|_n|jj|_|j	�}|j	d
d�}|j
dkr�|jj
p�g|_
nt|j
t�r�|j
j
tj�|_
ntjtjkr|j
jtjjtjd��n|j
j|�||kr7|j
j|�n|jd
�|jdkr_g|_n|jdkrzg|_n-t|jt�r�|jj
tj�|_n|jdkr�g|_n-t|jt�r�|jj
tj�|_ntjdkr�|jjtjjtjd��tjtjkrW|jjtjjtjd��n|jr~tjj|jd�|_ntjj|jd�|_|j
jtjjt���t tdd�}|r�|jj|�nt!dkrc|j"dkrd}n|j"dd�}tjjtjd�}|rPtjj||�}n|jj|�q�t!dkr�|jjtjjtjdd��q�t!dkr�|jjtjjtjdd��q�|jjtjjtjdd��ntjdkr'|jjtjjtjd��ntj#dd �d!ksYtj#dd �d"kr�tj$j%tjjtjd#��r�|jjtjjtjd$d%t&�d&��q�|jjd'�n|j'd(�r$tj$j%tjjtjd#��r|jj|j'd)��q$|jjd'�n|j(rX|j(j
d*�}d+d,�|D�|_(n|j)ry|j)j
d*�|_)n|j*dkr�g|_*n|j*j
d-�|_*|j+r9tjjt,d�}tjjt,d$�}	tjj-|�r|j
j|�ntjj-|	�r9|jj|	�|jj|	�q9ndS(4Ni(u	sysconfigubuildu	build_libu
build_tempucompilerudebuguforceu	plat_nameu
plat_specificiuincludeu	librariesuntulibsuDebuguReleaseu_homei	uwin32uiuPCbuildiuPCuVS8.0iuVS7.1uVC6uos2uConfigiucygwinuatheosubinulibupythonuconfigu.uPy_ENABLE_SHAREDuLIBDIRu,cSsg|]}|df�qS(u1((u.0usymbol((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyu
<listcomp>s	u.build_ext.finalize_options.<locals>.<listcomp>u (u	build_libu	build_lib(u
build_tempu
build_temp(ucompilerucompiler(udebugudebug(uforceuforce(u	plat_nameu	plat_name(.u	distutilsu	sysconfiguset_undefined_optionsupackageuNoneudistributionuext_packageuext_modulesu
extensionsuget_python_incuinclude_dirsu
isinstanceustrusplituosupathsepusysuexec_prefixubase_exec_prefixuappendupathujoinuensure_string_listu	librariesulibrary_dirsurpathunameuprefixudebugu
build_tempudirnameuget_config_h_filenameugetattruMSVC_VERSIONu	plat_nameuplatformu
executableu
startswithuget_python_versionuget_config_varudefineuundefu	swig_optsuuseru	USER_BASEuisdir(
uselfu	sysconfigu
py_includeuplat_py_includeu	_sys_homeusuffixunew_libudefinesuuser_includeuuser_lib((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyufinalize_options�s�	%
"%		%2$

$			ubuild_ext.finalize_optionsc
Csddlm}|jsdS|jj�rm|jd�}|jj|j�pSg�|j	j
|j�n|d|jd|j
d|jd|j�|_t|j�tjdkr�|jt�kr�|jj|j�n|jdk	r|jj|j�n|jdk	rEx-|jD]\}}|jj||�qWn|jdk	r{x$|jD]}|jj|�q^Wn|jdk	r�|jj|j�n|j	dk	r�|jj|j	�n|jdk	r�|jj |j�n|j!dk	r|jj"|j!�n|j#�dS(	Ni(unew_compileru
build_clibucompileruverboseudry_runuforceunt($udistutils.ccompilerunew_compileru
extensionsudistributionuhas_c_librariesuget_finalized_commandu	librariesuextenduget_library_namesulibrary_dirsuappendu
build_clibucompileruverboseudry_runuforceucustomize_compileruosunameu	plat_nameuget_platformu
initializeuinclude_dirsuNoneuset_include_dirsudefineudefine_macrouundefuundefine_macrou
set_librariesuset_library_dirsurpathuset_runtime_library_dirsulink_objectsuset_link_objectsubuild_extensions(uselfunew_compileru
build_clibunameuvalueumacro((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyurun#s>			
!u
build_ext.runc
	Cs0t|t�std��nxt|�D]�\}}t|t�rLq+nt|t�snt|�dkr}td��n|\}}tjd|�t|t	�o�t
j|�s�td��nt|t�s�td��nt||d�}x<dD]4}|j
|�}|dk	r�t|||�q�q�W|j
d�|_d|kretjd�n|j
d�}|rg|_g|_x�|D]�}	t|	t�o�t|	�dks�td��nt|	�dkr�|jj|	d�q�t|	�dkr�|jj|	�q�q�Wn|||<q+WdS(u�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        u:'ext_modules' option must be a list of Extension instancesiuMeach element of 'ext_modules' option must be an Extension instance or 2-tupleuuold-style (ext_name, build_info) tuple found in ext_modules for extension '%s'-- please convert to Extension instanceuRfirst element of each tuple in 'ext_modules' must be the extension name (a string)uOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)usourcesuinclude_dirsulibrary_dirsu	librariesu
extra_objectsuextra_compile_argsuextra_link_argsurpathudef_fileu9'def_file' element of build info dict no longer supportedumacrosiu9'macros' element of build info dict must be 1- or 2-tupleiN(uinclude_dirsulibrary_dirsu	librariesu
extra_objectsuextra_compile_argsuextra_link_args(ii(u
isinstanceulistuDistutilsSetupErroru	enumerateu	Extensionutupleulenuloguwarnustruextension_name_reumatchudictugetuNoneusetattruruntime_library_dirsu
define_macrosuundef_macrosuappend(
uselfu
extensionsuiuextuext_nameu
build_infoukeyuvalumacrosumacro((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyucheck_extensions_listcsT
"	
		
!ubuild_ext.check_extensions_listcCs>|j|j�g}x!|jD]}|j|j�q W|S(N(ucheck_extensions_listu
extensionsuextendusources(uselfu	filenamesuext((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuget_source_files�s
ubuild_ext.get_source_filescCsG|j|j�g}x*|jD]}|j|j|j��q W|S(N(ucheck_extensions_listu
extensionsuappenduget_ext_fullpathuname(uselfuoutputsuext((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuget_outputs�s
ubuild_ext.get_outputscCs�|j|j�x||jD]q}y|j|�Wqtttfk
r�}z.|js^�n|jd|j|f�WYdd}~XqXqWdS(Nu"building extension "%s" failed: %s(	ucheck_extensions_listu
extensionsubuild_extensionuCCompilerErroruDistutilsErroruCompileErroruoptionaluwarnuname(uselfuextue((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyubuild_extensions�s		ubuild_ext.build_extensionsc
Cs	|j}|dks+t|ttf�rAtd|j��nt|�}|j|j�}||j}|j	p�t
||d�s�tjd|j�dStj
d|j�|j||�}|jp�g}|jdd�}x!|jD]}|j|f�q�W|jj|d|jd|d|jd|jd	|d
|j�}|dd�|_|jrz|j|j�n|jp�g}|jp�|jj|�}	|jj||d|j|�d|jd
|j d	|d|j!|�d|jd|jd|	�dS(Nujin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesuneweru$skipping '%s' extension (up-to-date)ubuilding '%s' extensionu
output_dirumacrosuinclude_dirsudebuguextra_postargsudependsu	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsu
build_temputarget_lang("usourcesuNoneu
isinstanceulistutupleuDistutilsSetupErrorunameuget_ext_fullpathudependsuforceunewer_groupulogudebuguinfouswig_sourcesuextra_compile_argsu
define_macrosuundef_macrosuappenducompilerucompileu
build_tempuinclude_dirsu_built_objectsu
extra_objectsuextenduextra_link_argsulanguageudetect_languageulink_shared_objectu
get_librariesulibrary_dirsuruntime_library_dirsuget_export_symbols(
uselfuextusourcesuext_pathudependsu
extra_argsumacrosuundefuobjectsulanguage((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyubuild_extension�sN	"
										ubuild_ext.build_extensionc	Cs�g}g}i}|jr+tjd�n|jsRd|jksRd|jkr[d}nd}xr|D]j}tjj|�\}}	|	dkr�|j|d|�|j|�|d||<qh|j|�qhW|s�|S|jp�|j	�}
|
dg}|j
|j�|jr*|jd�n|jsWx!|jD]}|j|�q=WnxE|D]=}||}
tjd	||
�|j|d
|
|g�q^W|S(u�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        u/--swig-cpp is deprecated - use --swig-opts=-c++u-c++u.cppu.cu.iu_wrapiu-pythonuswigging %s to %su-oi����(
uswig_cppuloguwarnu	swig_optsuosupathusplitextuappenduswigu	find_swiguextenduinfouspawn(uselfusourcesu	extensionunew_sourcesuswig_sourcesuswig_targetsu
target_extusourceubaseuextuswiguswig_cmduoutarget((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuswig_sources's>		

		

ubuild_ext.swig_sourcescCs�tjdkrdStjdkrixjdD]5}tjjd|d�}tjj|�r)|Sq)WdSn&tjd	kr|dStd
tj��dS(
u�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        uposixuswiguntu1.3u1.2u1.1u	c:\swig%suswig.exeuos2u>I don't know how to find (much less run) SWIG on platform '%s'N(u1.3u1.2u1.1(uosunameupathujoinuisfileuDistutilsPlatformError(uselfuversufn((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyu	find_swig]s
ubuild_ext.find_swigcCs�|j|�}|jd�}|j|d�}|jsstjj|dd�|g�}tjj|j|�Sdj|dd��}|jd�}tjj	|j
|��}tjj||�S(	u�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        u.iNiubuild_pyi����i����i����(uget_ext_fullnameusplituget_ext_filenameuinplaceuosupathujoinu	build_libuget_finalized_commanduabspathuget_package_dir(uselfuext_nameufullnameumodpathufilenameupackageubuild_pyupackage_dir((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuget_ext_fullpathxs	#ubuild_ext.get_ext_fullpathcCs&|jdkr|S|jd|SdS(uSReturns the fullname of a given extension name.

        Adds the `package.` prefixu.N(upackageuNone(uselfuext_name((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuget_ext_fullname�subuild_ext.get_ext_fullnamecCs�ddlm}|jd�}tjdkr]|t|�ddd�|t|�d<n|d�}tjd	kr�|jr�tjj|�d
|Stjj|�|S(u�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        i(uget_config_varu.uos2iNiu
EXT_SUFFIXuntu_d(	udistutils.sysconfiguget_config_varusplituosunameulenudebugupathujoin(uselfuext_nameuget_config_varuext_pathu
ext_suffix((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuget_ext_filename�s/ubuild_ext.get_ext_filenamecCsCd|jjd�d}||jkr<|jj|�n|jS(uReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        uPyInit_u.ii����(unameusplituexport_symbolsuappend(uselfuextu
initfunc_name((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyuget_export_symbols�subuild_ext.get_export_symbolscCsutjdkr�ddlm}t|j|�s}d}|jrM|d}n|tjd?tjd?d@f}|j|gS|jSn�tjd	kr�d}|tjd?tjd?d@f}|j|gStjd
d�dkrd
}|tjd?tjd?d@f}|j|gStjd
d�dkr�ddl	m
}d
}|tjd?tjd?d@f}g}xS|jd�j�D]<}|j
d�r�|j|dd
��q�|j|�q�W|j|dg|Stjdkr�|jStjd
d�dkr|jSddl	m
}|jd�rjdjtjd?tjd?d@tj�}|j|gS|jSd
S(u�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows and OS/2, we add the Python library (eg. python20.dll).
        uwin32i(uMSVCCompileru
python%d%du_diii�uos2emxNiucygwinupython%d.%duatheos(u	sysconfiguSHLIBSu-liumudarwiniuaixuPy_ENABLE_SHAREDu
python{}.{}{}(usysuplatformudistutils.msvccompileruMSVCCompileru
isinstanceucompilerudebugu
hexversionu	librariesu	distutilsu	sysconfiguget_config_varusplitu
startswithuappenduformatuabiflags(uselfuextuMSVCCompilerutemplateu	pythonlibu	sysconfiguextraulib((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyu
get_libraries�sT
	

ubuild_ext.get_librariesN(u
build-lib=ubu(directory for compiled extension modules(ubuild-temp=utu1directory for temporary files (build by-products)(udefine=uDuC preprocessor macros to define(uundef=uUu!C preprocessor macros to undefine(u
libraries=ulu!external C libraries to link with(urpath=uRu7directories to search for shared C libraries at runtime(u
link-objects=uOu2extra explicit link objects to include in the link(udebugugu'compile/link with debugging information(uforceufu2forcibly build everything (ignore file timestamps)(u	compiler=ucuspecify the compiler type(uswig-cppNu)make SWIG create C++ files (default is C)(u
swig-opts=Nu!list of SWIG command line options(uswig=Nupath to the SWIG executable(uuserNu#add user include, library and rpath(u__name__u
__module__u__qualname__udescriptionuosupathsepusep_byuget_platformuNoneuuser_optionsuboolean_optionsu
HAS_USER_SITEuappendushow_compilersuhelp_optionsuinitialize_optionsufinalize_optionsurunucheck_extensions_listuget_source_filesuget_outputsubuild_extensionsubuild_extensionuswig_sourcesu	find_swiguget_ext_fullpathuget_ext_fullnameuget_ext_filenameuget_export_symbolsu
get_libraries(u
__locals__((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyu	build_ext(sx



	�@N	
R6	u	build_extFT(#u__doc__usysuosureudistutils.coreuCommandudistutils.errorsudistutils.sysconfigucustomize_compileruget_python_versionuget_config_h_filenameudistutils.dep_utilunewer_groupudistutils.extensionu	Extensionudistutils.utiluget_platformu	distutilsuloguversionuNoneu	USER_BASEuFalseu
HAS_USER_SITEusiteuTrueunameudistutils.msvccompileruget_build_versionuintuMSVC_VERSIONucompileuextension_name_reushow_compilersu	build_ext(((u@/opt/alt/python33/lib64/python3.3/distutils/command/build_ext.pyu<module>s*$