Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/distutils/command/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/distutils/command/build_ext.pyo

�
Ɣ�dc@s/dZdZddlZddlZddlZddlZddlTddlmZm	Z	ddl
mZddlTddl
mZmZddlmZdd	lmZdd
lmZddlmZejdkr�dd
lmZee��Znejd�Zd�Zdefd��YZ dS(s�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).s$Id$i����N(t*(t	USER_BASEt	USER_SITE(tCommand(tcustomize_compilertget_python_version(tnewer_group(t	Extension(tget_platform(tlogtnt(tget_build_versions3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS(Ni����(tshow_compilers(tdistutils.ccompilerR(R((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR st	build_extcBs?eZdZdejZdFdGdd	d
e�fddd
dfdddefdHdIdJdddefdKdLdMdNdOdQdRdSdTgZdd$d'd-d3gZ	d5dPd6e
fgZd7�Zd8�Z
d9�Zd:�Zd;�Zd<�Zd=�Zd>�Zd?�Zd@�ZdA�ZdB�ZdC�ZdD�ZdE�ZRS(Us8build C/C++ extensions (compile/link to build directory)s (separated by '%s')s
build-lib=tbs(directory for compiled extension modulessbuild-temp=tts1directory for temporary files (build by-products)s
plat-name=tps>platform name to cross-compile for, if supported (default: %s)tinplacetis=ignore build-lib and put compiled extensions into the source s,directory alongside your pure Python moduless
include-dirs=tIs.list of directories to search for header filessdefine=tDsC preprocessor macros to definesundef=tUs!C preprocessor macros to undefines
libraries=tls!external C libraries to link withs
library-dirs=tLs.directories to search for external C librariessrpath=tRs7directories to search for shared C libraries at runtimes
link-objects=tOs2extra explicit link objects to include in the linktdebugtgs'compile/link with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)s	compiler=tcsspecify the compiler typesswig-cpps)make SWIG create C++ files (default is C)s
swig-opts=s!list of SWIG command line optionssswig=spath to the SWIG executabletusers#add user include, library and rpaths
help-compilerslist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS(Ni(tNonet
extensionst	build_libt	plat_namet
build_tempRtpackagetinclude_dirstdefinetundeft	librariestlibrary_dirstrpathtlink_objectsRRtcompilertswigtswig_cppt	swig_optsR (tself((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pytinitialize_optionsls(																			c	Cs�ddlm}|jdd/d0d1d2d3d4�|jdkrP|jj|_n|jj|_|j	�}|j	d
d�}|j
dkr�|jj
p�g|_
nt|j
t�r�|j
j
tj�|_
n|j
j|�||kr|j
j|�n|jd�|jd
�|jdkr5g|_n|jdkrPg|_n3t|j�tkr�tj
|jtj�|_n|jdkr�g|_n3t|j�tkr�tj
|jtj�|_ntjdkr�|jjd�r�|jjtjjtjd��|jr<tjj|j d�|_ ntjj|j d�|_ |j
jtjjtjd��t!dkr
|jdkr�d}n
|jd}x�d5d6fD]L}tjjtj|�}|r�tjj||�}n|jj|�q�Wq�t!dkr>|jjtjjtjdd��q�t!dkrr|jjtjjtjdd��q�|jjtjjtjdd��ntjdkr�|jjtjjtjd ��ntj"d! d"kstj"d! d#ks|jjd�r�tj#jtjjtjd$��rwtjj$|j%d%��}|jjtjjtj&d&d't'�|��q�|jjd(�n|j%d)�r�|j(s�|jj|j%d*��q�|jjd(�n|j)r|j)j
d+�}t*d,�|�|_)n|j+r%|j+j
d+�|_+n|j,dkr@g|_,n|j,j
d-�|_,|j-r�tjjt.d.�}	tjjt.d&�}
tjj/|	�r�|j
j|	�ntjj/|
�r�|jj|
�|jj|
�q�ndS(7Ni����(t	sysconfigtbuildR#R%R.RRR$t
plat_specificiR*R-R
tmingwtlibstDebugtReleasetPCi	twin32titPCbuildsVS9.0isVS8.0isVS7.1tVC6tos2tConfigitcygwintatheostbintLIBPLtlibtpythont.tPy_ENABLE_SHAREDtLIBDIRt,cSs
|dfS(Nt1((tsymbol((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyt<lambda>R=t tinclude(R#R#(R%R%(R.R.(RR(RR(R$R$(R>(R;sVS9.0(0t	distutilsR4tset_undefined_optionsR&R!tdistributiontext_packagetext_modulesR"tget_python_incR't
isinstancetstrtsplittostpathseptappendtensure_string_listR*R+ttypet
StringTypetstringR,tnameR$t
startswithtpathtjointsystexec_prefixRR%tMSVC_VERSIONtplatformt
executabletbasenametget_config_vartprefixRtpython_buildR(tmapR)R1R Rtisdir(R2R4t
py_includetplat_py_includetsuffixtdtnew_libtconfig_dir_nametdefinestuser_includetuser_lib((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pytfinalize_options�s�	

""	"	
%8$

				c	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����(tnew_compilert
build_clibR.tverbosetdry_runRR
($R
RzR"RSthas_c_librariestget_finalized_commandR*textendtget_library_namesR+R\R{R.R|R}RRRZRaR$Rt
initializeR'R!tset_include_dirsR(tdefine_macroR)tundefine_macrot
set_librariestset_library_dirsR,tset_runtime_library_dirsR-tset_link_objectstbuild_extensions(R2RzR{Ratvaluetmacro((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pytruns>			
!c
Cs!t|t�std�nx�t|�D]�\}}t|t�rIq(nt|t�skt|�dkrwtd�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|krYtjd�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(s�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.
        s:'ext_modules' option must be a list of Extension instancesisMeach element of 'ext_modules' option must be an Extension instance or 2-tuplesvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancesRfirst element of each tuple in 'ext_modules' must be the extension name (a string)sOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)tsourcesR'R+R*t
extra_objectstextra_compile_argstextra_link_argsR,tdef_files9'def_file' element of build info dict no longer supportedtmacrosis9'macros' element of build info dict must be 1- or 2-tupleiN(R'R+R*R�R�R�(ii(RWtlisttDistutilsSetupErrort	enumerateRttupletlenR	twarnRXtextension_name_retmatchtdicttgetR!tsetattrtruntime_library_dirst
define_macrostundef_macrosR\(
R2R"Rtexttext_namet
build_infotkeytvalR�R�((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pytcheck_extensions_listWsT
	"				
		
!	cCs>|j|j�g}x!|jD]}|j|j�q W|S(N(R�R"R�R�(R2t	filenamesR�((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pytget_source_files�s
cCsG|j|j�g}x*|jD]}|j|j|j��q W|S(N(R�R"R\tget_ext_fullpathRa(R2toutputsR�((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pytget_outputs�s
cCs5|j|j�x|jD]}|j|�qWdS(N(R�R"tbuild_extension(R2R�((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR��sc
Cs�|j}|dks-t|�ttfkrHtddd|j�nt|�}|j|j�}||j	}|j
p�t||d�s�tj
d|j�dStjd|j�|j||�}|jp�g}|j}x!|jD]}|j|f�q�W|jj|d|jd|d	|jd
|j
d|d|j	�}||_|jro|j|j�n|jp{g}|jp�|jj|�}	|jj||d
|j|�d|j d|j!d|d|j"|�d
|j
d|jd|	�dS(Ns*in 'ext_modules' option (extension '%s'), s&'sources' must be present and must be sa list of source filenamestnewers$skipping '%s' extension (up-to-date)sbuilding '%s' extensiont
output_dirR�R'Rtextra_postargstdependsR*R+R�texport_symbolsR%ttarget_lang(#R�R!R^tListTypet	TupleTypeR�RaR�R�R�RRR	Rtinfotswig_sourcesR�R�R�R\R.tcompileR%R't_built_objectsR�R�R�tlanguagetdetect_languagetlink_shared_objectt
get_librariesR+R�tget_export_symbols(
R2R�R�text_pathR�t
extra_argsR�R)tobjectsR�((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR��sN	$

			
							cCs�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(s�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.
        s/--swig-cpp is deprecated - use --swig-opts=-c++s-c++s.cpps.cs.it_wrapi����s-pythonsswigging %s to %ss-o(
R0R	R�R1RZRctsplitextR\R/t	find_swigR�R�tspawn(R2R�t	extensiontnew_sourcesR�tswig_targetst
target_exttsourcetbaseR�R/tswig_cmdtottarget((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR�s>		

		

cCs�tjdkrdStjdkrixgdD]5}tjjd|d�}tjj|�r)|Sq)WdSn#tjd	kr|dStd
tj�dS(
s�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.
        tposixR/R
s1.3s1.2s1.1s	c:\swig%ssswig.exeR@s>I don't know how to find (much less run) SWIG on platform '%s'N(s1.3s1.2s1.1(RZRaRcRdtisfiletDistutilsPlatformError(R2tverstfn((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR�Qs
c	Cs�tjdtjd�}|j|�}|j|�}|jd�}|j|�}tjj|�d}|j	s�tjj
|d |g�}tjj
|j|�Sdj
|dd!�}|jd�}tjj
|j|��}tjj
||�S(s�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        t/s..RHi����itbuild_py(R`t	maketransRZtsept	translatetget_ext_fullnameRYtget_ext_filenameRcRRdR#Rtabspathtget_package_dir(	R2R�tall_dotstfullnametmodpathtfilenameR&R�tpackage_dir((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR�rs	cCs&|jdkr|S|jd|SdS(sSReturns the fullname of a given extension name.

        Adds the `package.` prefixRHN(R&R!(R2R�((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR��scCs�ddlm}tj|d�}tjdkrZ|t|�dd |t|�d<n|d�}tjdkr�|jr�tjj	|�d	|Stjj	|�|S(
s�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����(RkRHR@iitSOR
t_d(
tdistutils.sysconfigRkR`RYRZRaR�RRcRd(R2R�RkR�tso_ext((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR��s)cCsCd|jjd�d}||jkr<|jj|�n|jS(sReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "init" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "init" function.
        tinitRHi����(RaRYR�R\(R2R�t
initfunc_name((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR��scCs�|jjd�r�ddlm}g}xS|jd�j�|jd�j�D])}|jd�rQ|j|d�qQqQW|j|Stj	dkrdd	l
m}t|j
|�sd
}|jr�|d}n|tjd?tjd
?d@f}|j|gS|jSn�tj	dkrUd
}|tjd?tjd
?d@f}|j|gStj	d dkrddlm}d}|tjd?tjd
?d@f}g}xM|jd�j�D]6}|jd�r�|j|d�q�|j|�q�W|j|dg|Stj	dkr!|jStj	d dkr;|jSddlm}|jd�r�d}|tjd?tjd
?d@f}|j|gS|jSdS(s�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).
        R7i����(R4t
BLDLIBRARYtSHLIBSs-liR<(tMSVCCompilers
python%d%dR�iii�tos2emxiRCspython%d.%dtmtdarwinitaixRIN(R$RbRQR4RkRYR\R*ReRhtdistutils.msvccompilerR�RWR.Rt
hexversion(R2R�R4textraRFR�ttemplatet	pythonlib((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR��s\
	

(s
build-lib=Rs(directory for compiled extension modules(sbuild-temp=Rs1directory for temporary files (build by-products)(sdefine=RsC preprocessor macros to define(sundef=Rs!C preprocessor macros to undefine(s
libraries=Rs!external C libraries to link with(srpath=Rs7directories to search for shared C libraries at runtime(s
link-objects=Rs2extra explicit link objects to include in the link(RRs'compile/link with debugging information(RRs2forcibly build everything (ignore file timestamps)(s	compiler=Rsspecify the compiler typeN(sswig-cppNs)make SWIG create C++ files (default is C)(s
swig-opts=Ns!list of SWIG command line options(sswig=Nspath to the SWIG executable(R Ns#add user include, library and rpath(t__name__t
__module__tdescriptionRZR[tsep_byRR!tuser_optionstboolean_optionsRthelp_optionsR3RyR�R�R�R�R�R�R�R�R�R�R�R�R�(((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyR%st



			�	@	N	
			S	:	!	 				(!t__doc__t__revision__ReRZR`trettypestsiteRRtdistutils.coreRtdistutils.errorsR�RRtdistutils.dep_utilRtdistutils.extensionRtdistutils.utilRRQR	RaR�RtintRgR�R�RR(((s@D:/a/msys64/mingw64/lib/python2.7/distutils/command/build_ext.pyt<module>s$0