관리-도구
편집 파일: msvc.cpython-312.pyc
� t��e>� � �h � d Z ddlZddlmZ ddlmZmZ ddlmZm Z m Z mZ ddlm Z ddlZddlZddlZddlZddlZddlmZ ej* � dk( rddlZdd lmZ n G d � d� Z e� Zd� Zd � Zddddd�Zd� Zd� Zd� Zdd�Z G d� d� Z G d� d� Z! G d� d� Z" G d� d� Z#y) a� Improved support for Microsoft Visual C++ compilers. Known supported compilers: -------------------------- Microsoft Visual C++ 14.X: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2019 (x86, x64, arm, arm64) This may also support compilers shipped with compatible Visual Studio versions. � N)�open)�listdir�pathsep)�join�isfile�isdir�dirname)�CalledProcessError)�unique_everseen�Windows)�environc � � e Zd ZdZdZdZdZy)�winregN)�__name__� __module__�__qualname__� HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOT� � ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/msvc.pyr r s � �� � ��!�� �r r c �2 � t j t j ddt j t j z � } d}d}| 5 t j � D ]e } t j | |� \ }}}|s�!|t j k( s�5t |� s�A t t |� � }|dk\ s�\||kD s�b||}}�g ddd� ||fS # t $ r Y yw xY w# t $ r Y �'w xY w# t t f$ r Y ��w xY w# 1 sw Y ||fS xY w)�0Python 3.8 "distutils/_msvccompiler.py" backportz'Software\Microsoft\VisualStudio\SxS\VC7r �NNN� )r �OpenKeyr �KEY_READ�KEY_WOW64_32KEY�OSError� itertools�count� EnumValue�REG_SZr �int�float� ValueError� TypeError)�key�best_version�best_dir�i�v�vc_dir�vt�versions r �_msvc14_find_vc2015r2 ) s" � ���n�n��%�%�6� ��O�O�f�4�4�4� �� �L��H� � =����"� =�A� � &� 0� 0��a� 8� ��6�2� �R�6�=�=�(�U�6�]��!�%��(�m�G� �b�=�W�|�%;�-4�f�(�L� =�=� ��!�!��% � ���� � �� �� #�I�.� ����=� ��!�!�s~ �AC � D �&C%� D �D �D �$C5�8D �>D �D � C"�!C"�% C2�.D �1C2�2D �5D�D �D�D � Dc �� � t j d� xs t j d� } | syd}|D ]� }t j t t t � 5 t j t | ddd� dd d |ddd dg � j dd�� j � }t |ddd� }t |� rd|fcddd� c S ddd� �� y# 1 sw Y ��xY w)a� Python 3.8 "distutils/_msvccompiler.py" backport Returns "15, path" based on the result of invoking vswhere.exe If no install is found, returns "None, None" The version is returned to avoid unnecessarily changing the function result. It may be ignored when the path is not None. If vswhere.exe is not available, by definition, VS 2017 is not installed. �ProgramFiles(x86)�ProgramFilesr )z1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z)Microsoft.VisualStudio.Workload.WDExpresszMicrosoft Visual Studio� Installerzvswhere.exez-latestz-prereleasez -requiresz -property�installationPathz -products�*�mbcs�strict)�encoding�errors�VC� Auxiliary�Build� N) r �get� contextlib�suppressr r! �UnicodeDecodeError� subprocess�check_outputr �decode�stripr )�root�suitable_components� component�paths r �_msvc14_find_vc2017rM G s� � � �;�;�*�+�J�w�{�{�>�/J�D����� )� � � � � �!3�W�>P� Q� ��'�'�� �";�[�-�� "�%�#�!�#�*�#���� �����9����# �( ��d�K��9�D��T�{��4�x�/ � �, �- � � �6 �3 � �s �A&C�C! �x86�x64�arm�arm64)rN � x86_amd64�x86_arm� x86_arm64c � � t � \ }}d}| t v r t | }nd| v rdnd}|r.t |ddddd|d d � } ddl}|j |d� � d }|st � \ }}|rt |d|dd � }|syt |d� }t |� sy|rt |� sd}||fS # t t t f$ r d}Y �fw xY w)r N�amd64rO rN z..�redist�MSVCz**zMicrosoft.VC14*.CRTzvcruntime140.dllr T)� recursive���zMicrosoft.VC140.CRTr z vcvarsall.bat) rM �PLAT_SPEC_TO_RUNTIMEr �glob�ImportErrorr! �LookupErrorr2 r ) � plat_spec�_r, � vcruntime�vcruntime_plat�vcredistr\ r+ � vcvarsalls r �_msvc14_find_vcvarsallre � s� � �%�'�K�A�x��I��(�(�-�i�8��")�Y�"6��E�����������!�� �� ��� � �(�d� �;�B�?�I� �!4�!6���h������%�"��I� ���X��/�I��)����F�9�-�� ��i����1 �W�k�2� ��I� �s � B( �(C� Cc � � dt v r6t j � D ��ci c] \ }}|j � |�� c}}S t | � \ }}|st j j d� � t j dj || � t j �� j dd�� }d � |j � D � D ���ci c] \ }}}|r|r|j � |�� }}}}|r||d<