b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / distutils /
Filename/usr/lib64/python2.6/distutils/msvc9compiler.pyc
Size20.02 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed20-Jun-2019 19:45
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc
@sñdZdZddkZddkZddkZddkZddklZlZl Z l
Z
l Z ddk l
Z
lZlZddklZddklZddkZeiZeiZeiZeiZeieieiei fZ!ei"djo
ei#d#jZ$e$od Z%d Z&d
Z'ndZ%dZ&dZ'hdd6dd6dd6Z(dd$d��YZ)dd%d��YZ*d�Z+d�Z,d�Z-d�Z.dd�Z/e+�Z0e0djoed e0��nd!e
fd"��YZ1dS(&s 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.
sD$Id: msvc9compiler.py 82132 2010-06-21 15:39:28Z benjamin.peterson $iÿÿÿÿN(tDistutilsExecErrortDistutilsPlatformErrort CompileErrortLibErrort LinkError(t CCompilertgen_preprocess_optionstgen_lib_options(tlog(t get_platformtwin32ii s1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fs5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowss,Software\Wow6432Node\Microsoft\.NETFrameworks%Software\Microsoft\VisualStudio\%0.1fs)Software\Microsoft\Microsoft SDKs\Windowss Software\Microsoft\.NETFrameworktx86tamd64s win-amd64tia64swin-ia64tRegcBsJeZdZed��Zed��Zed��Zed��ZRS(s2Helper class to read values from the registry
cCsPx=tD]5}|i||�}|o||jo ||SqWt|��dS(N(tHKEYSt read_valuestKeyError(tclstpathtkeytbasetd((s//usr/lib64/python2.6/distutils/msvc9compiler.pyt get_valueBs 
c Cs�yt||�}Wntj
odSXg}d}xMtoEyt||�}Wntj
oPnX|i|�|d7}q9W|S(sReturn list of registry keys.iiN(t RegOpenKeyExtRegErrortNonetTruet
RegEnumKeytappend(RRRthandletLtitk((s//usr/lib64/python2.6/distutils/msvc9compiler.pyt read_keysJs
c
Cs®yt||�}Wntj
odSXh}d}xqtoiyt||�\}}}Wntj
oPnX|i�}|i|�||i|�<|d7}q9W|S(s`Return dict of registry keys and values.

All names are converted to lowercase.
iiN(RRRRt RegEnumValuetlowert convert_mbcs( RRRRRR tnametvaluettype((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR\s  cCsMt|dd�}|dj o*y|d�}WqItj
oqIXn|S(Ntdecodetmbcs(tgetattrRt UnicodeError(tstdec((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR%rs
 ( t__name__t
__module__t__doc__t classmethodRR"Rt staticmethodR%(((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR>s
t
MacroExpandercBs,eZd�Zd�Zd�Zd�ZRS(cCs'h|_t||_|i|�dS(N(tmacrostVS_BASEtvsbaset load_macros(tselftversion((s//usr/lib64/python2.6/distutils/msvc9compiler.pyt__init__~s 
cCs!ti||�|id|<dS(Ns$(%s)(RRR5(R9tmacroRR((s//usr/lib64/python2.6/distutils/msvc9compiler.pyt set_macro�sc Cs\|id|idd�|id|idd�|idtd�y4|djo|id td
�n
td
��Wn!tj
o}td ��nX|d jo-|id
|id�|idtd�n�d}xvtD]n}yt||�}Wntj
o
qænXt |d�}t
i |d||f�}|d|i d<qæWdS(Nt VCInstallDirs \Setup\VCt
productdirt VSInstallDirs \Setup\VSt FrameworkDirt installrootg @tFrameworkSDKDirssdkinstallrootv2.0sPython 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"@tFrameworkVersions clr versiont
WindowsSdkDirtcurrentinstallfolders.Software\Microsoft\NET Framework Setup\Productis%s\%sR:s$(FrameworkVersion)(
R=R7tNET_BASERRt WINSDK_BASERRRRRRR5(R9R:texctpRthRR((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR8�s0
  
cCs6x/|ii�D]\}}|i||�}qW|S(N(R5titemstreplace(R9R-R!tv((s//usr/lib64/python2.6/distutils/msvc9compiler.pytsub¥s (R/R0R;R=R8RO(((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR4|s   cCsµd}tii|�}|djodS|t|�}ti|idd�\}}t|d �d}t|dd!�d }|djo
d
}n|djo ||Sd S( sÃ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.
sMSC v.iÿÿÿÿit iiþÿÿÿiig$@iN(tsysR:tfindtlentsplittintR(tprefixR R-trestt majorVersiont minorVersion((s//usr/lib64/python2.6/distutils/msvc9compiler.pytget_build_versionªs



 cCsKg}x>|D]6}tii|�}||jo|i|�q
q
W|S(snReturn a list of normalized paths with duplicates removed.

The current order of paths is maintained.
(tosRtnormpathR(tpathst
reduced_pathsRJtnp((s//usr/lib64/python2.6/distutils/msvc9compiler.pytnormalize_and_reduce_pathsÀs
cCs]|iti�}g}x,|D]$}||jo|i|�qqWtii|�}|S(s8Remove duplicate values of an environment variable.
(RTR[tpathsepRtjoin(tvariabletoldListtnewListR t newVariable((s//usr/lib64/python2.6/distutils/msvc9compiler.pytremoveDuplicatesÎs
cCsnt|}ytid|d�}Wn&tj
otid�d }nX| ptii |� o®d|}ti
i |d �}|ostii |�o`tii |ti
ti
d�}tii|�}tii |�ptid|�d Sqtid|�n|ptid�d Stii |d �}tii|�o|Stid
�d S( s¨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.
s %s\Setup\VCR?s%Unable to find productdir in registrysVS%0.f0COMNTOOLStVCs%s is not a valid directorys Env var %s is not set or invalidsNo productdir founds
vcvarsall.batsUnable to find vcvarsall.batN(R6RRRRtdebugRR[RtisdirtenvirontgetRbtpardirtabspathtisfile(R:R7R?ttoolskeyttoolsdirt vcvarsall((s//usr/lib64/python2.6/distutils/msvc9compiler.pytfind_vcvarsallÙs2



 
! 

c Cs´t|�}td�}h}|djotd��ntid||�tid||fdtid ti�}|i �\}}|i
�d
jot|i d ���n|i d �}x¬|i d �D]�}t
i|�}d
|joqÖn|i�}|i d
d�\} }
| i�} | |jo5|
iti�o|
d }
nt|
�|| <qÖqÖWt|�t|�jo"ttt|i�����n|S(sDLaunch vcvarsall.bat and read the settings from its environment
tincludetlibtlibpathRsUnable to find vcvarsall.bats'Calling 'vcvarsall.bat %s' (version=%s)s
"%s" %s & settstdouttstderriR*s
t=iiÿÿÿÿ(RtslibslibpathspathN(RstsetRRRRit
subprocesstPopentPIPEt communicatetwaitR)RTRR%tstripR$tendswithR[RaRgRSt
ValueErrortstrtlisttkeys( R:tarchRrt interestingtresulttpopenRwRxtlineRR'((s//usr/lib64/python2.6/distutils/msvc9compiler.pytquery_vcvarsallüs8  
  
  
"g @s(VC %0.1f is not supported by this modulet MSVCCompilerc Bs2eZdZdZhZdgZdddgZdgZdgZeeeeZ dZ
d Z d
Z d Z
d ZZd
Zdddd�Zdd�Zddd�Zdddddddd�Zdddd�Zddddddddddd�
Zd�Zd�Zd�Zdd�Zd�ZRS(swConcrete class that implements an interface to Microsoft Visual C++,
as defined by the CCompiler abstract class.tmsvcs.cs.ccs.cpps.cxxs.rcs.mcs.ress.objs.libs.dlls%s%ss.exeicCsPti||||�t|_d|_g|_d|_d|_t |_
dS(NsSoftware\Microsoft\VisualStudio( RR;tVERSIONt_MSVCCompiler__versiont_MSVCCompiler__roott_MSVCCompiler__pathsRt plat_namet_MSVCCompiler__archtFalset initialized(R9tverbosetdry_runtforce((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR;Ds     c Cs@|i p
td�|djo
t�}nd&}||jotd|f��ndtijoQdtijoA|id�o1d|_d |_ d
|_
d |_ d |_ n1|t�jp
|djot
|}nt
t�d
t
|}tt|�}|did�iti�|_|did�tid<|did�tid<t|i�djotd|i��n|id�|_|id �|_ |id
�|_
|id �|_ |id �|_ y5x.tidid�D]}|ii|�qWWntj
onXt|i�|_di|i�tid<d|_|idjo7dddddg|_ddddddg|_n:ddddddg|_dddddddg|_d dd!g|_|id"jod dd#d$d%g|_ ndg|_!t"|_dS('Nsdon't init multiple timesR
s win-amd64swin-ia64s--plat-name must be one of %stDISTUTILS_USE_SDKtMSSdkscl.exeslink.exeslib.exesrc.exesmc.exet_RR*RuRtisxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.t;R s/nologos/Oxs/MDs/W3s/DNDEBUGs/Ods/MDds/Z7s/D_DEBUGs/GS-s/DLLs/INCREMENTAL:NOis/INCREMENTAL:nos/DEBUGs /pdb:None(swin32s win-amd64swin-ia64(#R�tAssertionErrorRR RR[Rktfind_exetcctlinkerRutrctmctPLAT_TO_VCVARSR�R�tencodeRTRaR�RSt_MSVCCompiler__productRRR`Rbtpreprocess_optionsR�tcompile_optionstcompile_options_debugtldflags_sharedR�tldflags_shared_debugtldflags_staticR(R9R�tok_platst plat_spectvc_envRJ((s//usr/lib64/python2.6/distutils/msvc9compiler.pyt
initializeOsh


0    
 "      tcCsH|djo
d}ng}x$|D]}tii|�\}}tii|�d}|tii|�}||ijotd|��n|otii|�}n||i jo'|i
tii |||i ��q$||i
jo'|i
tii |||i ��q$|i
tii |||i��q$W|S(NR°isDon't know how to compile %s(RR[Rtsplitextt
splitdrivetisabstsrc_extensionsRtbasenamet_rc_extensionsRRbt
res_extensiont_mc_extensionst
obj_extension(R9tsource_filenamest strip_dirt
output_dirt obj_namestsrc_nameRtext((s//usr/lib64/python2.6/distutils/msvc9compiler.pytobject_filenames¦s*

c 
Csÿ|ip|i�n|i||||||�} | \}}
}} } |pg}
|
id�|o|
i|i�n|
i|i�xh|
D]`}y| |\}}Wntj
o
q�nX|oti i
|�}n||i jod|}n�||i jod|}nz||i
jod|}d|}y)|i|ig| |g|g�Wq�tj
o}t|��q�Xq�n||ijoßti i|�}ti i|�}y�|i|igd|d|g|g�ti iti i|��\}}ti i||d�}|i|igd|g|g�Wq�tj
o}t|��q�Xq�ntd||f��d |}y-|i|ig|
| ||g|�Wq�tj
o}t|��q�Xq�W|
S(
Ns/cs/Tcs/Tps/fos-hs-rs.rcs"Don't know how to compile %s to %ss/Fo(R�R¯t_setup_compileRtextendR¨R§RR[RRnt
_c_extensionst_cpp_extensionsR¶tspawnR¡RRR¸tdirnameR¢R±RµRbR�(R9tsourcesR¼R5t include_dirsRit
extra_preargstextra_postargstdependst compile_infotobjectstpp_optstbuildt compile_optstobjtsrcR¿t input_optt
output_opttmsgth_dirtrc_dirRR�trc_file((s//usr/lib64/python2.6/distutils/msvc9compiler.pytcompileÅsl



# $$#
 c CsË|ip|i�n|i||�\}}|i|d|�}|i||�o_|d|g}|ony|i|ig|�WqÇtj
o}t|��qÇXnt i
d|�dS(NR¼s/OUT:sskipping %s (up-to-date)( R�R¯t_fix_object_argstlibrary_filenamet
_need_linkRÅRuRRRRi( R9RÍtoutput_libnameR¼Rit target_langtoutput_filenametlib_argsRÕ((s//usr/lib64/python2.6/distutils/msvc9compiler.pytcreate_static_libs
  cCsÑ|ip|i�n|i||�\}}|i|||�}|\}}}|o|idt|��nt||||�}|dj oti i
||�}n|i ||�où|t i
jo)| o|id}q|id}n| o
|i}n
|i}g}x&|pgD]}|id|�q.W||||d|g}ti i|d�} |dj oWti iti i|��\}}ti i
| |i|��}|id|�nti i
| ti i|�d�}|id|�|
o|
|d*n| o|i| �n|iti i|��y|i|ig|�Wn!tj
o}t|��nX|t i
jo
d}n±d }y�t|d
�}|i�}|i�tid ti �}ti!|d |�}d
}ti!|d |�}t|d�}|i"|�|i�Wnt#j
onXd||f}y |iddd||g�WqÍtj
o}t|��qÍXnt$i%d|�dS(Ns5I don't know what to do with 'runtime_library_dirs': is/EXPORT:s/OUT:is/IMPLIB:s .manifests/MANIFESTFILE:itrbsU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)R°s*<dependentAssembly>\s*</dependentAssembly>twbs-outputresource:%s;%ssmt.exes-nologos -manifestsskipping %s (up-to-date)(&R�R¯RÚt
_fix_lib_argstwarnR�RRR[RRbRÜRt
EXECUTABLERªR©RRÆR±RµRÛRÂtmkpathRÅR RRtopentreadtclosetreRÙtDOTALLROtwritetIOErrorRRi(R9t target_descRÍRßR¼t librariest library_dirstruntime_library_dirstexport_symbolsRiRÉRÊt
build_tempRÞt
fixed_argstlib_optstldflagst export_optstsymtld_argstdll_nametdll_extt implib_filet
temp_manifestRÕtmfidt
manifest_ft manifest_buftpatterntout_arg((s//usr/lib64/python2.6/distutils/msvc9compiler.pytlink3s�
    

 
   
 
 
cCsd|S(Ns /LIBPATH:((R9tdir((s//usr/lib64/python2.6/distutils/msvc9compiler.pytlibrary_dir_option¶scCstd��dS(Ns<don't know how to set runtime library search path for MSVC++(R(R9R((s//usr/lib64/python2.6/distutils/msvc9compiler.pytruntime_library_dir_option¹scCs
|i|�S(N(RÛ(R9Ru((s//usr/lib64/python2.6/distutils/msvc9compiler.pytlibrary_option½scCs�|o|d|g}n
|g}xY|D]M}xD|D]<}tii||i|��}tii|�o|Sq8Wq+WdSdS(Nt_d(R[RRbRÛtexistsR(R9tdirsRuRit try_namesRR&tlibfile((s//usr/lib64/python2.6/distutils/msvc9compiler.pytfind_library_fileÁs 
cCs«xJ|iD]?}tiitii|�|�}tii|�o|Sq
WxWtidid�D]?}tiitii|�|�}tii|�o|SqdW|S(s�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'.
tPathR�(R�R[RRbRnRoRkRT(R9texeRJtfn((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR�Ós
! ! N(R/R0R1t
compiler_typet executablesRÃRÄR¶R¸R´R·R¹tstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR;RR¯RÀRÙRáRRRRRR�(((s//usr/lib64/python2.6/distutils/msvc9compiler.pyR�&sL   
 Y  V  v    I(((2R1t __revision__R[R{RQRëtdistutils.errorsRRRRRtdistutils.ccompilerRRRt distutilsRtdistutils.utilR t_winregt OpenKeyExRtEnumKeyRt EnumValueR#terrorRt
HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOTRtplatformtmaxsizet NATIVE_WIN64R6RHRGR£RR4RZR`RgRsR�R�R�(((s//usr/lib64/python2.6/distutils/msvc9compiler.pyt<module>sR    (      

>.   # %