ACC SHELL

Path : /usr/lib/python/distutils/
File Upload :
Current File : //usr/lib/python/distutils/msvc9compiler.pyo

tMc
@sdZdZddkZddkZddkZddkZddklZlZl	Z	l
Z
lZddkl
Z
lZlZddklZddklZddkZeiZeiZeiZeiZeieieiei fZ!dZ"d	Z#d
Z$hdd6d
d6dd6Z%dddYZ&dddYZ'dZ(dZ)dZ*dZ+ddZ,e(Z-e-djoede-nde
fdYZ.dS( 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.
sB$Id: msvc9compiler.py 76652 2009-12-03 20:56:15Z martin.v.loewis $iN(tDistutilsExecErrortDistutilsPlatformErrortCompileErrortLibErrort	LinkError(t	CCompilertgen_preprocess_optionstgen_lib_options(tlog(tget_platforms%Software\Microsoft\VisualStudio\%0.1fs)Software\Microsoft\Microsoft SDKs\Windowss Software\Microsoft\.NETFrameworktx86twin32tamd64s	win-amd64tia64swin-ia64tRegcBsJeZdZedZedZedZedZRS(s2Helper class to read values from the registry
    cCsPx=tD]5}|i||}|o||jo	||SqWt|dS(N(tHKEYStread_valuestKeyError(tclstpathtkeytbasetd((s-/usr/lib/python2.6/distutils/msvc9compiler.pyt	get_value9s
c	Csyt||}Wntj
odSXg}d}xMtoEyt||}Wntj
oPnX|i||d7}q9W|S(sReturn list of registry keys.iiN(tRegOpenKeyExtRegErrortNonetTruet
RegEnumKeytappend(RRRthandletLtitk((s-/usr/lib/python2.6/distutils/msvc9compiler.pyt	read_keysAs
c	
Csyt||}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/lib/python2.6/distutils/msvc9compiler.pyRSs cCsMt|dd}|dj	o*y|d}WqItj
oqIXn|S(Ntdecodetmbcs(tgetattrRtUnicodeError(tstdec((s-/usr/lib/python2.6/distutils/msvc9compiler.pyR%is
	(	t__name__t
__module__t__doc__tclassmethodRR"RtstaticmethodR%(((s-/usr/lib/python2.6/distutils/msvc9compiler.pyR5s
t
MacroExpandercBs,eZdZdZdZdZRS(cCs'h|_t||_|i|dS(N(tmacrostVS_BASEtvsbasetload_macros(tselftversion((s-/usr/lib/python2.6/distutils/msvc9compiler.pyt__init__us	
cCs!ti|||id|<dS(Ns$(%s)(RRR5(R9tmacroRR((s-/usr/lib/python2.6/distutils/msvc9compiler.pyt	set_macrozscCs\|id|idd|id|idd|idtdy4|djo|id	td
n
td
Wn!tj
o}tdnX|djo-|id
|id|idtdnd}xvtD]n}yt||}Wntj
o
qnXt	|d}t
i|d||f}|d|id<qWdS(NtVCInstallDirs	\Setup\VCt
productdirtVSInstallDirs	\Setup\VStFrameworkDirtinstallrootg @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"@tFrameworkVersionsclr versiont
WindowsSdkDirtcurrentinstallfolders.Software\Microsoft\NET Framework Setup\Productis%s\%sR:s$(FrameworkVersion)(
R=R7tNET_BASERRtWINSDK_BASERRRRRRR5(R9R:texctpRthRR((s-/usr/lib/python2.6/distutils/msvc9compiler.pyR8}s0

cCs6x/|iiD]\}}|i||}qW|S(N(R5titemstreplace(R9R-R!tv((s-/usr/lib/python2.6/distutils/msvc9compiler.pytsubs(R/R0R;R=R8RO(((s-/usr/lib/python2.6/distutils/msvc9compiler.pyR4ss			cCsd}tii|}|djodS|t|}ti|idd\}}t|d d}t|dd!d	}|djo
d
}n|djo	||SdS(sReturn 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.iit iiiig$@iN(tsysR:tfindtlentsplittintR(tprefixR R-tresttmajorVersiontminorVersion((s-/usr/lib/python2.6/distutils/msvc9compiler.pytget_build_versions



	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/lib/python2.6/distutils/msvc9compiler.pytnormalize_and_reduce_pathss
cCs]|iti}g}x,|D]$}||jo|i|qqWtii|}|S(s8Remove duplicate values of an environment variable.
    (RTR[tpathsepRtjoin(tvariabletoldListtnewListR tnewVariable((s-/usr/lib/python2.6/distutils/msvc9compiler.pytremoveDuplicatess
cCsnt|}ytid|d}Wn&tj
otidd}nX|ptii	|od|}ti
i|d}|ostii	|o`tii|ti
ti
d}tii|}tii	|ptid|dSqtid|n|ptiddStii|d	}tii|o|Stid
dS(sFind 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/lib/python2.6/distutils/msvc9compiler.pytfind_vcvarsalls2




!	

cCst|}td}h}|djotdntid||tid||fdtid	ti}|i	\}}|i
d
jot|idn|id}x|idD]}t
i|}d
|joqn|i}|id
d\}	}
|	i}	|	|jo5|
itio|
d }
nt|
||	<qqWt|t|jo"ttt|in|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
subprocesstPopentPIPEtcommunicatetwaitR)RTRR%tstripR$tendswithR[RaRgRSt
ValueErrortstrtlisttkeys(R:tarchRrtinterestingtresulttpopenRwRxtlineRR'((s-/usr/lib/python2.6/distutils/msvc9compiler.pytquery_vcvarsalls8
	

"g @s(VC %0.1f is not supported by this moduletMSVCCompilercBs2eZdZdZhZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
ZddddZddZdddZddddddddZddddZddddddddddd
ZdZdZdZddZdZRS(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__archtFalsetinitialized(R9tverbosetdry_runtforce((s-/usr/lib/python2.6/distutils/msvc9compiler.pyR;;s					cCs+|djo
t}nd%}||jotd|fndtijoQdtijoA|ido1d|_d|_d	|_d
|_	d|_
n1|tjp
|djot|}nttdt|}tt
|}|d
iditi|_|didtid<|didtid<t|idjotd|in|id|_|id|_|id	|_|id
|_	|id|_
y5x.tid
idD]}|ii|qWWntj
onXt|i|_di|itid
<d|_|idjo7dddddg|_ddddddg|_n:ddddddg|_dddddddg|_ddd g|_|id!joddd"d#d$g|_ndg|_t |_!dS(&NRs	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("RR	RR[Rktfind_exetcctlinkerRutrctmctPLAT_TO_VCVARSRRtencodeRTRaRRSt_MSVCCompiler__productRRR`Rbtpreprocess_optionsRtcompile_optionstcompile_options_debugtldflags_sharedRtldflags_shared_debugtldflags_staticRR(R9Rtok_platst	plat_spectvc_envRJ((s-/usr/lib/python2.6/distutils/msvc9compiler.pyt
initializeFsf


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|||iq$W|S(NRisDon'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/lib/python2.6/distutils/msvc9compiler.pytobject_filenamess*

c	
Cs|ip|in|i||||||}	|	\}}
}}}|pg}
|
id|o|
i|in|
i|ixh|
D]`}y||\}}Wntj
o
qnX|oti	i
|}n||ijod|}n||ijod|}nz||i
jod|}d|}y)|i|ig||g|gWqtj
o}t|qXqn||ijoti	i|}ti	i|}y|i|igd|d|g|gti	iti	i|\}}ti	i||d}|i|igd|g|gWqtj
o}t|qXqntd||fd	|}y-|i|ig|
|||g|Wqtj
o}t|qXqW|
S(
Ns/cs/Tcs/Tps/fos-hs-rs.rcs"Don't know how to compile %s to %ss/Fo(RRt_setup_compileRtextendRRRR[RRnt
_c_extensionst_cpp_extensionsRtspawnRRRRtdirnameRRRRbR(R9tsourcesRR5tinclude_dirsRit
extra_preargstextra_postargstdependstcompile_infotobjectstpp_optstbuildtcompile_optstobjtsrcRt	input_optt
output_opttmsgth_dirtrc_dirRRtrc_file((s-/usr/lib/python2.6/distutils/msvc9compiler.pytcompilesl



#$$#
c	Cs|ip|in|i||\}}|i|d|}|i||o_|d|g}|ony|i|ig|Wqtj
o}t|qXnt	i
d|dS(NRs/OUT:sskipping %s (up-to-date)(RRt_fix_object_argstlibrary_filenamet
_need_linkRRuRRRRi(	R9Rtoutput_libnameRRittarget_langtoutput_filenametlib_argsR((s-/usr/lib/python2.6/distutils/msvc9compiler.pytcreate_static_libs
	cCs|ip|in|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}nd	}yt|d
}|i}|itidti }ti!|d|}d
}ti!|d|}t|d}|i"||iWnt#j
onXd||f}y |iddd||gWqtj
o}t|qXnt$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>)Rs*<dependentAssembly>\s*</dependentAssembly>twbs-outputresource:%s;%ssmt.exes-nologos	-manifestsskipping %s (up-to-date)(&RRRt
_fix_lib_argstwarnRRRR[RRbRRt
EXECUTABLERRRRRRRRtmkpathRRRRtopentreadtclosetreRtDOTALLROtwritetIOErrorRRi(R9ttarget_descRRRt	librariestlibrary_dirstruntime_library_dirstexport_symbolsRiRRt
build_tempRt
fixed_argstlib_optstldflagstexport_optstsymtld_argstdll_nametdll_exttimplib_filet
temp_manifestRtmfidt
manifest_ftmanifest_buftpatterntout_arg((s-/usr/lib/python2.6/distutils/msvc9compiler.pytlink*s
			

	
			


cCsd|S(Ns	/LIBPATH:((R9tdir((s-/usr/lib/python2.6/distutils/msvc9compiler.pytlibrary_dir_optionscCstddS(Ns<don't know how to set runtime library search path for MSVC++(R(R9R((s-/usr/lib/python2.6/distutils/msvc9compiler.pytruntime_library_dir_optionscCs
|i|S(N(R(R9Ru((s-/usr/lib/python2.6/distutils/msvc9compiler.pytlibrary_optionscCs|o|d|g}n
|g}xY|D]M}xD|D]<}tii||i|}tii|o|Sq8Wq+WdSdS(Nt_d(R[RRbRtexistsR(R9tdirsRuRit	try_namesRR&tlibfile((s-/usr/lib/python2.6/distutils/msvc9compiler.pytfind_library_files	
cCsxJ|iD]?}tiitii||}tii|o|Sq
WxWtididD]?}tiitii||}tii|o|SqdW|S(sReturn 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(RR[RRbRnRoRkRT(R9texeRJtfn((s-/usr/lib/python2.6/distutils/msvc9compiler.pyRs	
!	!	N(R/R0R1t
compiler_typetexecutablesRRRRRRRtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR;RRRRRRRRRR
R(((s-/usr/lib/python2.6/distutils/msvc9compiler.pyRsL			
YVv			(((/R1t__revision__R[R{RQRtdistutils.errorsRRRRRtdistutils.ccompilerRRRt	distutilsRtdistutils.utilR	t_winregt	OpenKeyExRtEnumKeyRt	EnumValueR#terrorRt
HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOTRR6RHRGRRR4RZR`RgRsRRR(((s-/usr/lib/python2.6/distutils/msvc9compiler.pyt<module>sH(				
>.				#%	


ACC SHELL 2018