a XC?h'N ã @ sÆ d Z ddlZddlZddlZddlmZmZmZmZm Z ddl mZmZ ddl mZ ddlmZ ddlmZ dd „ Zd d„ Zdd dddœZdd„ Zdd„ Zddd„ZdddddœZG dd„ deƒZdS )a distutils._msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for Microsoft Visual Studio 2015. The module is compatible with VS 2015 and later. You can find legacy support for older versions in distutils.msvc9compiler and distutils.msvccompiler. é N)ÚDistutilsExecErrorÚDistutilsPlatformErrorÚCompileErrorÚLibErrorÚ LinkError)Ú CCompilerÚgen_lib_options)Úlog)Úget_platform)Úcountc C s zt jt jdt jt jB d} W n ty< t d¡ Y dS 0 d}d }| ¬ tƒ D ]”}zt | |¡\}}}W n ty„ Y qèY n0 |rR|t j krRtj |¡rRztt|ƒƒ}W n ttfyÊ Y qRY n0 |dkrR||krR|| }}qRW d ƒ n1 sþ0 Y ||fS )Nz'Software\Microsoft\VisualStudio\SxS\VC7)ÚaccesszVisual C++ is not registered©NNr é )ÚwinregZ OpenKeyExÚHKEY_LOCAL_MACHINEZKEY_READZKEY_WOW64_32KEYÚOSErrorr Údebugr Z EnumValueZREG_SZÚosÚpathÚisdirÚintÚfloatÚ ValueErrorÚ TypeError)ÚkeyÚbest_versionÚbest_dirÚiÚvZvc_dirZvtÚversion© r ú