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/msvccompiler.pyc
Size17.38 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 09:39
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@s"dZdZddkZddkZddkZddklZlZlZl Z l
Z
ddk l Z l
Z
lZddklZdZy@ddkZdZeZeiZeiZeiZeiZWn�ej
ovyLddkZddkZdZeZeiZeiZeiZeiZWn ej
oeid �nXnXeo"ei ei!ei"ei#fZ$nd
�Z%d �Z&d �Z'd
fd��YZ(d�Z)d�Z*d�Z+de fd��YZ,e)�djo7ei-d�e,Z.ddk/l,Z,ddk/l(Z(ndS(s�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
s>$Id: msvccompiler.py 62197 2008-04-07 01:53:39Z mark.hammond $iÿÿÿÿN(tDistutilsExecErrortDistutilsPlatformErrort CompileErrortLibErrort LinkError(t CCompilertgen_preprocess_optionstgen_lib_options(tlogiis�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules _winreg, win32api or win32con are installed.c Cs�yt||�}Wntj
odSXg}d}xDyt||�}Wntj
oPnX|i|�|d}q9|S(sReturn list of registry keys.iiN(t RegOpenKeyExtRegErrortNonet
RegEnumKeytappend(tbasetkeythandletLtitk((s./usr/lib64/python2.6/distutils/msvccompiler.pyt read_keys<s

c
Cs�yt||�}Wntj
odSXh}d}xbyt||�\}}}Wntj
oPnX|i�}t|�|t|�<|d}q9|S(sXReturn dict of registry keys and values.

All names are converted to lowercase.
iiN(R R
R t RegEnumValuetlowert convert_mbcs(RRRtdRtnametvaluettype((s./usr/lib64/python2.6/distutils/msvccompiler.pyt read_valuesNs 
cCsMt|dd�}|dj o*y|d�}WqItj
oqIXn|S(Ntencodetmbcs(tgetattrR t UnicodeError(tstenc((s./usr/lib64/python2.6/distutils/msvccompiler.pyRcs
 t
MacroExpandercBs,eZd�Zd�Zd�Zd�ZRS(cCsh|_|i|�dS(N(tmacrost load_macros(tselftversion((s./usr/lib64/python2.6/distutils/msvccompiler.pyt__init__ns cCsEx>tD]6}t||�}|o|||id|<PqqWdS(Ns$(%s)(tHKEYSRR$(R&tmacrotpathRRR((s./usr/lib64/python2.6/distutils/msvccompiler.pyt set_macrors c
Cs-d|}|id|dd�|id|dd�d}|id|d �y;|d
jo|id |d �n|id |d
�Wntj
o}td�nXd}xstD]k}yt||�}Wntj
o
qºnXt|d�}t|d||f�} | d|id<qºWdS(Ns%Software\Microsoft\VisualStudio\%0.1ft VCInstallDirs \Setup\VCt
productdirt VSInstallDirs \Setup\VSs Software\Microsoft\.NETFrameworkt FrameworkDirt installrootg@tFrameworkSDKDirssdkinstallrootv1.1tsdkinstallrootsPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.s.Software\Microsoft\NET Framework Setup\Productis%s\%sR's$(FrameworkVersion)( R,tKeyErrorRR)R R
R RR$(
R&R'tvsbasetnettexctpRthRR((s./usr/lib64/python2.6/distutils/msvccompiler.pyR%ys,

 cCs9x2|ii�D]!\}}ti|||�}qW|S(N(R$titemststringtreplace(R&R!Rtv((s./usr/lib64/python2.6/distutils/msvccompiler.pytsub�s (t__name__t
__module__R(R,R%R>(((s./usr/lib64/python2.6/distutils/msvccompiler.pyR#ls   cCs¸d}titi|�}|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(R;tfindtsysR'tlentsplittintR (tprefixRR!trestt majorVersiont minorVersion((s./usr/lib64/python2.6/distutils/msvccompiler.pytget_build_version�s



 cCs]d}titi|�}|djodStitid|�}ti|t|�|!S(saReturn the processor architecture.

Possible results are "Intel", "Itanium", or "AMD64".
s bit (iÿÿÿÿtIntelt)(R;RBRCR'RD(RGRtj((s./usr/lib64/python2.6/distutils/msvccompiler.pytget_build_architecture±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.
(tosR+tnormpathR
(tpathst
reduced_pathsR8tnp((s./usr/lib64/python2.6/distutils/msvccompiler.pytnormalize_and_reduce_paths¾s
t MSVCCompilerc BsDeZdZdZhZdgZdddgZdgZdgZeeeeZ dZ
d Z d
Z d Z
d ZZd
Zdddd�Zd�Zddd�Zdddddddd�Zdddd�Zddddddddddd�
Zd�Zd�Zd�Zdd�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.exeicCs«ti||||�t�|_t�|_|idjoL|idjod|_t|i�|_n
d|_d|i|_ nd|id|_ t
|_ dS(NRLisSoftware\Microsoft\VisualStudiosSoftware\Microsoft\DevstudiosVisual Studio version %ssMicrosoft SDK compiler %si( RR(RKt_MSVCCompiler__versionROt_MSVCCompiler__archt_MSVCCompiler__rootR#t_MSVCCompiler__macrost_MSVCCompiler__producttFalset initialized(R&tverbosetdry_runtforce((s./usr/lib64/python2.6/distutils/msvccompiler.pyR(ës    c Cs�g|_dtijoQdtijoA|id�o1d|_d|_d|_d|_d|_n±|i d�|_t
|i�d jot d
|i �n|id�|_|id�|_|id�|_|id�|_|id�|_|i
d �|i
d �y8x1titidd
�D]}|ii|�q7WWntj
onXt|i�|_ti|id
�tid<d|_|idjo=ddddddg|_dddddddg|_n:ddddddg|_dddddddg|_dddg|_|idjoddddg|_ndddddg|_dg|_t|_dS( NtDISTUTILS_USE_SDKtMSSdkscl.exeslink.exeslib.exesrc.exesmc.exeR+isxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.tlibtincludet;RLs/nologos/Oxs/MDs/W3s/GXs/DNDEBUGs/Ods/MDds/Z7s/D_DEBUGs/GS-s/DLLs/INCREMENTAL:NOis/INCREMENTAL:nos/DEBUGs /pdb:None(t_MSVCCompiler__pathsRPtenvirontfind_exetcctlinkerRdtrctmctget_msvc_pathsRDRR\tset_path_env_varR;RER
R4RUtjoinR tpreprocess_optionsRYtcompile_optionstcompile_options_debugtldflags_sharedRXtldflags_shared_debugtldflags_statictTrueR^(R&R8((s./usr/lib64/python2.6/distutils/msvccompiler.pyt
initializeýsV 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(NRyisDon't know how to compile %s(R RPR+tsplitextt
splitdrivetisabstsrc_extensionsRtbasenamet_rc_extensionsR
Rpt
res_extensiont_mc_extensionst
obj_extension(R&tsource_filenamest strip_dirt
output_dirt obj_namestsrc_nameRtext((s./usr/lib64/python2.6/distutils/msvccompiler.pytobject_filenames=s*

c 
Csð|ip|i�n|i||||||�\}} }}
} |pg} | id�|o| i|i�n| i|i�x_| D]W}
y| |
\}}Wntj
o
q�nX|oti i
|�}n||i jod|}n�||i jod|}nt||i
joa|}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^Rxt_setup_compileR
textendRsRrR4RPR+tabspatht
_c_extensionst_cpp_extensionsRtspawnRlRRR�tdirnameRmRzR~RpRj(R&tsourcesR�R$t include_dirstdebugt
extra_preargstextra_postargstdependstobjectstpp_optstbuildt compile_optstobjtsrcR�t input_optt
output_opttmsgth_dirtrc_dirRt_trc_file((s./usr/lib64/python2.6/distutils/msvccompiler.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^Rxt_fix_object_argstlibrary_filenamet
_need_linkR�RdRRRR�( R&R�toutput_libnameR�R�t target_langtoutput_filenametlib_argsR�((s./usr/lib64/python2.6/distutils/msvccompiler.pytcreate_static_lib·s
c Csn|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}|dj ogti iti i|��\}}ti i
ti i|d�|i|��}|id|�n|
o|
|d*n| o|i| �n|iti i|��y|i|ig|�Wqjtj
o}t|�qjXntid|�dS(Ns5I don't know what to do with 'runtime_library_dirs': is/EXPORT:s/OUT:is/IMPLIB:sskipping %s (up-to-date)(R^RxR¥t
_fix_lib_argstwarntstrRR RPR+RpR§Rt
EXECUTABLERuRtR
RzR~R�R¦R�tmkpathR�RkRRRR�(R&t target_descR�RªR�t librariest library_dirstruntime_library_dirstexport_symbolsR�R�R�t
build_tempR©tlib_optstldflagst export_optstsymtld_argstdll_nametdll_extt implib_fileR�((s./usr/lib64/python2.6/distutils/msvccompiler.pytlinkÑsT
  

 
  cCsd|S(Ns /LIBPATH:((R&tdir((s./usr/lib64/python2.6/distutils/msvccompiler.pytlibrary_dir_option%scCs
td�dS(Ns<don't know how to set runtime library search path for MSVC++(R(R&RÁ((s./usr/lib64/python2.6/distutils/msvccompiler.pytruntime_library_dir_option(scCs
|i|�S(N(R¦(R&Rd((s./usr/lib64/python2.6/distutils/msvccompiler.pytlibrary_option,scCs�|o|d|g}n
|g}xY|D]M}xD|D]<}tii||i|��}tii|�o|Sq8Wq+WdSdS(Nt_d(RPR+RpR¦texistsR (R&tdirsRdR�t try_namesRÁRtlibfile((s./usr/lib64/python2.6/distutils/msvccompiler.pytfind_library_file0s 
cCs®xJ|iD]?}tiitii|�|�}tii|�o|Sq
WxZtitidd�D]?}tiitii|�|�}tii|�o|SqgW|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'.
tPathRf( RgRPR+RpR�tisfileR;RERh(R&texeR8tfn((s./usr/lib64/python2.6/distutils/msvccompiler.pyRiDs

! ! tx86cCstpgS|d}|idjod|i|if}nd|i|f}xmtD]e}t||�}|oI|idjo!ti|ii||�d�Sti||d�SqZqZW|idjoDxAtD]5}t|d|i�d j o|i
d�PqÚqÚWngS(
sÐGet a list of devstudio directories (include, lib or path).

Return a list of strings. The list will be empty if unable to
access the registry or appropriate registry keys not found.
s dirsis6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriess?%s\6.0\Build System\Components\Platforms\Win32 (%s)\DirectoriesRfis%s\6.0s´It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.N( t
_can_read_regRXRZR)RR;RER[R>R R®(R&R+tplatformRRR((s./usr/lib64/python2.6/distutils/msvccompiler.pyRn[s,
!

cCsW|djo|id�}n|i|�}|oti|d�ti|<ndS(s¡Set environment variable 'name' to an MSVC path type value.

This is equivalent to a SET command prior to execution of spawned
commands.
RdtlibraryRfN(RnR;RpRPRh(R&RR8((s./usr/lib64/python2.6/distutils/msvccompiler.pyRo�s

N(R?R@t__doc__t
compiler_typet executablesR�R�RR�R}R�R�tstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR(RxR�R R¤R¬RÀRÂRÃRÄRÊRiRnRo(((s./usr/lib64/python2.6/distutils/msvccompiler.pyRVÍsP   
 B  Z  G      %g @s3Importing new compiler from distutils.msvc9compiler(RV(R#(0RÓt __revision__RCRPR;tdistutils.errorsRRRRRtdistutils.ccompilerRRRt distutilsRRÐt_winregthkey_modt OpenKeyExR tEnumKeyR t EnumValueRterrorR
t ImportErrortwin32apitwin32continfot
HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOTR)RRRR#RKRORURVR�tOldMSVCCompilertdistutils.msvc9compiler(((s./usr/lib64/python2.6/distutils/msvccompiler.pyt<module>s\$(    
     


   . 
ÿÃ