Edit File: msvccompiler.cpython-38.opt-2.pyc
U ����@��d\����������������������@���s���d�dl�Z�d�dlZd�dlmZmZmZmZmZ�d�dlm Z m Z mZ�d�dlm Z �dZz,d�dlZdZeZejZejZejZejZW�nh�ek r����z4d�dlZd�dlZdZeZejZejZejZejZW�n�ek r����e �d��Y�nX�Y�nX�er�ejejejej fZ!dd ��Z"d d��Z#dd ��Z$G�dd��d�Z%dd��Z&dd��Z'dd��Z(G�dd��de �Z)e&��dk�r~e �*d��e)Z+d�dl,m)Z)�d�dl,m%Z%�dS�)�����N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError� LinkError)� CCompiler�gen_preprocess_options�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting Make sure that Python modules winreg, win32api or win32con are installed.c�����������������C���sn���zt�|�|�}W�n�tk r$���Y�d�S�X�g�}d}zt||�}W�n�tk rT���Y�qjY�nX�|�|��|d7�}q.|S��Nr�������)�RegOpenKeyEx�RegError� RegEnumKey�append)�base�key�handle�L�i�k��r����;/opt/alt/python38/lib64/python3.8/distutils/msvccompiler.py� read_keys7���s���� r���c�����������������C���s����zt�|�|�}W�n�tk r$���Y�d�S�X�i�}d}zt||�\}}}W�n�tk rZ���Y�q~Y�nX�|���}t|�|t|�<�|d7�}q.|S�r���)r ���r����RegEnumValue�lower�convert_mbcs)r���r���r����dr����name�value�typer���r���r����read_valuesH���s���� r!���c�����������������C���s:���t�|�dd��}|d�k r6z|d�}�W�n�tk r4���Y�nX�|�S�)N�decode�mbcs)�getattr�UnicodeError)�sZdecr���r���r���r���]���s����r���c�������������������@���s,���e�Zd�Zdd��Zdd��Zdd��Zdd��Zd S�) � MacroExpanderc�����������������C���s���i�|�_�|��|��d�S��N)�macros�load_macros)�self�versionr���r���r����__init__g���s����zMacroExpander.__init__c�����������������C���s2���t�D�](}t||�}|r||�|�jd|�<��q.qd�S�)Nz$(%s))�HKEYSr!���r)���)r+���Zmacro�pathr���r���r���r���r���r���� set_macrok���s ���� zMacroExpander.set_macroc����������� ��� ���C���s����d|�}|���d|d�d��|���d|d�d��d}|���d|d ��z*|d krX|���d|d��n|���d|d ��W�n*�tk r��}�ztd��W�5�d�}~X�Y�nX�d}tD�]V}zt||�}W�n�tk r����Y�q�Y�nX�t|d�}t|d||f��} | d�|�jd<�q�d�S�)Nz%Software\Microsoft\VisualStudio\%0.1fZVCInstallDirz \Setup\VCZ productdirZVSInstallDirz \Setup\VSz Software\Microsoft\.NETFrameworkZFrameworkDirZinstallrootg������@ZFrameworkSDKDirzsdkinstallrootv1.1Zsdkinstallroota��Python 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.z.Software\Microsoft\NET Framework Setup\Productr���z%s\%sr,���z$(FrameworkVersion)) r0����KeyErrorr���r.���r ���r���r���r!���r)���) r+���r,���ZvsbaseZnet�exc�pr����hr���r���r���r���r���r*���r���s,����� zMacroExpander.load_macrosc�����������������C���s$���|�j����D�]\}}|�||�}q |S�r(���)r)����items�replace)r+���r&���r����vr���r���r����sub����s����zMacroExpander.subN)�__name__� __module__�__qualname__r-���r0���r*���r8���r���r���r���r���r'���f���s���r'���c������������������C���s����d}�t�j�|��}|dkrdS�|t|���}t�j|d����dd�\}}t|d�d���d�}|dkrf|d7�}t|dd ���d �}|dkr�d}|dkr�||�S�d�S�)NzMSC v.�������� r������� �����������g������$@r���)�sysr,����find�len�split�int)�prefixr���r&����restZmajorVersionZminorVersionr���r���r����get_build_version����s����rJ���c������������������C���s@���d}�t�j�|��}|dkrdS�t�j�d|�}t�j|t|���|��S�)Nz bit (r<����Intel�))rC���r,���rD���rE���)rH���r����jr���r���r����get_build_architecture����s����rN���c�����������������C���s0���g�}|�D�]"}t�j�|�}||kr|�|��q|S�r(���)�osr/����normpathr���)�pathsZ reduced_pathsr3���Znpr���r���r����normalize_and_reduce_paths����s����rR���c���������������� ���@���s����e�Zd�ZdZi�ZdgZdddgZdgZdgZee�e�e�Z dZ d Zd ZdZ d�ZZd Zd,dd�Zdd��Zd-dd�Zd.dd�Zd/dd�Zd0dd�Zdd��Zdd ��Zd!d"��Zd1d#d$�Zd%d&��Zd2d(d)�Zd*d+��ZdS�)3�MSVCCompilerZmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exer���c�����������������C���sv���t��|�|||��t��|�_t��|�_|�jdkr\|�jdkrHd|�_t|�j�|�_nd|�_d|�j�|�_ nd|�jd��|�_ d|�_ d�S�) NrK�������zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %sr=���F)r���r-���rJ����_MSVCCompiler__versionrN����_MSVCCompiler__arch�_MSVCCompiler__rootr'����_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r+����verboseZdry_runZforcer���r���r���r-�������s���� zMSVCCompiler.__init__c�����������������C���s���g�|�_�dtjkrDdtjkrD|��d�rDd|�_d|�_d|�_d|�_d|�_nx|�� d�|�_�t |�j��d krltd |�j���|��d�|�_|��d�|�_|��d�|�_|��d�|�_|��d�|�_|�� d��|�� d��z&tjd��d �D�]}|�j��|��q�W�n�tk r����Y�nX�t|�j��|�_�d �|�j��tjd<�d�|�_|�jdk�rPddddddg|�_dddddddg|�_n&ddddddg|�_dddddddg|�_dddg|�_|�jdk�r�ddddg|�_ndddddg|�_dg|�_d |�_d�S�)!NZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer/���r���zxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�libZinclude�;rK���z/nologoz/Oxz/MDz/W3z/GXz/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOrU���z/INCREMENTAL:noz/DEBUGz /pdb:NoneT)�_MSVCCompiler__pathsrO����environ�find_exe�cc�linkerr]����rc�mc�get_msvc_pathsrE���r���rZ����set_path_env_varrF���r���r1���rR����joinZpreprocess_optionsrW����compile_options�compile_options_debug�ldflags_sharedrV����ldflags_shared_debugZldflags_staticr[���)r+���r3���r���r���r���� initialize����sr����� � �� � �����������zMSVCCompiler.initialize��c�����������������C���s����|d�krd}g�}|D�]�}t�j�|�\}}t�j�|�d�}|t�j�|�d���}||�jkrbtd|���|rrt�j�|�}||�jkr�|� t�j� |||�j����q||�jkr�|� t�j� |||�j����q|� t�j� |||�j ����q|S�)Nrn���r���zDon't know how to compile %s)rO���r/����splitext� splitdrive�isabs�src_extensionsr����basename�_rc_extensionsr���rh���� res_extension�_mc_extensions� obj_extension)r+���Zsource_filenamesZ strip_dir� output_dirZ obj_namesZsrc_namer����extr���r���r����object_filenames8��s.����� � ��zMSVCCompiler.object_filenamesNc �����������������C���sp��|�j�s|�����|��||||||�} | \}} }}}|p6g�} | �d��|rT| �|�j��n| �|�j��| D��]}z||�\}}W�n�tk r����Y�qdY�nX�|r�tj � |�}||�jkr�d|�}�nT||�jkr�d|�}�n>||�j k�r<|}d|�}z"|��|�jg|�|g�|g���W�qd�tk �r6�}�zt|��W�5�d�}~X�Y�qdX�qdn�||�jk�r�tj �|�}tj �|�}zl|��|�jgd|d|g�|g���tj �tj �|��\}}tj �||d��}|��|�jgd|�g�|g���W�qd�tk �r��}�zt|��W�5�d�}~X�Y�qdX�qdntd||f���d |�}z&|��|�jg| �|�||g�|���W�qd�tk �rh�}�zt|��W�5�d�}~X�Y�qdX�qd| S�) Nz/cz/Tcz/Tpz/foz-hz-rrT���z"Don't know how to compile %s to %sz/Fo)r[���rm���Z_setup_compiler����extendrj���ri���r1���rO���r/����abspath� _c_extensions�_cpp_extensionsrt����spawnrd���r���r���rv����dirnamere���ro���rs���rh���rb���)r+���Zsourcesrx���r)���Zinclude_dirs�debug� extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcry���Z input_optZ output_opt�msgZh_dirZrc_dirr����_Zrc_filer���r���r����compileW��s����� ��� �� �� �� ��� zMSVCCompiler.compilec����������� ��� ���C���s����|�j�s|�����|��||�\}}|�j||d�}|��||�r�|d|�g�}|rJz|��|�jg|���W�q��tk r��}�zt|��W�5�d�}~X�Y�q�X�nt � d|��d�S�)N)rx����/OUT:�skipping %s (up-to-date))r[���rm����_fix_object_args�library_filename� _need_linkr���r]���r���r���r ���r����) r+���r����Zoutput_libnamerx���r�����target_lang�output_filenameZlib_argsr����r���r���r����create_static_lib���s�����zMSVCCompiler.create_static_libc�������������� ���C���s���|�j�s|�����|��||�\}}|��|||�}|\}}}|rL|��dt|����t|�|||�}|d�k rptj� ||�}|�� ||��r�|tjkr�| r�|�j dd���}q�|�jdd���}n| r�|�j }n|�j}g�}|p�g�D�]}|�d|���q�||�|�|�d|�g�}|d�k �rHtj�tj�|��\}}tj� tj�|d��|��|��}|�d|���| �rZ| |d�d�<�|�rj|�|��|��tj�|���z|��|�jg|���W�n,�tk �r��}�zt|��W�5�d�}~X�Y�nX�nt�d|��d�S�)Nz5I don't know what to do with 'runtime_library_dirs': r���z/EXPORT:r����r���z/IMPLIB:r����)r[���rm���r����Z _fix_lib_args�warn�strr ���rO���r/���rh���r����r���Z EXECUTABLErl���rk���r���ro���rs���r����r����r{���Zmkpathr���rc���r���r���r ���r����)r+���Ztarget_descr����r����rx���Z librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr����r����r����Z build_tempr����Z fixed_argsZlib_optsZldflagsZexport_optsZsymZld_argsZdll_nameZdll_extZimplib_filer����r���r���r����link���sj����� ��� �� �� zMSVCCompiler.linkc�����������������C���s���d|�S�)Nz /LIBPATH:r����r+����dirr���r���r����library_dir_option��s����zMSVCCompiler.library_dir_optionc�����������������C���s���t�d��d�S�)Nz<don't know how to set runtime library search path for MSVC++)r���r����r���r���r����runtime_library_dir_option��s�����z'MSVCCompiler.runtime_library_dir_optionc�����������������C���s ���|���|�S�r(���)r����)r+���r]���r���r���r����library_option��s����zMSVCCompiler.library_optionc�����������������C���s\���|r|d�|g}n|g}|D�]:}|D�]0}t�j�||��|��}t�j�|�r$|����S�q$qd�S�)NZ_d)rO���r/���rh���r�����exists)r+����dirsr]���r����Z try_namesr����r���Zlibfiler���r���r����find_library_file#��s����zMSVCCompiler.find_library_filec�����������������C���sz���|�j�D�].}tj�tj�|�|�}tj�|�r|��S�qtjd��d�D�].}tj�tj�|�|�}tj�|�rF|��S�qF|S�)N�Pathr^���)r_���rO���r/���rh���r|����isfiler`���rF���)r+���Zexer3����fnr���r���r���ra���5��s���� zMSVCCompiler.find_exe�x86c�����������������C���s����t�sg�S�|d�}|�jdkr,d|�j|�jf�}nd|�j|f�}tD�]H}t||�}|r>|�jdkrt|�j�||���d���S�||��d���S�q>|�jdkr�tD�]&}t|d|�j��d�k r�|��d���q�q�g�S�) Nz dirsrU���z6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesr^���r=���z%s\6.0z�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.) � _can_read_regrV���rX���r.���r!���rY���r8���rF���r����)r+���r/����platformr���r���r���r���r���r���rf���K��s,���� �� zMSVCCompiler.get_msvc_pathsc�����������������C���s6���|dkr|���d�}n |���|�}|r2d�|�tj|<�d�S�)Nr]���Zlibraryr^���)rf���rh���rO���r`���)r+���r���r3���r���r���r���rg���o��s ���� zMSVCCompiler.set_path_env_var)r���r���r���)r���rn���)NNNr���NNN)Nr���N) NNNNNr���NNNN)r���)r����)r9���r:���r;���Z compiler_typeZexecutablesr}���r~���rt���rv���rr���ru���rw���Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ exe_extensionr-���rm���rz���r����r����r����r����r����r����r����ra���rf���rg���r���r���r���r���rS�������sh��� �� B��� ������������� X���� ����������� S $rS���g������ @z3Importing new compiler from distutils.msvc9compiler)rS���)r'���)-rC���rO���Zdistutils.errorsr���r���r���r���r���Zdistutils.ccompilerr���r���r ���Z distutilsr ���r�����winregZhkey_modZ OpenKeyExr ���ZEnumKeyr���Z EnumValuer����errorr����ImportErrorZwin32apiZwin32con�infoZ HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr.���r���r!���r���r'���rJ���rN���rR���rS���r����ZOldMSVCCompilerZdistutils.msvc9compilerr���r���r���r����<module>���s^��� � - ���9