AlkantarClanX12

Your IP : 13.59.2.242


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

�
��f@wc@s�dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dkoej"d'kZ#e#r!d
Z$dZ%dZ&nd
Z$dZ%dZ&idd6dd6dd6Z'Gdd�d�Z(Gdd�d�Z)dd�Z*dd�Z+dd�Z,dd �Z-dd!d"�Z.e*�Z/e/d#kr�ed$e/��nGd%d&�d&e�Z0dS((udistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
iN(uDistutilsExecErroruDistutilsPlatformErroruCompileErroruLibErroru	LinkError(u	CCompilerugen_preprocess_optionsugen_lib_options(ulog(uget_platformuwin32ii u1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fu5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsu,Software\Wow6432Node\Microsoft\.NETFrameworku%Software\Microsoft\VisualStudio\%0.1fu)Software\Microsoft\Microsoft SDKs\Windowsu Software\Microsoft\.NETFrameworkux86uamd64u	win-amd64uia64uwin-ia64cBsz|EeZdZdZdd�Zee�Zdd�Zee�Zdd�Zee�Zdd	�Ze	e�Zd
S(uRegu2Helper class to read values from the registry
    cCsMx:tD]2}|j||�}|r||kr||SqWt|��dS(N(uHKEYSuread_valuesuKeyError(uclsupathukeyubaseud((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu	get_valueAs

u
Reg.get_valuecCs�yt||�}Wntk
r+dSYnXg}d}xCyt||�}Wntk
rcPYnX|j|�|d7}q;|S(uReturn list of registry keys.iiN(uRegOpenKeyExuRegErroruNoneu
RegEnumKeyuappend(uclsubaseukeyuhandleuLuiuk((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu	read_keysIs
	


u
Reg.read_keysc	Cs�yt||�}Wntk
r+dSYnXi}d}xgyt||�\}}}Wntk
rlPYnX|j�}|j|�||j|�<|d7}q;|S(u`Return dict of registry keys and values.

        All names are converted to lowercase.
        iiN(uRegOpenKeyExuRegErroruNoneuRegEnumValueuloweruconvert_mbcs(	uclsubaseukeyuhandleuduiunameuvalueutype((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuread_values[s
	

uReg.read_valuescCsJt|dd�}|dk	rFy|d�}WqFtk
rBYqFXn|S(Nudecodeumbcs(ugetattruNoneuUnicodeError(usudec((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuconvert_mbcsqs
uReg.convert_mbcsN(
u__name__u
__module__u__qualname__u__doc__u	get_valueuclassmethodu	read_keysuread_valuesuconvert_mbcsustaticmethod(u
__locals__((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuReg=suRegcBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
u
MacroExpandercCs'i|_t||_|j|�dS(N(umacrosuVS_BASEuvsbaseuload_macros(uselfuversion((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu__init__}s	
uMacroExpander.__init__cCs!tj||�|jd|<dS(Nu$(%s)(uRegu	get_valueumacros(uselfumacroupathukey((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu	set_macro�suMacroExpander.set_macrocCsT|jd|jdd�|jd|jdd�|jdtd�y2|dkrl|jd	td
�ntd
��Wntk
r�td��YnX|dkr�|jd
|jd�|jdtd�n~d}xutD]m}yt||�}Wntk
rw�YnXt	|d�}t
j|d||f�}|d|jd<q�WdS(NuVCInstallDiru	\Setup\VCu
productdiruVSInstallDiru	\Setup\VSuFrameworkDiruinstallrootg @uFrameworkSDKDirusdkinstallrootv2.0uPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@uFrameworkVersionuclr versionu
WindowsSdkDirucurrentinstallfolderu.Software\Microsoft\NET Framework Setup\Productiu%s\%suversionu$(FrameworkVersion)(
u	set_macrouvsbaseuNET_BASEuKeyErroruDistutilsPlatformErroruWINSDK_BASEuHKEYSuRegOpenKeyExuRegErroru
RegEnumKeyuRegu	get_valueumacros(uselfuversionupubaseuhukeyud((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuload_macros�s.



uMacroExpander.load_macroscCs6x/|jj�D]\}}|j||�}qW|S(N(umacrosuitemsureplace(uselfusukuv((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyusub�suMacroExpander.subN(u__name__u
__module__u__qualname__u__init__u	set_macrouload_macrosusub(u
__locals__((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu
MacroExpander{su
MacroExpandercCs�d}tjj|�}|d
kr(dS|t|�}tj|d�jdd�\}}t|dd��d}t|dd��d}|dkr�d	}n|dkr�||SdS(u�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    uMSC v.iiNu iig$@ii����i����(usysuversionufindulenusplituintuNone(uprefixuiusurestumajorVersionuminorVersion((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuget_build_version�s%	uget_build_versioncCsIg}x<|D]4}tjj|�}||kr
|j|�q
q
W|S(unReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    (uosupathunormpathuappend(upathsu
reduced_pathsupunp((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyunormalize_and_reduce_paths�s
unormalize_and_reduce_pathscCs[|jtj�}g}x*|D]"}||kr|j|�qqWtjj|�}|S(u8Remove duplicate values of an environment variable.
    (usplituosupathsepuappendujoin(uvariableuoldListunewListuiunewVariable((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuremoveDuplicates�s
uremoveDuplicatescCsat|}ytjd|d�}Wn%tk
rKtjd�d}YnX|sftjj	|�rd|}tj
j|d�}|r�tjj	|�r�tjj|tj
tj
d�}tjj|�}tjj	|�stjd|�dSqtjd|�n|s%tjd�dStjj|d	�}tjj|�rP|Stjd
�dS(u�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    u%s\Setup\VCu
productdiru%Unable to find productdir in registryuVS%0.f0COMNTOOLSuVCu%s is not a valid directoryu Env var %s is not set or invaliduNo productdir foundu
vcvarsall.batuUnable to find vcvarsall.batN(uVS_BASEuRegu	get_valueuKeyErrorulogudebuguNoneuosupathuisdiruenvironugetujoinupardiruabspathuisfile(uversionuvsbaseu
productdirutoolskeyutoolsdiru	vcvarsall((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyufind_vcvarsall�s2





!

ufind_vcvarsallcCs�t|�}td�}i}|dkr9td��ntjd||�tjd||fdtjd	tj�}z�|j	�\}}|j
�d
kr�t|jd���n|jd�}x�|jd�D]�}t
j|�}d
|kr�q�n|j�}|jd
d�\}	}
|	j�}	|	|kr�|
jtj�r]|
dd�}
nt|
�||	<q�q�WWd|jj�|jj�Xt|�t|�kr�ttt|j�����n|S(uDLaunch vcvarsall.bat and read the settings from its environment
    uincludeulibulibpathupathuUnable to find vcvarsall.batu'Calling 'vcvarsall.bat %s' (version=%s)u
"%s" %s & setustdoutustderriumbcsu
u=iN(uincludeulibulibpathupathi����(ufind_vcvarsallusetuNoneuDistutilsPlatformErrorulogudebugu
subprocessuPopenuPIPEucommunicateuwaitudecodeusplituReguconvert_mbcsustripuloweruendswithuosupathsepuremoveDuplicatesustdoutucloseustderrulenu
ValueErrorustrulistukeys(uversionuarchu	vcvarsalluinterestinguresultupopenustdoutustderrulineukeyuvalue((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuquery_vcvarsall�s<	
!uquery_vcvarsallg @u(VC %0.1f is not supported by this modulecBs�|EeZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZddddd�Zd-dd�Zdddd�Zd-d-d-dd-d-d-dd�Zd-dd-dd�Zd-d-d-d-d-dd-d-d-d-dd�
Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zdd)d*�Zd+d,�Z d-S(.uMSVCCompileruwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.umsvcu.cu.ccu.cppu.cxxu.rcu.mcu.resu.obju.libu.dllu%s%su.exeicCsPtj||||�t|_d|_g|_d|_d|_d|_
dS(NuSoftware\Microsoft\VisualStudioF(u	CCompileru__init__uVERSIONu_MSVCCompiler__versionu_MSVCCompiler__rootu_MSVCCompiler__pathsuNoneu	plat_nameu_MSVCCompiler__archuFalseuinitialized(uselfuverboseudry_runuforce((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu__init__Gs					uMSVCCompiler.__init__cCs�|dkrt�}nd$}||kr@td|f��ndtjkr�dtjkr�|jd�r�d|_d|_d	|_d
|_	d|_
n|t�ks�|dkr�t|}ntt�dt|}tt
|�}|d
jtj�|_|dtjd<|dtjd<t|j�dkrStd|j��n|jd�|_|jd�|_|jd	�|_|jd
�|_	|jd�|_
y5x.tjd
jd�D]}|jj|�q�WWntk
r�YnXt|j�|_dj|j�tjd
<d|_|jdkrpdddddg|_ddddddg|_n9ddddddg|_dddddddg|_dddg|_|jd kr�ddd!d"d#g|_ndg|_d%|_ dS(&Nuwin32u	win-amd64uwin-ia64u--plat-name must be one of %suDISTUTILS_USE_SDKuMSSdkucl.exeulink.exeulib.exeurc.exeumc.exeu_upathulibuincludeiuxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.u;ux86u/nologou/Oxu/MDu/W3u/DNDEBUGu/Odu/MDdu/Z7u/D_DEBUGu/GS-u/DLLu/INCREMENTAL:NOiu/INCREMENTAL:nou/DEBUGu	/pdb:None(uwin32u	win-amd64uwin-ia64T(!uNoneuget_platformuDistutilsPlatformErroruosuenvironufind_exeucculinkeruliburcumcuPLAT_TO_VCVARSuquery_vcvarsalluVERSIONusplitupathsepu_MSVCCompiler__pathsulenu_MSVCCompiler__productuappenduKeyErrorunormalize_and_reduce_pathsujoinupreprocess_optionsu_MSVCCompiler__archucompile_optionsucompile_options_debuguldflags_sharedu_MSVCCompiler__versionuldflags_shared_debuguldflags_staticuTrueuinitialized(uselfu	plat_nameuok_platsu	plat_specuvc_envup((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu
initializeRsd-				

	uMSVCCompiler.initializeucCsD|dkrd}ng}x"|D]}tjj|�\}}tjj|�d}|tjj|�d�}||jkr�td|��n|r�tjj|�}n||j	kr�|j
tjj|||j��q"||j
kr|j
tjj|||j��q"|j
tjj|||j��q"W|S(NuiuDon't know how to compile %s(uNoneuosupathusplitextu
splitdriveuisabsusrc_extensionsuCompileErrorubasenameu_rc_extensionsuappendujoinu
res_extensionu_mc_extensionsu
obj_extension(uselfusource_filenamesu	strip_diru
output_diru	obj_namesusrc_nameubaseuext((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuobject_filenames�s(	
uMSVCCompiler.object_filenamesc	Cs|js|j�n|j||||||�}	|	\}}
}}}|pRg}
|
jd�|r{|
j|j�n|
j|j�x�|
D]�}y||\}}Wntk
r�w�YnX|r�tj	j
|�}n||jkr�d|}n�||jkrd|}n�||j
kr�|}d|}y)|j|jg||g|g�Wq�tk
r�}zt|��WYdd}~Xq�Xq�n||jkr�tj	j|�}tj	j|�}y�|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wq�tk
r�}zt|��WYdd}~Xq�Xq�ntd||f��d	|}y-|j|jg|
|||g|�Wq�tk
r}zt|��WYdd}~Xq�Xq�W|
S(
Nu/cu/Tcu/Tpu/fou-hu-ru.rcu"Don't know how to compile %s to %su/Fo(uinitializedu
initializeu_setup_compileuappenduextenducompile_options_debugucompile_optionsuKeyErroruosupathuabspathu
_c_extensionsu_cpp_extensionsu_rc_extensionsuspawnurcuDistutilsExecErroruCompileErroru_mc_extensionsudirnameumcusplitextubasenameujoinucc(uselfusourcesu
output_dirumacrosuinclude_dirsudebugu
extra_preargsuextra_postargsudependsucompile_infouobjectsupp_optsubuilducompile_optsuobjusrcuextu	input_optu
output_optumsguh_dirurc_dirubaseu_urc_file((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyucompile�sj	






#$$#
#uMSVCCompiler.compilec	Cs�|js|j�n|j||�\}}|j|d|�}|j||�r�|d|g}|rony|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS(Nu
output_diru/OUT:uskipping %s (up-to-date)(uinitializedu
initializeu_fix_object_argsulibrary_filenameu
_need_linkuspawnulibuDistutilsExecErroruLibErrorulogudebug(	uselfuobjectsuoutput_libnameu
output_dirudebugutarget_languoutput_filenameulib_argsumsg((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyucreate_static_libs	
	"uMSVCCompiler.create_static_libcCs.|js|j�n|j||�\}}|j|||�}|\}}}|rr|jdt|��nt||||�}|dk	r�tj	j
||�}n|j||�r|tj
kr�|	r�|jdd�}q|jdd�}n|	r|j}n	|j}g}x%|p+gD]}|jd|�q,W||||d|g}tj	j|d�}|dk	r�tj	jtj	j|��\}}tj	j
||j|��}|jd|�n|j|||�|
r|
|dd�<n|r|j|�n|jtj	j|��y|j|jg|�Wn1tk
r�}zt|��WYdd}~XnX|j||�}|dk	r*|\}}d||f}y |jdd	d
||g�Wqtk
r}zt|��WYdd}~XqXq*ntjd|�dS(Nu5I don't know what to do with 'runtime_library_dirs': iu/EXPORT:u/OUT:iu/IMPLIB:u-outputresource:%s;%sumt.exeu-nologou	-manifestuskipping %s (up-to-date)(uinitializedu
initializeu_fix_object_argsu
_fix_lib_argsuwarnustrugen_lib_optionsuNoneuosupathujoinu
_need_linku	CCompileru
EXECUTABLEuldflags_shared_debuguldflags_shareduappendudirnameusplitextubasenameulibrary_filenameumanifest_setup_ldargsuextendumkpathuspawnulinkeruDistutilsExecErroru	LinkErrorumanifest_get_embed_infoulogudebug(uselfutarget_descuobjectsuoutput_filenameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_langu
fixed_argsulib_optsuldflagsuexport_optsusymuld_argsudll_nameudll_extuimplib_fileumsgumfinfou
mffilenameumfiduout_arg((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyulink5sl	
						%uMSVCCompiler.linkcCs:tjj|tjj|�d�}|jd|�dS(Nu	.manifestu/MANIFESTFILE:(uosupathujoinubasenameuappend(uselfuoutput_filenameu
build_tempuld_argsu
temp_manifest((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyumanifest_setup_ldargs�s	u"MSVCCompiler.manifest_setup_ldargscCs�x;|D]/}|jd�r|jdd�d}PqqWdS|tjkrVd}nd}|j|�}|dkr{dS||fS(Nu/MANIFESTFILE:u:ii(u
startswithusplituNoneu	CCompileru
EXECUTABLEu_remove_visual_c_ref(uselfutarget_desculd_argsuargu
temp_manifestumfid((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyumanifest_get_embed_info�s
	u$MSVCCompiler.manifest_get_embed_infocCs�y�t|�}z|j�}Wd|j�Xtjdtj�}tj|d|�}d}tj|d|�}tjdtj�}tj||�dkr�dSt|d�}z|j	|�|SWd|j�XWnt
k
r�YnXdS(NuU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)uu*<dependentAssembly>\s*</dependentAssembly>uI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)uw(uopenureaducloseureucompileuDOTALLusubusearchuNoneuwriteuIOError(uselfu
manifest_fileu
manifest_fumanifest_bufupattern((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu_remove_visual_c_ref�s.	

u!MSVCCompiler._remove_visual_c_refcCsd|S(Nu	/LIBPATH:((uselfudir((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyulibrary_dir_option�suMSVCCompiler.library_dir_optioncCstd��dS(Nu<don't know how to set runtime library search path for MSVC++(uDistutilsPlatformError(uselfudir((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuruntime_library_dir_option�su'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S(N(ulibrary_filename(uselfulib((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyulibrary_option�suMSVCCompiler.library_optioncCs�|r|d|g}n	|g}xW|D]K}xB|D]:}tjj||j|��}tjj|�r6|Sq6Wq)WdSdS(Nu_d(uosupathujoinulibrary_filenameuexistsuNone(uselfudirsulibudebugu	try_namesudirunameulibfile((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyufind_library_file�s	

uMSVCCompiler.find_library_filecCs�xH|jD]=}tjjtjj|�|�}tjj|�r
|Sq
WxUtjdjd�D]=}tjjtjj|�|�}tjj|�rb|SqbW|S(u�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        uPathu;(u_MSVCCompiler__pathsuosupathujoinuabspathuisfileuenvironusplit(uselfuexeupufn((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyufind_exes	!!uMSVCCompiler.find_exeN(!u__name__u
__module__u__qualname__u__doc__u
compiler_typeuexecutablesu
_c_extensionsu_cpp_extensionsu_rc_extensionsu_mc_extensionsusrc_extensionsu
res_extensionu
obj_extensionustatic_lib_extensionushared_lib_extensionustatic_lib_formatushared_lib_formatu
exe_extensionu__init__uNoneu
initializeuobject_filenamesucompileucreate_static_libulinkumanifest_setup_ldargsumanifest_get_embed_infou_remove_visual_c_refulibrary_dir_optionuruntime_library_dir_optionulibrary_optionufind_library_fileufind_exe(u
__locals__((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyuMSVCCompiler)sR			
XVR+uMSVCCompilerl(1u__doc__uosu
subprocessusysureudistutils.errorsuDistutilsExecErroruDistutilsPlatformErroruCompileErroruLibErroru	LinkErrorudistutils.ccompileru	CCompilerugen_preprocess_optionsugen_lib_optionsu	distutilsulogudistutils.utiluget_platformuwinregu	OpenKeyExuRegOpenKeyExuEnumKeyu
RegEnumKeyu	EnumValueuRegEnumValueuerroruRegErroru
HKEY_USERSuHKEY_CURRENT_USERuHKEY_LOCAL_MACHINEuHKEY_CLASSES_ROOTuHKEYSuplatformumaxsizeuNATIVE_WIN64uVS_BASEuWINSDK_BASEuNET_BASEuPLAT_TO_VCVARSuRegu
MacroExpanderuget_build_versionunormalize_and_reduce_pathsuremoveDuplicatesufind_vcvarsalluquery_vcvarsalluVERSIONuMSVCCompiler(((u</opt/alt/python33/lib64/python3.3/distutils/msvc9compiler.pyu<module>sP(					
>.#)