fc@sydZddlZddlZddlZddlZddlZddlmZddl m Z ddl m Z ej dkrddl mZejZnd fd YZeZeejjfZydd lmZWnek rnXd Zd dZdZdZddZdfdYZdfdYZdfdYZdfdYZ dS(s@ Improved support for Microsoft Visual C++ compilers. Known supported compilers: -------------------------- Microsoft Visual C++ 9.0: Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) Microsoft Windows SDK 6.1 (x86, x64, ia64) Microsoft Windows SDK 7.0 (x86, x64, ia64) Microsoft Visual C++ 10.0: Microsoft Windows SDK 7.1 (x86, x64, ia64) Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) Microsoft Visual Studio 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) iN(t LegacyVersion(t filterfalsei(t get_unpatchedtWindows(twinregRcBs eZdZdZdZdZRS(N(t__name__t __module__tNonet HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOT(((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR(s(tRegcCsd}|d|f}ytj|d}WnQtk ry&|d|f}tj|d}Wqtk r{d}qXnX|rtjjjj|d}tjj|r|Sntt |S(s+ Patched "distutils.msvc9compiler.find_vcvarsall" to use the standalone compiler build for Python (VCForPython). Fall back to original behavior when the standalone compiler is not available. Redirect the path of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft Visual C++ 9.0: Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) Parameters ---------- version: float Required Microsoft Visual C++ version. Return ------ vcvarsall.bat path: str s-Software\%sMicrosoft\DevDiv\VCForPython\%0.1ftt installdirs Wow6432Node\s vcvarsall.batN( R t get_valuetKeyErrorRtostpathtjointisfileRtmsvc9_find_vcvarsall(tversiontVC_BASEtkeyt productdirt vcvarsall((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR?s  tx86cOsy#tt}|||||SWn'tjjk r<ntk rLnXyt||jSWn,tjjk r}t|||nXdS(s Patched "distutils.msvc9compiler.query_vcvarsall" for support extra compilers. Set environment without use of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft Visual C++ 9.0: Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) Microsoft Windows SDK 6.1 (x86, x64, ia64) Microsoft Windows SDK 7.0 (x86, x64, ia64) Microsoft Visual C++ 10.0: Microsoft Windows SDK 7.1 (x86, x64, ia64) Parameters ---------- ver: float Required Microsoft Visual C++ version. arch: str Target architecture. Return ------ environment: dict N( Rtmsvc9_query_vcvarsallt distutilsterrorstDistutilsPlatformErrort ValueErrortEnvironmentInfot return_envt_augment_exception(tvertarchtargstkwargstorigtexc((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRjs  cCsxytt|SWntjjk r-nXyt|ddjSWn)tjjk rs}t|dnXdS(s' Patched "distutils._msvccompiler._get_vc_env" for support extra compilers. Set environment without use of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) Microsoft Visual Studio 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) Parameters ---------- plat_spec: str Target architecture. Return ------ environment: dict t vc_min_verg,@N(Rtmsvc14_get_vc_envRRRR!R"R#(t plat_specR)((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR+s cOsbdtjkrOddl}t|jtdkrO|jjj||Sntt ||S(s Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) snumpy.distutilsiNs1.11.2( tsystmodulestnumpyRt __version__Rt ccompilertgen_lib_optionsRtmsvc14_gen_lib_options(R&R'tnp((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR3s  R cCs|jd}d|jks1d|jkrd}|jt}d}|dkr|jjddkr|d 7}||d 7}q|d 7}q|d kr|d 7}||d7}q|dkr|d7}qn|f|_dS(sl Add details to the exception message to help guide the user as to what action will resolve it. iRsvisual cs0Microsoft Visual C++ {version:0.1f} is required.s-www.microsoft.com/download/details.aspx?id=%dg"@tia64is* Get it with "Microsoft Windows SDK 7.0": iB s% Get it from http://aka.ms/vcpython27g$@s* Get it with "Microsoft Windows SDK 7.1": iW g,@sj Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-toolsN(R&tlowertformattlocalstfind(R)RR%tmessagettmplt msdownload((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR#s  $      t PlatformInfocBszeZdZejddjZdZedZ dZ dZ e e dZ e e dZe d ZRS( s Current and Target Architectures informations. Parameters ---------- arch: str Target architecture. tprocessor_architectureR cCs|jjdd|_dS(Ntx64tamd64(R6treplaceR%(tselfR%((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt__init__scCs|j|jjddS(Nt_i(R%R9(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt target_cpuscCs |jdkS(NR(RE(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt target_is_x86scCs |jdkS(NR(t current_cpu(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytcurrent_is_x86scCs=|jdkr|rdS|jdkr2|r2dSd|jS(sj Current platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '' if architecture is x86. x64: bool return 'd' and not 'md64' if architecture is amd64. Return ------ subfolder: str ' arget', or '' (see hidex86 parameter) RR R@s\x64s\%s(RG(RBthidex86R?((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt current_dir scCs=|jdkr|rdS|jdkr2|r2dSd|jS(sr Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ subfolder: str '\current', or '' (see hidex86 parameter) RR R@s\x64s\%s(RE(RBRIR?((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt target_dirscCsB|r dn|j}|j|kr(dS|jjdd|S(so Cross platform specific subfolder. Parameters ---------- forcex86: bool Use 'x86' as current architecture even if current acritecture is not x86. Return ------ subfolder: str '' if target architecture is current architecture, '\current_target' if not. RR s\s\%s_(RGRERKRA(RBtforcex86tcurrent((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt cross_dir5s(RRt__doc__tsafe_envtgetR6RGRCtpropertyRERFRHtFalseRJRKRN(((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR=s   t RegistryInfocBseZdZejejejejfZdZ e dZ e dZ e dZ e dZe dZe dZe dZe d Ze d Zed Zd ZRS( s Microsoft Visual Studio related registry informations. Parameters ---------- platform_info: PlatformInfo "PlatformInfo" instance. cCs ||_dS(N(tpi(RBt platform_info((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRCZscCsdS(s< Microsoft Visual Studio root registry key. t VisualStudio((RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt visualstudio]scCstjj|jdS(s; Microsoft Visual Studio SxS registry key. tSxS(RRRRX(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytsxsdscCstjj|jdS(s8 Microsoft Visual C++ VC7 registry key. tVC7(RRRRZ(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytvckscCstjj|jdS(s; Microsoft Visual Studio VS7 registry key. tVS7(RRRRZ(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytvsrscCsdS(s? Microsoft Visual C++ for Python registry key. sDevDiv\VCForPython((RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt vc_for_pythonyscCsdS(s- Microsoft SDK registry key. sMicrosoft SDKs((RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt microsoft_sdkscCstjj|jdS(s> Microsoft Windows/Platform SDK registry key. R(RRRR`(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt windows_sdkscCstjj|jdS(s< Microsoft .NET Framework SDK registry key. tNETFXSDK(RRRR`(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt netfx_sdkscCsdS(s< Microsoft Windows Kits Roots registry key. sWindows Kits\Installed Roots((RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytwindows_kits_rootsscCs:|jjs|rdnd}tjjd|d|S(s  Return key in Microsoft software registry. Parameters ---------- key: str Registry key path where look. x86: str Force x86 software registry. Return ------ str: value R t Wow6432NodetSoftwaret Microsoft(RURHRRR(RBRRtnode64((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt microsofts!cCstj}tj}|j}x|jD]}y||||d|}Wnkttfk r|jjs%y"||||t d|}Wqttfk rq%qXqq%nXytj ||dSWq%ttfk rq%Xq%WdS(s Look for values in registry in Microsoft software registry. Parameters ---------- key: str Registry key path where look. name: str Value name to find. Return ------ str: value iN( RtKEY_READtOpenKeyRitHKEYStOSErrortIOErrorRURHtTruet QueryValueEx(RBRtnameRjtopenkeytmsthkeytbkey((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytlookups"   " (RRRORRR R R RlRCRRRXRZR\R^R_R`RaRcRdRSRiRv(((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRTLs"   t SystemInfocBsjeZdZejddZejddZejdeZddZ dZ dZ e dZ e d Zd Zd Ze d Ze d Ze dZe dZe dZe dZe dZe dZe dZe dZe dZe dZe dZdZddZRS(s Microsoft Windows and Visual Studio related system inormations. Parameters ---------- registry_info: RegistryInfo "RegistryInfo" instance. vc_ver: float Required Microsoft Visual C++ version. tWinDirR t ProgramFilessProgramFiles(x86)cCs1||_|jj|_|p'|j|_dS(N(triRUt_find_latest_available_vc_vertvc_ver(RBt registry_infoR|((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRCs cCsBy|jdSWn)tk r=d}tjj|nXdS(Nis%No Microsoft Visual C++ version found(tfind_available_vc_verst IndexErrorRRR(RBterr((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR{s  c Cs|jj}|jj|jj|jjf}g}xI|jjD];}x2|D]*}y%tj|||dtj}Wnt t fk rqMnXtj |\}}} xdt |D]V} y<t tj|| d} | |kr|j| nWqtk rqXqWx`t |D]R} y8t tj|| } | |kr^|j| nWq!tk rrq!Xq!WqMWq@Wt|S(sC Find all available Microsoft Visual C++ versions. i(RzRiR\R_R^RlRRkRjRmRnt QueryInfoKeytrangetfloatt EnumValuetappendR tEnumKeytsorted( RBRstvckeystvc_versRtRRutsubkeystvaluesRDtiR$((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR~s2 ! %    cCsKd|j}tjj|j|}|jj|jjd|jpJ|S(s4 Microsoft Visual Studio directory. sMicrosoft Visual Studio %0.1fs%0.1f(R|RRRtProgramFilesx86RzRvR^(RBRqtdefault((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt VSInstallDir s cCs|j|jp|j}tjj|jjd|j}|jj |d}|rqtjj|dn|}|jj |jj d|jp|}tjj |sd}t j j|n|S(s1 Microsoft Visual C++ directory. s%0.1fRtVCs(Microsoft Visual C++ directory not found(Rt _guess_vct_guess_vc_legacyRRRRzR_R|RvR\tisdirRRR(RBtguess_vctreg_patht python_vct default_vcRtmsg((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt VCInstallDirs"!(cCs||jdkrdSd}tjj|j|}y*tj|d}tjj||SWntttfk rwnXdS(s* Locate Visual C for 2017 g,@Ns VC\Tools\MSVCi( R|RRRRtlistdirRmRnR(RBRRt vc_exact_ver((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR0scCs#d|j}tjj|j|S(s< Locate Visual C for versions prior to 2017 s Microsoft Visual Studio %0.1f\VC(R|RRRR(RBR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR@s cCsc|jdkrdS|jdkr&dS|jdkr9dS|jd krLdS|jdkr_dSdS(sN Microsoft Windows SDK versions for specified MSVC++ version. g"@s7.0s6.1s6.0ag$@s7.1s7.0ag&@s8.0s8.0ag(@s8.1s8.1ag,@s10.0N(s7.0s6.1s6.0a(s7.1s7.0a(s8.0s8.0a(s8.1s8.1a(s10.0s8.1(R|(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytWindowsSdkVersionGscCs|jtjj|jdS(s4 Microsoft Windows SDK last version tlib(t_use_last_dir_nameRRRt WindowsSdkDir(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytWindowsSdkLastVersionWscCsd}xO|jD]D}tjj|jjd|}|jj|d}|rPqqW| srtjj| rtjj|jjd|j }|jj|d}|rtjj|d}qn| stjj| rKxd|jD]V}||j d }d|}tjj|j |}tjj|r|}qqWn| setjj| rxQ|jD]C}d |}tjj|j |}tjj|ro|}qoqoWn|stjj|j d }n|S( s2 Microsoft Windows SDK directory. R sv%stinstallationfolders%0.1fRtWinSDKt.sMicrosoft SDKs\Windows Kits\%ssMicrosoft SDKs\Windows\v%st PlatformSDK( RRRRRzRaRvRR_R|trfindRyR(RBtsdkdirR$tlocRt install_basetintvertd((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR_s6"  c Cs8|jdkrd}d}n<d}|jdkr9tnt}|jjdtd|}d||jd d f}g}|jd krx9|jD]+}|tjj |j j ||g7}qWnx:|j D]/}|tjj |j j d ||g7}qWx-|D]%}|j j|d }|r Pq q W|S(s= Microsoft Windows SDK executable directory. g&@i#R i(g(@R?RIsWinSDK-NetFx%dTools%ss\t-g,@sv%sAR(R|RoRSRURJRAtNetFxSdkVersionRRRRzRcRRaRv( RBtnetfxverR%RItfxtregpathsR$Rtexecpath((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytWindowsSDKExecutablePaths$ ,- cCsAd|j}tjj|jj|}|jj|dp@dS(s0 Microsoft Visual F# directory. s%0.1f\Setup\F#RR (R|RRRRzRXRv(RBR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytFSharpInstallDirs cCsb|jdkrd}nd}x7|D]/}|jj|jjd|}|r%Pq%q%W|padS(s8 Microsoft Universal CRT SDK directory. g,@t10t81s kitsroot%sR (RR((R|RzRvRd(RBtversR$R((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytUniversalCRTSdkDirs   cCs|jtjj|jdS(s@ Microsoft Universal C Runtime SDK last version R(RRRRR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytUniversalCRTSdkLastVersionscCs|jdkrdSdSdS(s8 Microsoft .NET Framework SDK versions. g,@s4.6.1s4.6N(s4.6.1s4.6((R|(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRscCsXxK|jD]@}tjj|jj|}|jj|d}|r Pq q W|pWdS(s9 Microsoft .NET Framework SDK directory. tkitsinstallationfolderR (RRRRRzRcRv(RBR$RR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt NetFxSdkDirs cCs7tjj|jd}|jj|jjdp6|S(s; Microsoft .NET Framework 32bit directory. sMicrosoft.NET\Frameworktframeworkdir32(RRRRxRzRvR\(RBtguess_fw((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytFrameworkDir32scCs7tjj|jd}|jj|jjdp6|S(s; Microsoft .NET Framework 64bit directory. sMicrosoft.NET\Framework64tframeworkdir64(RRRRxRzRvR\(RBR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytFrameworkDir64scCs |jdS(s: Microsoft .NET Framework 32bit versions. i (t_find_dot_net_versions(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytFrameworkVersion32scCs |jdS(s: Microsoft .NET Framework 64bit versions. i@(R(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytFrameworkVersion64scCs|jj|jjd|}t|d|}|pM|j|dpMd}|jdkrn|df}nR|jdkr|jd d krd n|d f}n|jd krd}n|jdkrd}n|S(s Find Microsoft .NET Framework versions. Parameters ---------- bits: int Platform number of bits: 32 or 64. sframeworkver%dsFrameworkDir%dtvR g(@sv4.0g$@itv4s v4.0.30319sv3.5g"@s v2.0.50727g @sv3.0(sv3.5s v2.0.50727(sv3.0s v2.0.50727(RzRvR\tgetattrRR|R6(RBtbitstreg_vert dot_net_dirR$t frameworkver((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRs    cs;fdttjD}t|dp:dS(s Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs startings by this prefix c3sE|];}tjjtjj|r|jr|VqdS(N(RRRRt startswith(t.0tdir_name(Rtprefix(s3/usr/lib/python2.7/site-packages/setuptools/msvc.pys )s!R N(treversedRRtnextR(RBRRt matching_dirs((RRs3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRs N( RRRORPRQRxRyRRRCR{R~RRRRRRRRRRRRRRRRRRRRR(((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRws4       &      R!cBseZdZdddZedZedZedZedZ edZ edZ ed Z ed Z ed Zed Zd ZedZedZedZedZedZedZedZedZedZedZedZedZedZedZdZ ddZ!RS(sY Return environment variables for specified Microsoft Visual C++ version and platform : Lib, Include, Path and libpath. This function is compatible with Microsoft Visual C++ 9.0 to 14.0. Script created by analysing Microsoft environment configuration files like "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ... Parameters ---------- arch: str Target architecture. vc_ver: float Required Microsoft Visual C++ version. If not set, autodetect the last version. vc_min_ver: float Minimum Microsoft Visual C++ version. icCsdt||_t|j|_t|j||_|j|kr`d}tjj |ndS(Ns.No suitable Microsoft Visual C++ version found( R=RURTRzRwtsiR|RRR(RBR%R|R*R((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRCIs cCs |jjS(s/ Microsoft Visual C++ version. (RR|(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR|RscCsddg}|jdkrd|jjdtdt}|dg7}|dg7}|d|g7}ng|D]!}tjj|jj|^qkS( s/ Microsoft Visual Studio Tools s Common7\IDEs Common7\Toolsg,@RIR?s1Common7\IDE\CommonExtensions\Microsoft\TestWindowsTeam Tools\Performance ToolssTeam Tools\Performance Tools%s( R|RURJRoRRRRR(RBtpathst arch_subdirR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytVSToolsYs   cCs4tjj|jjdtjj|jjdgS(sL Microsoft Visual C++ & Microsoft Foundation Class Includes tIncludesATLMFC\Include(RRRRR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt VCIncludeshscCs|jdkr'|jjdt}n|jjdt}d|d|g}|jdkrs|d|g7}ng|D]!}tjj|jj|^qzS(sM Microsoft Visual C++ & Microsoft Foundation Class Libraries g.@R?RIsLib%ss ATLMFC\Lib%sg,@s Lib\store%s( R|RURKRoRRRRR(RBRRR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt VCLibrariespscCs/|jdkrgStjj|jjdgS(sA Microsoft Visual C++ store references Libraries g,@sLib\store\references(R|RRRRR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt VCStoreRefsscCs|j}tjj|jdg}|jdkr9tnt}|jj |}|r}|tjj|jd|g7}n|jdkrd|jj dt}|tjj|j|g7}n|jdkrs|jj rdnd}|tjj|j||jj d tg7}|jj |jjkr|tjj|j||jj d tg7}qn|tjj|jd g7}|S( s, Microsoft Visual C++ Tools t VCPackagesg$@sBin%sg,@RIg.@s bin\HostX86%ss bin\HostX64%sR?tBin(RRRRRR|RoRSRURNRJRHRKRGRE(RBRttoolsRLRRthost_dir((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytVCToolss& &" & ,cCs|jdkrJ|jjdtdt}tjj|jjd|gS|jjdt}tjj|jjd}|j }tjj|d||fgSdS(s1 Microsoft Windows SDK Libraries g$@RIR?sLib%sRs%sum%sN( R|RURKRoRRRRRt _sdk_subdir(RBRRtlibver((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt OSLibrariess  cCstjj|jjd}|jdkrC|tjj|dgS|jdkr^|j}nd}tjj|d|tjj|d|tjj|d|gSd S( s/ Microsoft Windows SDK Include tincludeg$@tglg,@R s%sshareds%sums%swinrtN(RRRRRR|R(RBRtsdkver((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt OSIncludess cCstjj|jjd}g}|jdkr@||j7}n|jdkrn|tjj|dg7}n|jdkr||tjj|jjdtjj|ddtjj|d dtjj|d dtjj|jjd d d |jdddg7}n|S(s7 Microsoft Windows SDK Libraries Paths t Referencesg"@g&@sCommonConfiguration\Neutralg,@t UnionMetadatas'Windows.Foundation.UniversalApiContracts1.0.0.0s%Windows.Foundation.FoundationContracts,Windows.Networking.Connectivity.WwanContractt ExtensionSDKssMicrosoft.VCLibss%0.1ftCommonConfigurationtneutral(RRRRRR|R(RBtreftlibpath((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt OSLibpaths>      cCst|jS(s- Microsoft Windows SDK Tools (tlistt _sdk_tools(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytSdkToolssccs|jdkrG|jdkr$dnd}tjj|jj|Vn|jjs|jjdt }d|}tjj|jj|Vn|jdks|jdkr |jj rd}n|jjd t dt }d |}tjj|jj|Vnl|jdkrvtjj|jjd}|jjdt }|jj }tjj|d ||fVn|jj r|jj Vnd S( s= Microsoft Windows SDK Tools paths generator g.@g&@RsBin\x86R?sBin%sg$@R RIsBin\NETFX 4.0 Tools%ss%s%sN( R|RRRRRRURHRJRoRFRR(RBtbin_dirRRR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRs(    ! cCs|jj}|rd|SdS(s6 Microsoft Windows SDK version subdir s%s\R (RR(RBtucrtver((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRs cCs/|jdkrgStjj|jjdgS(s- Microsoft Windows SDK Setup g"@tSetup(R|RRRRR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytSdkSetup%scCs|j}|j}|jdkrDt}|j o>|j }n6|jpY|j}|jdkpw|jdk}g}|r|g|jD]}t j j |j |^q7}n|r|g|j D]}t j j |j|^q7}n|S(s0 Microsoft .NET Framework Tools g$@R@(RURR|RoRFRHRGRERRRRRRR(RBRURt include32t include64RR$((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytFxTools/s  //cCsU|jdks|jj r gS|jjdt}tjj|jjd|gS(s8 Microsoft .Net Framework SDK Libraries g,@R?slib\um%s( R|RRRURKRoRRR(RBR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytNetFxSDKLibrariesGscCs<|jdks|jj r gStjj|jjdgS(s7 Microsoft .Net Framework SDK Includes g,@s include\um(R|RRRRR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytNetFxSDKIncludesRscCstjj|jjdgS(s> Microsoft Visual Studio Team System Database s VSTSDB\Deploy(RRRRR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytVsTDb\scCs|jdkrgS|jdkrF|jj}|jjdt}n|jj}d}d|j|f}tjj ||g}|jdkr|tjj ||dg7}n|S(s( Microsoft Build Engine g(@g.@RIR sMSBuild\%0.1f\bin%stRoslyn( R|RRRURJRoRRRR(RBt base_pathRRtbuild((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytMSBuildcs  "cCs/|jdkrgStjj|jjdgS(s. Microsoft HTML Help Workshop g&@sHTML Help Workshop(R|RRRRR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytHTMLHelpWorkshopzscCsl|jdkrgS|jjdt}tjj|jjd}|j }tjj|d||fgS(s= Microsoft Universal C Runtime SDK Libraries g,@R?Rs%sucrt%s( R|RURKRoRRRRRt _ucrt_subdir(RBRRR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt UCRTLibrariess  cCsK|jdkrgStjj|jjd}tjj|d|jgS(s; Microsoft Universal C Runtime SDK Include g,@Rs%sucrt(R|RRRRRR(RBR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyt UCRTIncludesscCs|jj}|rd|SdS(sB Microsoft Universal C Runtime SDK version subdir s%s\R (RR(RBR((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRs cCs,|jdkr"|jdkr"gS|jjS(s% Microsoft Visual F# g&@g(@(R|RR(RB((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytFSharpscCs|jjdt}|jdkr9|jj}d}n|jjjdd}d}|jdkrldn|j}|||j|f}tjj ||S(sA Microsoft Visual C++ runtime redistribuable dll R?is-redist%s\Microsoft.VC%d0.CRT\vcruntime%d0.dlls\Toolss\Redists.onecore%s\Microsoft.VC%d0.CRT\vcruntime%d0.dllg,@( RURKRoR|RRRARRR(RBRt redist_patht vcruntimetdll_ver((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pytVCRuntimeRedists  cCstd|jd|j|j|j|jg|d|jd|j|j|j|j |j g|d|jd|j|j|j |j g|d|jd|j |j|j|j|j|j|j|j|jg |}|jdkrtjj|jr|j|d A B C D _unique_everseen('ABBCcAD', str.lower) --> A B C D N(tsettaddRRt __contains__(RBtiterableRtseentseen_addtelementtk((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyRs         N("RRRORRCRRR|RRRRRRRRRRRRRRRRRRRRRRRRoR"RR(((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyR!1s:   -         - (!RORR-tplatformR tdistutils.errorsRt#setuptools.extern.packaging.versionRtsetuptools.extern.six.movesRtmonkeyRtsystemRtenvironRPRt ImportErrorRRt_msvc9_suppress_errorstdistutils.msvc9compilerR RRR+R3R#R=RTRwR!(((s3/usr/lib/python2.7/site-packages/setuptools/msvc.pyts:         + / & %[a