/snap/core18/2979/usr/lib/python3.6/distutils/__pycache__
NameSizeModeActions
archive_util.cpython-36.pyc65250644editdlrm
bcppcompiler.cpython-36.pyc64790644editdlrm
ccompiler.cpython-36.pyc333450644editdlrm
cmd.cpython-36.pyc149860644editdlrm
config.cpython-36.pyc34850644editdlrm
core.cpython-36.pyc68010644editdlrm
cygwinccompiler.cpython-36.pyc85060644editdlrm
debug.cpython-36.pyc1860644editdlrm
dep_util.cpython-36.pyc27020644editdlrm
dir_util.cpython-36.pyc61770644editdlrm
dist.cpython-36.pyc342110644editdlrm
errors.cpython-36.pyc54720644editdlrm
extension.cpython-36.pyc69480644editdlrm
fancy_getopt.cpython-36.pyc106510644editdlrm
filelist.cpython-36.pyc98630644editdlrm
file_util.cpython-36.pyc58950644editdlrm
log.cpython-36.pyc22970644editdlrm
msvc9compiler.cpython-36.pyc174420644editdlrm
msvccompiler.cpython-36.pyc145660644editdlrm
spawn.cpython-36.pyc49910644editdlrm
sysconfig.cpython-36.pyc126100644editdlrm
text_file.cpython-36.pyc84560644editdlrm
unixccompiler.cpython-36.pyc69930644editdlrm
util.cpython-36.pyc155210644editdlrm
version.cpython-36.pyc73520644editdlrm
versionpredicate.cpython-36.pyc50810644editdlrm
_msvccompiler.cpython-36.pyc135600644editdlrm
__init__.cpython-36.pyc3760644editdlrm
Edit: /snap/core18/2979/usr/lib/python3.6/distutils/__pycache__/msvc9compiler.cpython-36.pyc (17442B)
3 ]w@sTdZddlZddlZddlZddlZddlmZmZmZm Z m Z ddl m Z m Z mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dkoej"d&kZ#e#rd Z$d Z%d Z&n d Z$dZ%dZ&ddddZ'GdddZ(GdddZ)ddZ*ddZ+ddZ,ddZ-d'd d!Z.e*Z/e/d"kr@ed#e/Gd$d%d%e Z0dS)(a 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. N)DistutilsExecErrorDistutilsPlatformError CompileErrorLibError LinkError) CCompilergen_preprocess_optionsgen_lib_options)log) get_platformwin32 z1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFrameworkx86Zamd64Zia64)r z win-amd64zwin-ia64c@sPeZdZdZddZeeZddZeeZddZeeZdd Ze eZd S) Regz2Helper class to read values from the registry cCs:x,tD]$}|j||}|r||kr||SqWt|dS)N)HKEYS read_valuesKeyError)clspathkeybasedr-/usr/lib/python3.6/distutils/msvc9compiler.py get_valueAs     z Reg.get_valuecCsnyt||}Wntk r"dSXg}d}xr?r;rHrrrrr7{sr7cCsd}tjj|}|d krdS|t|}tj|djdd\}}t|dd d}|dkrf|d7}t|ddd }|dkrd }|dkr||SdS) zReturn 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. zMSC v.rN r g$@r)sysr=findlensplitint)prefixr#r0restZ majorVersionZ minorVersionrrrget_build_versions  rVcCs4g}x*|D]"}tjj|}||kr |j|q W|S)znReturn a list of normalized paths with duplicates removed. The current order of paths is maintained. )osrnormpathr )pathsZ reduced_pathsrCZnprrrnormalize_and_reduce_pathss   rZcCs@|jtj}g}x|D]}||kr|j|qWtjj|}|S)z8Remove duplicate values of an environment variable. )rRrWpathsepr join)ZvariableZoldListZnewListr#Z newVariablerrrremoveDuplicatess   r]c Cst|}ytjd|d}Wn"tk r>tjdd}YnX| sTtjj| rd|}tj j |d}|rtjj|rtjj |tj tj d}tjj |}tjj|stjd|dSntjd||stjd dStjj |d }tjj|r|Stjd dS) zFind 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. z %s\Setup\VCr@z%Unable to find productdir in registryNzVS%0.f0COMNTOOLSZVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz vcvarsall.batzUnable to find vcvarsall.bat)r9rrrr debugrWrisdirenvirongetr\pardirabspathisfile)r=r:r@ZtoolskeyZtoolsdir vcvarsallrrrfind_vcvarsalls2         rfc Cs8t|}td}i}|dkr$tdtjd||tjd||ftjtjd }z|j\}}|j d krvt|j d |j d }xr|j d D]d}t j |}d |krq|j}|j d d\} } | j} | |kr| jtjr| dd} t| || <qWWd|jj|jjXt|t|kr4ttt|j|S)zDLaunch vcvarsall.bat and read the settings from its environment includeliblibpathrNzUnable to find vcvarsall.batz'Calling 'vcvarsall.bat %s' (version=%s)z "%s" %s & set)stdoutstderrrr- =r)rgrhrirrM)rfsetrr r^ subprocessPopenPIPEZ communicatewaitr,rRrr(stripr'endswithrWr[r]rjcloserkrQ ValueErrorstrlistkeys) r=ZarchreZ interestingresultpopenrjrklinerr*rrrquery_vcvarsalls<         r}g @z(VC %0.1f is not supported by this modulec @seZdZdZdZiZdgZdddgZdgZdgZ eeee Z d Z d Z d Z d Zd ZZdZd.ddZd/ddZd0ddZd1ddZd2ddZd3ddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd4d*d+Zd,d-ZdS)5 MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs8tj||||t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF) rr>VERSION_MSVCCompiler__versionZ_MSVCCompiler__root_MSVCCompiler__paths plat_name_MSVCCompiler__arch initialized)r<verboseZdry_runZforcerrrr>JszMSVCCompiler.__init__NcCs0|j std|dkrt}d%}||kr8td|fdtjkrvdtjkrv|jdrvd|_d |_d |_ d |_ d |_ n|tks|dkrt |}nt td t |}t t|}|djtj|_|dtjd<|dtjd<t|jdkrtd|j|jd|_|jd |_|jd |_ |jd |_ |jd |_ y,x&tjdjdD]}|jj|qNWWntk r|YnXt|j|_dj|jtjd<d|_|jdkrdddddg|_ddddddg|_n&ddddddg|_dddddddg|_ddd g|_|jd!krddd"d#g|_dg|_d$|_dS)&Nzdon't init multiple timesr win-amd64win-ia64z--plat-name must be one of %sZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exe_rrhrgrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.;rz/nologoz/Oxz/MDz/W3z/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOz/INCREMENTAL:noz/DEBUGT)r rr) rAssertionErrorr rrWr`find_execclinkerrhrcmcPLAT_TO_VCVARSr}rrRr[rrQZ_MSVCCompiler__productr rrZr\Zpreprocess_optionsrcompile_optionscompile_options_debugldflags_sharedrldflags_shared_debugZldflags_static)r<rZok_platsZ plat_specZvc_envrCrrr initializeUsf                   zMSVCCompiler.initializecCs|dkr d}g}x|D]}tjj|\}}tjj|d}|tjj|d}||jkrdtd||rttjj|}||jkr|j tjj |||j q||j kr|j tjj |||j q|j tjj |||j qW|S)NrrzDon't know how to compile %s)rWrsplitext splitdriveisabssrc_extensionsrbasename_rc_extensionsr r\ res_extension_mc_extensions obj_extension)r<Zsource_filenamesZ strip_dir output_dirZ obj_namesZsrc_namerextrrrobject_filenamess(         zMSVCCompiler.object_filenamesc Cst|js|j|j||||||} | \}} }} } |p6g} | jd|rT| j|jn | j|jx | D]}y| |\}}Wntk rwhYnX|rtj j |}||j krd|}nT||j krd|}n>||j kr>|}d|}y"|j|jg| |g|gWqhtk r8}zt|WYdd}~XqhXqhn||jkrtj j|}tj j|}yl|j|jgd|d|g|gtj jtj j|\}}tj j||d}|j|jgd|g|gWqhtk r}zt|WYdd}~XqhXqhntd||fd |}y&|j|jg| | ||g|Wqhtk rj}zt|WYdd}~XqhXqhW| S) Nz/cz/Tcz/Tpz/foz-hz-rz.rcz"Don't know how to compile %s to %sz/Fo)rrZ_setup_compiler extendrrrrWrrc _c_extensions_cpp_extensionsrspawnrrrrdirnamerrrr\r)r<Zsourcesrr8Z include_dirsr^ extra_preargsextra_postargsZdependsZ compile_infoobjectsZpp_optsZbuildZ compile_optsobjsrcrZ input_optZ output_optmsgZh_dirZrc_dirrrZrc_filerrrcompilesj              zMSVCCompiler.compilec Cs|js|j|j||\}}|j||d}|j||r|d|g}|rJy|j|jg|Wqtk r}zt|WYdd}~XqXn t j d|dS)N)rz/OUT:zskipping %s (up-to-date)) rr_fix_object_argslibrary_filename _need_linkrrhrrr r^) r<rZoutput_libnamerr^ target_langoutput_filenameZlib_argsrrrrcreate_static_libs zMSVCCompiler.create_static_libcCsX|js|j|j||\}}|j|||}|\}}}|rL|jdt|t||||}|dk rptjj ||}|j ||rH|t j kr| r|j dd}q|jdd}n| r|j }n|j}g}x|pgD]}|jd|qW||||d|g}tjj|d} |dk rPtjjtjj|\}}tjj | |j|}|jd||j|| || rp| |dd<| r|j| |jtjj|y|j|jg|Wn,tk r}zt|WYdd}~XnX|j||}|dk rT|\}}d||f}y|jdd d ||gWn,tk rD}zt|WYdd}~XnXn tjd |dS) Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:z/OUT:rz/IMPLIB:z-outputresource:%s;%szmt.exez-nologoz -manifestzskipping %s (up-to-date))rrrZ _fix_lib_argswarnrwr rWrr\rr EXECUTABLErrr rrrrmanifest_setup_ldargsrZmkpathrrrrmanifest_get_embed_infor r^)r< target_descrrrZ librariesZ library_dirsZruntime_library_dirsZexport_symbolsr^rr build_temprZ fixed_argsZlib_optsZldflagsZ export_optsZsymld_argsZdll_nameZdll_extZ implib_filerZmfinfoZ mffilenamemfidZout_argrrrlink8sl           zMSVCCompiler.linkcCs,tjj|tjj|d}|jd|dS)Nz .manifestz/MANIFESTFILE:)rWrr\rr )r<rrr temp_manifestrrrrsz"MSVCCompiler.manifest_setup_ldargscCs`x,|D] }|jdr|jddd}PqWdS|tjkr>d}nd}|j|}|dkrXdS||fS)Nz/MANIFESTFILE::rr ) startswithrRrr_remove_visual_c_ref)r<rrargrrrrrrs    z$MSVCCompiler.manifest_get_embed_infocCsyt|}z |j}Wd|jXtjdtj}tj|d|}d}tj|d|}tjdtj}tj||dkrrdSt|d}z|j||S|jXWnt k rYnXdS)NzU|)rz*\s*zI|)w) openreadrurerDOTALLrHsearchwriteOSError)r<Z manifest_fileZ manifest_fZ manifest_bufpatternrrrrs.     z!MSVCCompiler._remove_visual_c_refcCsd|S)Nz /LIBPATH:r)r<dirrrrlibrary_dir_optionszMSVCCompiler.library_dir_optioncCs tddS)NztjdjdD]*}tjjtjj||}tjj|rH|SqHW|S)aReturn 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'. ZPathr)rrWrr\rcrdr`rR)r<ZexerCfnrrrrs   zMSVCCompiler.find_exe)rrr)N)rr)NNNrNNN)NrN) NNNNNrNNNN)r) r1r2r3r4Z compiler_typeZ executablesrrrrrrrZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ exe_extensionr>rrrrrrrrrrrrrrrrrr~,sR  X  V  R + r~l)r)1r4rWrorOrZdistutils.errorsrrrrrZdistutils.ccompilerrrr Z distutilsr Zdistutils.utilr winregZ OpenKeyExrZEnumKeyrZ EnumValuer&errorrZ HKEY_USERSHKEY_CURRENT_USERHKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTrplatformmaxsizeZ NATIVE_WIN64r9rBrArrr7rVrZr]rfr}rr~rrrrsN  >. # )