Your IP : 3.144.255.110


Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/setuptools/__pycache__/msvc.cpython-311.pyc

�

\�bgv���|�UdZddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlm
Z
ddlZe
rddlmZmZe
sej��dkrddlZddlmZnGd	�d
��Ze��Zded<Gd
�d��ZGd�d��ZGd�d��ZGd�de��ZGd�d��ZdS)zo
Environment info about Microsoft Compilers.

>>> getfixture('windows_only')
>>> ei = EnvironmentInfo('amd64')
�)�annotationsN)�
TYPE_CHECKING�	TypedDict)�unique_everseen)�
LiteralString�NotRequired�Windows)�environc��eZdZdZdZdZdZdS)�winregN)�__name__�
__module__�__qualname__�
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOT���`/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/setuptools/msvc.pyrr s'�������
� ��!�� ���rrzdict[str, str]r
c��eZdZdZejdd�����Zdd�Ze	d���Z
d�Zd	�Zddd�Z
ddd
�Zdd�ZdS)�PlatformInfoz�
    Current and Target Architectures information.

    Parameters
    ----------
    arch: str
        Target architecture.
    �processor_architecture��return�Nonec�`�|����dd��|_dS)N�x64�amd64)�lower�replace�arch)�selfr"s  r�__init__zPlatformInfo.__init__5s%���J�J�L�L�(�(���8�8��	�	�	rc�V�|j|j�d��dzd�S)zs
        Return Target CPU architecture.

        Return
        ------
        str
            Target CPU
        �_�N)r"�find�r#s r�
target_cpuzPlatformInfo.target_cpu8s*���y������,�,�q�0�2�2�3�3rc��|jdkS)z�
        Return True if target CPU is x86 32 bits..

        Return
        ------
        bool
            CPU is x86 32 bits
        �x86�r*r)s r�
target_is_x86zPlatformInfo.target_is_x86Ds����%�'�'rc��|jdkS)z�
        Return True if current CPU is x86 32 bits..

        Return
        ------
        bool
            CPU is x86 32 bits
        r,��current_cpur)s r�current_is_x86zPlatformInfo.current_is_x86Os����5�(�(rF�strc�R�|jdkr|rdn|jdkr|rdn	d|jzS)uk
        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
        ------
        str
            subfolder: '	arget', or '' (see hidex86 parameter)
        r,rr�\x64�\%sr0�r#�hidex86rs   r�current_dirzPlatformInfo.current_dirZsJ��$� �E�)�)�g�)�
�B�� �G�+�+��+����$�*�*�	
rc�R�|jdkr|rdn|jdkr|rdn	d|jzS)ar
        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
        ------
        str
            subfolder: '\current', or '' (see hidex86 parameter)
        r,rrr5r6r-r7s   r�
target_dirzPlatformInfo.target_dirrsG��$��5�(�(�W�(�
�B���7�*�*�s�*����$�/�)�	
rc��|rdn|j}|j|krdn*|����dd|z��S)ap
        Cross platform specific subfolder.

        Parameters
        ----------
        forcex86: bool
            Use 'x86' as current architecture even if current architecture is
            not x86.

        Return
        ------
        str
            subfolder: '' if target architecture is current architecture,
            '\current_target' if not.
        r,r�\z\%s_)r1r*r;r!)r#�forcex86�currents   r�	cross_dirzPlatformInfo.cross_dir�sR�� $�9�%�%��)9����'�)�)�
�B����"�"�*�*�4��7�1B�C�C�	
rN�rr)FF�rr3�F)r
rr�__doc__r
�getr r1r$�propertyr*r.r2r9r;r@rrrrr)s����������'�+�6��;�;�A�A�C�C�K�9�9�9�9��	4�	4��X�	4�	(�	(�	(�	)�	)�	)�
�
�
�
�
�0
�
�
�
�
�0
�
�
�
�
�
rrc�*�eZdZdZejejejejfZ	dd�Z
edd���Zed���Z
ed���Zed	���Zedd
���Zedd���Zed���Zed
���Zedd���Zdd�Zd�ZdS)�RegistryInfoz�
    Microsoft Visual Studio related registry information.

    Parameters
    ----------
    platform_info: PlatformInfo
        "PlatformInfo" instance.
    rrc��||_dS�N)�pi)r#�
platform_infos  rr$zRegistryInfo.__init__�s
������rr3c��dS)z�
        Microsoft Visual Studio root registry key.

        Return
        ------
        str
            Registry key
        �VisualStudiorr)s r�visualstudiozRegistryInfo.visualstudio�s	���~rc�L�tj�|jd��S)z
        Microsoft Visual Studio SxS registry key.

        Return
        ------
        str
            Registry key
        �SxS)�os�path�joinrOr)s r�sxszRegistryInfo.sxs�s���w�|�|�D�-�u�5�5�5rc�L�tj�|jd��S)z|
        Microsoft Visual C++ VC7 registry key.

        Return
        ------
        str
            Registry key
        �VC7�rRrSrTrUr)s r�vczRegistryInfo.vc�����w�|�|�D�H�e�,�,�,rc�L�tj�|jd��S)z
        Microsoft Visual Studio VS7 registry key.

        Return
        ------
        str
            Registry key
        �VS7rXr)s r�vszRegistryInfo.vs�rZrc��dS)z�
        Microsoft Visual C++ for Python registry key.

        Return
        ------
        str
            Registry key
        zDevDiv\VCForPythonrr)s r�
vc_for_pythonzRegistryInfo.vc_for_python�s
��%�$rc��dS)zq
        Microsoft SDK registry key.

        Return
        ------
        str
            Registry key
        zMicrosoft SDKsrr)s r�
microsoft_sdkzRegistryInfo.microsoft_sdk�s
�� �rc�L�tj�|jd��S)z�
        Microsoft Windows/Platform SDK registry key.

        Return
        ------
        str
            Registry key
        r	�rRrSrTrar)s r�windows_sdkzRegistryInfo.windows_sdk�s���w�|�|�D�.�	�:�:�:rc�L�tj�|jd��S)z�
        Microsoft .NET Framework SDK registry key.

        Return
        ------
        str
            Registry key
        �NETFXSDKrcr)s r�	netfx_sdkzRegistryInfo.netfx_sdk
s���w�|�|�D�.�
�;�;�;rc��dS)z�
        Microsoft Windows Kits Roots registry key.

        Return
        ------
        str
            Registry key
        zWindows Kits\Installed Rootsrr)s r�windows_kits_rootszRegistryInfo.windows_kits_rootss
��/�.rFc��|j���s|rdnd}tj�d|d|��S)a
        Return key in Microsoft software registry.

        Parameters
        ----------
        key: str
            Registry key path where look.
        x86: str
            Force x86 software registry.

        Return
        ------
        str
            Registry key
        r�Wow6432Node�Software�	Microsoft)rKr2rRrSrT)r#�keyr,�node64s    r�	microsoftzRegistryInfo.microsoft"s?�� �w�-�-�/�/�I�3�I���M���w�|�|�J���S�A�A�Arc	��tj}tj}tj}|j}|jD]�}d}	||||��d|��}nV#t$rI|j���s+	||||d��d|��}n#t$rYY�gwxYwY�mYnwxYw	tj	||��d|r||��cScS#t$rYnwxYw	|r||����#|r||��wwxYwdS)a
        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
        NrT)
r�KEY_READ�OpenKey�CloseKeyrp�HKEYS�OSErrorrKr2�QueryValueEx)	r#rn�name�key_read�openkey�closekey�ms�hkey�bkeys	         r�lookupzRegistryInfo.lookup5s��� �?���.���?��
�^���J�	#�	#�D��D�	
��w�t�R�R��W�W�a��:�:�����
�
�
��w�-�-�/�/��!�&�w�t�R�R��T�]�]�A�x�H�H����"�!�!�!� ���!�����H�	��
����
#��*�4��6�6�q�9��#��H�T�N�N�N�N�N�N�#�#�#���
�
�
���
������#��H�T�N�N�N����#��H�T�N�N�N�N�#�����tsY�A�#B#�4B
�B#�
B�B#�B�B#�"B#�'C�
C!�C3� C!�!C3�3DNrArBrC)r
rrrDrrrrrrur$rFrOrUrYr]r_rardrgrirprrrrrHrH�s���������	��� ��!�� �	
�E� � � � ��	�	�	��X�	��	6�	6��X�	6��	-�	-��X�	-��	-�	-��X�	-��	%�	%�	%��X�	%��	 �	 �	 ��X�	 ��	;�	;��X�	;��	<�	<��X�	<��	/�	/�	/��X�	/�B�B�B�B�&'�'�'�'�'rrHc�*�eZdZdZejdd��Zejdd��Zejde��Zd%d&d	�Z	d
�Z
d�Zd'd
�Ze
d���Zed���Zed���Zd�Zd�Zed(d���Zed���Zed)d���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed*d!���Zed*d"���Z d*d#�Z!e
d+d$���Z"dS),�
SystemInfoz�
    Microsoft Windows and Visual Studio related system information.

    Parameters
    ----------
    registry_info: RegistryInfo
        "RegistryInfo" instance.
    vc_ver: float
        Required Microsoft Visual C++ version.
    �WinDirr�ProgramFileszProgramFiles(x86)Nrrc��||_|jj|_|���|_|p|���x|_|_dSrJ)�rirK�find_programdata_vs_vers�known_vs_paths�_find_latest_available_vs_ver�vs_ver�vc_ver)r#�
registry_infor�s   rr$zSystemInfo.__init__qsM������'�*���"�;�;�=�=���%+�$R�d�.P�.P�.R�.R�R���d�k�k�krc��|���}|s&|jstj�d���t|��}|�|j��t|��dS)zm
        Find the latest VC version

        Return
        ------
        float
            version
        z%No Microsoft Visual C++ version found���)�find_reg_vs_versr��	distutils�errors�DistutilsPlatformError�set�update�sorted)r#�reg_vc_vers�vc_verss   rr�z(SystemInfo._find_latest_available_vs_verzsz���+�+�-�-���	�t�2�	��"�9�9�7���
��k�"�"�����t�*�+�+�+��g���r�"�"rc
��|jj}|jj|jj|jjf}g}tj|jj|��D�]w\}}	tj	|||��dtj
��}n#t$rY�>wxYw|5tj|��\}}}	t|��D]t}
tjt ��5t#tj||
��d��}||vr|�|��ddd��n#1swxYwY�ut|��D]n}
tjt ��5t#tj||
����}||vr|�|��ddd��n#1swxYwY�o	ddd��n#1swxYwY��yt+|��S)z�
        Find Microsoft Visual Studio versions available in registry.

        Return
        ------
        list of float
            Versions
        rN)r�rprYr_r]�	itertools�productrurrsrrrv�QueryInfoKey�range�
contextlib�suppress�
ValueError�float�	EnumValue�append�EnumKeyr�)r#r|�vckeys�vs_versr}rnr~�subkeys�valuesr&�i�vers            rr�zSystemInfo.find_reg_vs_vers�s����W�
���'�*�d�g�3�T�W�Z�@����"�*�4�7�=�&�A�A�	0�	0�I�D�#�
��~�d�B�B�s�G�G�Q���H�H�����
�
�
���
�����
0�
0�%+�%8��%>�%>�"�����v���0�0�A�#�,�Z�8�8�0�0�#�F�$4�T�1�$=�$=�a�$@�A�A���g�-�-�#�N�N�3�/�/�/�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0���w���0�0�A�#�,�Z�8�8�0�0�#�F�N�4��$;�$;�<�<���g�-�-�#�N�N�3�/�/�/�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0��0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0���g���sn�*B�
B�B�AF=�AD&	�F=�&D*
�*F=�-D*
�..F=�<F$	�F=�$F(
�(F=�+F(
�,F=�=G	�G	�dict[float, str]c��i}d}	tj|��}n#t$r|cYSwxYw|D]�}	tj�||d��}t|dd���5}t
j|��}ddd��n#1swxYwY|d}tjtj�|d����|||�|d	��<��#ttf$rY��wxYw|S)
z�
        Find Visual studio 2017+ versions from information in
        "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances".

        Return
        ------
        dict
            float version as key, path as value.
        z9C:\ProgramData\Microsoft\VisualStudio\Packages\_Instancesz
state.json�rtzutf-8)�encodingN�installationPath�
VC\Tools\MSVC�installationVersion)
rR�listdirrvrSrT�open�json�load�_as_float_version�KeyError)	r#�vs_versions�
instances_dir�hashed_namesrx�
state_path�
state_file�state�vs_paths	         rr�z#SystemInfo.find_programdata_vs_vers�sq��)+��T�
�	��:�m�4�4�L�L���	�	�	�����	����!�	�	�D�
��W�\�\�-��|�L�L�
��*�d�W�=�=�=�2�� �I�j�1�1�E�2�2�2�2�2�2�2�2�2�2�2����2�2�2�2�� 2�3���
�2�7�<�<��1A�B�B�C�C�C���D�2�2�5�9N�3O�P�P�Q�Q���X�&�
�
�
���
�����sB��*�*�3C*�%B�:C*�B
	�
C*�
B
	�AC*�*C>�=C>c�|�td�|�d��dd�����S)z�
        Return a string version as a simplified float version (major.minor)

        Parameters
        ----------
        version: str
            Version.

        Return
        ------
        float
            version
        �.N�)r�rT�split)�versions rr�zSystemInfo._as_float_version�s3���S�X�X�g�m�m�C�0�0��!��4�5�5�6�6�6rc��tj�|jd|jz��}|j�|jjd|jz��p|S)zp
        Microsoft Visual Studio directory.

        Return
        ------
        str
            path
        zMicrosoft Visual Studio %0.1f�%0.1f)rRrSrT�ProgramFilesx86r�r�rr])r#�defaults  r�VSInstallDirzSystemInfo.VSInstallDir�sQ���'�,�,�� �"A�D�K�"O�
�
��
�w�~�~�d�g�j�'�D�K�*?�@�@�K�G�Krc���|���p|���}tj�|��s!d}t
j�|���|S)zm
        Microsoft Visual C++ directory.

        Return
        ------
        str
            path
        z(Microsoft Visual C++ directory not found)�	_guess_vc�_guess_vc_legacyrRrS�isdirr�r�r�)r#rS�msgs   r�VCInstallDirzSystemInfo.VCInstallDir�s[���~�~���:�4�#8�#8�#:�#:���w�}�}�T�"�"�	?�<�C��"�9�9�#�>�>�>��rc��|jdkrdS	|j|j}n#t$r
|j}YnwxYwtj�|d��}	t	j|��d}|�|��|_	tj�||��S#ttf$rYdSwxYw)zl
        Locate Visual C++ for VS2017+.

        Return
        ------
        str
            path
        �,@rr�r�)r�r�r�r�rRrSrTr�r�r�rv�
IndexError)r#�vs_dir�guess_vcr�s    rr�zSystemInfo._guess_vcs����;�$����2�	'��(���5�F�F���	'�	'�	'��&�F�F�F�	'�����7�<�<��(8�9�9��	��Z��)�)�"�-�F��0�0��8�8�D�K��7�<�<��&�1�1�1����$�	�	�	��2�2�	���s�"�6�6�AB.�.C�Cc��tj�|jd|jz��}tj�|jjd|jz��}|j�|d��}|r tj�|d��n|}|j�|jjd|jz��p|S)z{
        Locate Visual C++ for versions prior to 2017.

        Return
        ------
        str
            path
        z Microsoft Visual Studio %0.1f\VCr��
installdir�VC)	rRrSrTr�r�r�r_rrY)r#r��reg_path�	python_vc�
default_vcs     rr�zSystemInfo._guess_vc_legacy*s����'�,�,�� �"E���"S�
�
��
�7�<�<��� 5�w���7L�M�M���G�N�N�8�\�:�:�	�6?�L�R�W�\�\�)�T�2�2�2�W�
��w�~�~�d�g�j�'�D�K�*?�@�@�N�J�Nr�tuple[LiteralString, ...]c��|jdkrdS|jdkrdS|jdkrdS|jdkrdS|jd	krd
SdS)z�
        Microsoft Windows SDK versions for specified MSVC++ version.

        Return
        ------
        tuple of str
            versions
        �"@)z7.0z6.1z6.0a�$@)z7.1z7.0a�&@)z8.0z8.0a�(@)�8.1z8.1ar�)z10.0r�r�r�r)s r�WindowsSdkVersionzSystemInfo.WindowsSdkVersion?sd���;�#���'�'�
�[�D�
 �
 � �=�
�[�D�
 �
 � �=�
�[�D�
 �
 � �=�
�[�D�
 �
 � �=��rrc�r�|�tj�|jd����S)zt
        Microsoft Windows SDK last version.

        Return
        ------
        str
            version
        �lib)�_use_last_dir_namerRrSrT�
WindowsSdkDirr)s r�WindowsSdkLastVersionz SystemInfo.WindowsSdkLastVersionUs+���&�&�r�w�|�|�D�4F��'N�'N�O�O�Or�
str | Nonec�6�d}|jD]N}tj�|jjd|z��}|j�|d��}|rn�O|rtj�|��sotj�|jjd|j	z��}|j�|d��}|r tj�|d��}|rtj�|��sr|jD]j}|d|�
d���}d	|z}tj�|j|��}tj�|��r|}�k|rtj�|��sU|jD]M}d
|z}tj�|j|��}tj�|��r|}�N|s%tj�|jd��}|S)zn
        Microsoft Windows SDK directory.

        Return
        ------
        str
            path
        rzv%s�installationfolderr�r��WinSDKNr�zMicrosoft SDKs\Windows Kits\%szMicrosoft SDKs\Windows\v%s�PlatformSDK)
r�rRrSrTr�rdrr�r_r��rfindr�r�)r#�sdkdirr��locrS�install_base�intver�ds        rr�zSystemInfo.WindowsSdkDiras��� ���)�	�	�C��'�,�,�t�w�2�E�C�K�@�@�C��W�^�^�C�)=�>�>�F��
���
��	>�R�W�]�]�6�2�2�	>��7�<�<��� 5�w���7L�M�M�D��7�>�>�$��=�=�L��
>�����l�H�=�=���	�R�W�]�]�6�2�2�	��-�
�
���-�s�y�y��~�~�-�.��8�6�A���G�L�L��!2�D�9�9���7�=�=��#�#���F���	�R�W�]�]�6�2�2�	��-�
�
��4�s�:���G�L�L��!2�D�9�9���7�=�=��#�#���F���	D��W�\�\�$�"3�]�C�C�F��
rc��|jdkrd}d}n-d}|jdkrdnd}|j�d|���}d	||�d
d��fz}g}|jdkr9|jD]1}|t
j�|jj	||��gz
}�2|j
D]4}|t
j�|jjd
|z|��gz
}�5|D]#}|j�|d��}|r|cS�$dS)zy
        Microsoft Windows SDK executable directory.

        Return
        ------
        str
            path
        r��#r�(r�TF)rr8zWinSDK-NetFx%dTools%sr=�-r�zv%sAr�N)
r�rKr9r!�NetFxSdkVersionrRrSrTr�rgr�rdr)	r#�netfxverr"r8�fx�regpathsr�rS�execpaths	         r�WindowsSDKExecutablePathz#SystemInfo.WindowsSDKExecutablePath�s>���;�$����H��D�D��H�"�k�T�1�1�d�d�u�G��7�&�&�4��&�A�A�D�
$��$�,�,�t�S�2I�2I�'J�
J�����;�$����+�
G�
G���R�W�\�\�$�'�*;�S�"�E�E�F�F����)�	N�	N�C������d�g�&9�6�C�<��L�L�M�M�H�H��	 �	 �D��w�~�~�d�,@�A�A�H��
 �����
 ��trc��tj�|jjd|jz��}|j�|d��pdS)zl
        Microsoft Visual F# directory.

        Return
        ------
        str
            path
        z%0.1f\Setup\F#�
productdirr)rRrSrTr�rOr�r)r#rSs  r�FSharpInstallDirzSystemInfo.FSharpInstallDir�sA���w�|�|�D�G�0�2C�d�k�2Q�R�R���w�~�~�d�L�1�1�7�R�7rc��|jdkrdnd}|D]2}|j�|jjd|z��}|r|pdcS�3dS)zt
        Microsoft Universal CRT SDK directory.

        Return
        ------
        str
            path
        r�)�10�81rz
kitsroot%srN)r�r�rri)r#�versr�r�s    r�UniversalCRTSdkDirzSystemInfo.UniversalCRTSdkDir�sm�� $�{�d�2�2�|�|����	$�	$�C��W�^�^�D�G�$>��s�@R�S�S�F��
$��|��#�#�#�
$��trc�r�|�tj�|jd����S)z�
        Microsoft Universal C Runtime SDK last version.

        Return
        ------
        str
            version
        r�)r�rRrSrTrr)s r�UniversalCRTSdkLastVersionz%SystemInfo.UniversalCRTSdkLastVersion�s+���&�&�r�w�|�|�D�4K�U�'S�'S�T�T�Trc� �|jdkrdndS)z�
        Microsoft .NET Framework SDK versions.

        Return
        ------
        tuple of str
            versions
        r�)	z4.7.2z4.7.1z4.7z4.6.2z4.6.1z4.6z4.5.2z4.5.1z4.5rr�r)s rr�zSystemInfo.NetFxSdkVersion�s"���{�d�"�"�
X�W��	
rc��d}|jD]K}tj�|jj|��}|j�|d��}|rn�L|S)zu
        Microsoft .NET Framework SDK directory.

        Return
        ------
        str
            path
        r�kitsinstallationfolder)r�rRrSrTr�rgr)r#r�r�r�s    r�NetFxSdkDirzSystemInfo.NetFxSdkDir�sb�����'�	�	�C��'�,�,�t�w�0�#�6�6�C��W�^�^�C�)A�B�B�F��
���
��
rc��tj�|jd��}|j�|jjd��p|S)zw
        Microsoft .NET Framework 32bit directory.

        Return
        ------
        str
            path
        zMicrosoft.NET\Framework�frameworkdir32�rRrSrTr�r�rrY�r#�guess_fws  r�FrameworkDir32zSystemInfo.FrameworkDir32s>���7�<�<���-G�H�H���w�~�~�d�g�j�*:�;�;�G�x�Grc��tj�|jd��}|j�|jjd��p|S)zw
        Microsoft .NET Framework 64bit directory.

        Return
        ------
        str
            path
        zMicrosoft.NET\Framework64�frameworkdir64rrs  r�FrameworkDir64zSystemInfo.FrameworkDir64s>���7�<�<���-I�J�J���w�~�~�d�g�j�*:�;�;�G�x�Gr�tuple[str, ...]c�,�|�d��S)z�
        Microsoft .NET Framework 32bit versions.

        Return
        ------
        tuple of str
            versions
        � ��_find_dot_net_versionsr)s r�FrameworkVersion32zSystemInfo.FrameworkVersion32"����*�*�2�.�.�.rc�,�|�d��S)z�
        Microsoft .NET Framework 64bit versions.

        Return
        ------
        tuple of str
            versions
        �@rr)s r�FrameworkVersion64zSystemInfo.FrameworkVersion64.rrc�d�|j�|jjd|z��}t|d|z��}|p|�|d��pd}|jdkr|dfS|jdkr&|���dd	�d
krdn|dfS|jd
krdS|jdkrdSdS)z�
        Find Microsoft .NET Framework versions.

        Parameters
        ----------
        bits: int
            Platform number of bits: 32 or 64.

        Return
        ------
        tuple of str
            versions
        zframeworkver%dzFrameworkDir%d�vrr�zv4.0r�Nr��v4z
v4.0.30319�v3.5r�)r�
v2.0.50727g @)zv3.0r r)r�rrY�getattrr�r�r )r#�bits�reg_ver�dot_net_dirr�s     rrz!SystemInfo._find_dot_net_versions:s����'�.�.����-=��-D�E�E���d�$4�t�$;�<�<���H��0�0��c�B�B�H�b���;�$�����;��
�[�D�
 �
 �#&�9�9�;�;�r��r�?�d�#:�#:�<�<��V�K�K�
�[�C�
�
�'�'�
�[�C�
�
�'�'��rrc������fd�ttj�����D��}t|d��pdS)a)
        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 starting by this prefix

        Return
        ------
        str
            name
        c3��K�|]X}tj�tj��|�����?|�����T|V��YdSrJ)rRrSr�rT�
startswith)�.0�dir_namerS�prefixs  ��r�	<genexpr>z0SystemInfo._use_last_dir_name.<locals>.<genexpr>iss�����
�
���w�}�}�R�W�\�\�$��9�9�:�:�
��#�#�F�+�+�	
��
�
�
�
�
�
rNr)�reversedrRr��next)rSr*�
matching_dirss`` rr�zSystemInfo._use_last_dir_nameXsZ����"
�
�
�
�
�$�R�Z��%5�%5�6�6�
�
�
�
��M�4�(�(�.�B�.rrJrA)rr�)rr��rr�)rr)r)#r
rrrDr
rEr�r�r�r$r�r�r��staticmethodr�rFr�r�r�r�r�r�r�r�r�rrr�rrrrrrr�rrrr�r�_s�������	�	��W�[��2�
&�
&�F��7�;�~�r�2�2�L�!�g�k�"5�|�D�D�O�S�S�S�S�S�#�#�#�(���>(�(�(�(�T�7�7��\�7� �L�L��X�L�"����X��"���<O�O�O�*�����X��*�	P�	P��X�	P��(�(�(��X�(�T�"�"��X�"�H�
8�
8��X�
8�����X��(�	U�	U��X�	U��
�
��X�
� ����X��"�
H�
H��X�
H��
H�
H��X�
H��	/�	/�	/��X�	/��	/�	/�	/��X�	/�����<�/�/�/��\�/�/�/rr�c�B�eZdZUded<ded<ded<ded<ded<dS)	�_EnvironmentDictr3�includer��libpathrSzNotRequired[str | None]�py_vcruntime_redistN)r
rr�__annotations__rrrr2r2rsB��������L�L�L��H�H�H��L�L�L�
�I�I�I�0�0�0�0�0�0rr2c�D�eZdZdZd'd(d�Zed���Zed���Zed	���Zed
���Z	ed���Z
ed���Zed
���Zed���Z
ed���Zed���Zed���Zd�Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed)d ���Zd*d+d%�Zd&�Z dS),�EnvironmentInfoaY
    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.X.

    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.
    Nrrrc���t|��|_t|j��|_t	|j|��|_|j|kr!d}tj�	|���dS)Nz.No suitable Microsoft Visual C++ version found)
rrKrHr�r��sir�r�r�r�)r#r"r��
vc_min_ver�errs     rr$zEnvironmentInfo.__init__�sf���t�$�$����t�w�'�'����T�W�f�-�-����;��#�#�B�C��"�9�9�#�>�>�>�$�#rc��|jjS)zk
        Microsoft Visual Studio.

        Return
        ------
        float
            version
        )r:r�r)s rr�zEnvironmentInfo.vs_ver�����w�~�rc��|jjS)zp
        Microsoft Visual C++ version.

        Return
        ------
        float
            version
        )r:r�r)s rr�zEnvironmentInfo.vc_ver�r>rc���ddg}�jdkr1�j�dd���}|dgz
}|dgz
}|d|zgz
}�fd	�|D��S)
zu
        Microsoft Visual Studio Tools.

        Return
        ------
        list of str
            paths
        zCommon7\IDEz
Common7\Toolsr�T�r8rz1Common7\IDE\CommonExtensions\Microsoft\TestWindowzTeam Tools\Performance ToolszTeam Tools\Performance Tools%sc�d��g|],}tj��jj|����-Sr�rRrSrTr:r��r(rSr#s  �r�
<listcomp>z+EnvironmentInfo.VSTools.<locals>.<listcomp>��.���K�K�K�T�����T�W�1�4�8�8�K�K�Kr)r�rKr9)r#�paths�arch_subdirs`  r�VSToolszEnvironmentInfo.VSTools�s���� �!1�2���;�$����'�-�-�d��-�E�E�K��J�K�K�E��5�6�6�E��7�+�E�F�F�E�K�K�K�K�U�K�K�K�Krc��tj�|jjd��tj�|jjd��gS)z�
        Microsoft Visual C++ & Microsoft Foundation Class Includes.

        Return
        ------
        list of str
            paths
        �IncludezATLMFC\Include�rRrSrTr:r�r)s r�
VCIncludeszEnvironmentInfo.VCIncludes�s?��
�G�L�L���-�y�9�9��G�L�L���-�/@�A�A�
�	
rc�����jdkr�j�d���}n�j�d���}d|zd|zg}�jdkr	|d|zgz
}�fd	�|D��S)
z�
        Microsoft Visual C++ & Microsoft Foundation Class Libraries.

        Return
        ------
        list of str
            paths
        �.@T�r�r8�Lib%szATLMFC\Lib%sr�zLib\store%sc�d��g|],}tj��jj|����-SrrLrDs  �rrEz/EnvironmentInfo.VCLibraries.<locals>.<listcomp>�rFr)r�rKr;)r#rHrGs`  r�VCLibrarieszEnvironmentInfo.VCLibraries�s�����;�$����'�,�,��,�6�6�K�K��'�,�,�T�,�:�:�K��;�&��+�(E�F���;�$����n�{�2�3�3�E�K�K�K�K�U�K�K�K�Krc�r�|jdkrgStj�|jjd��gS)z�
        Microsoft Visual C++ store references Libraries.

        Return
        ------
        list of str
            paths
        r�zLib\store\references)r�rRrSrTr:r�r)s r�VCStoreRefszEnvironmentInfo.VCStoreRefs�s5���;�����I�����T�W�1�3J�K�K�L�Lrc��|j}tj�|jd��g}|jdkrdnd}|j�|��}|r,|tj�|jd|z��gz
}|jdkrHd|j�d���z}|tj�|j|��gz
}n�|jdkr�|j�	��rd	nd
}|tj�|j||j�
d���z��gz
}|jj|jjkrE|tj�|j||j�d���z��gz
}n)|tj�|jd��gz
}|S)
zr
        Microsoft Visual C++ Tools.

        Return
        ------
        list of str
            paths
        �
VCPackagesr�TF�Bin%sr�rQrOz
bin\HostX86%sz
bin\HostX64%srP�Bin)
r:rRrSrTr�r�rKr@r9r2r;r1r*)r#r:�toolsr>rHrS�host_dirs       r�VCToolszEnvironmentInfo.VCTools�s����W������b�o�|�<�<�=���;�$�.�.�4�4�E���g�'�'��1�1���	L��b�g�l�l�2�?�G�k�4I�J�J�K�K�E��;�$����T�W�0�0��0�>�>�>�D��b�g�l�l�2�?�D�9�9�:�:�E�E�
�[�D�
 �
 �$(�G�$:�$:�$<�$<�R� � �BR�
�
�����R�_�h���9K�9K�PT�9K�9U�9U�.U�V�V��
�E��w�"�d�g�&8�8�8���G�L�L����D�G�4G�4G�D�4G�4Q�4Q�)Q�������
�b�g�l�l�2�?�E�:�:�;�;�E��rc��|jdkrJ|j�dd���}tj�|jjd|z��gS|j�d���}tj�|jjd��}|j}tj�||�d|����gS)zw
        Microsoft Windows SDK Libraries.

        Return
        ------
        list of str
            paths
        r�TrArRrPr��um)	r�rKr;rRrSrTr:r��_sdk_subdir)r#rHr��libvers    r�OSLibrarieszEnvironmentInfo.OSLibraries#s����;�$����'�,�,�T�t�,�D�D�K��G�L�L���!6��+�8M�N�N�O�O��'�,�,��,�6�6�K��'�,�,�t�w�4�e�<�<�C��%�F��G�L�L��&�&�&�+�+�&F�G�G�H�Hrc��tj�|jjd��}|jdkr"|tj�|d��gS|jdkr|j}nd}tj�|d|z��tj�|d|z��tj�|d|z��gS)	zu
        Microsoft Windows SDK Include.

        Return
        ------
        list of str
            paths
        r3r��glr�rz%ssharedz%sumz%swinrt)rRrSrTr:r�r�r`)r#r3�sdkvers   r�
OSIncludeszEnvironmentInfo.OSIncludes7s����'�,�,�t�w�4�i�@�@���;�$����R�W�\�\�'�4�8�8�9�9��{�d�"�"��)���������W�j�6�&9�:�:�����W�f�v�o�6�6�����W�i�&�&8�9�9��
rc��tj�|jjd��}g}|jdkr
||jz
}|jdkr$|tj�|d��gz
}|jdkr�||tj�|jjd��tj�|dd��tj�|d	d��tj�|d
d��tj�|jjddd
|jzddd��gz
}|S)z}
        Microsoft Windows SDK Libraries Paths.

        Return
        ------
        list of str
            paths
        �
Referencesr�r�zCommonConfiguration\Neutralr��
UnionMetadataz'Windows.Foundation.UniversalApiContractz1.0.0.0z%Windows.Foundation.FoundationContractz,Windows.Networking.Connectivity.WwanContract�
ExtensionSDKszMicrosoft.VCLibsr��CommonConfiguration�neutral)rRrSrTr:r�r�rb)r#�refr4s   r�	OSLibpathzEnvironmentInfo.OSLibpathQs#���g�l�l�4�7�0�,�?�?�����;�#����t�'�'�G��;�$��������S�*H�I�I�J�J�G��;�$���������T�W�2�O�D�D�����S�"K�Y�W�W�����S�"I�9�U�U������G���������G�)�#�&��d�k�)� �)�����
�G�$�rc�D�t|�����S)zs
        Microsoft Windows SDK Tools.

        Return
        ------
        list of str
            paths
        )�list�
_sdk_toolsr)s r�SdkToolszEnvironmentInfo.SdkToolsys���D�O�O�%�%�&�&�&rc#�K�|jdkr;|jdkrdnd}tj�|jj|��V�|j���sL|j�d���}d|z}tj�|jj|��V�|jdvrj|j�	��rd	}n|j�dd�
��}d|z}tj�|jj|��V�n�|jdkrwtj�|jjd��}|j�d���}|jj
}tj�||�|����V�|jjr|jjV�dSdS)
z�
        Microsoft Windows SDK Tools paths generator.

        Return
        ------
        generator of str
            paths
        rOr�rZzBin\x86TrPrY)r�r�rrAzBin\NETFX 4.0 Tools%sN)r�rRrSrTr:r�rKr2r9r.r�r�)r#�bin_dirrHrSres     rrqzEnvironmentInfo._sdk_tools�s������;����#�{�d�2�2�e�e�
�G��'�,�,�t�w�4�g�>�>�>�>�>��w�%�%�'�'�	<��'�-�-�$�-�7�7�K��[�(�D��'�,�,�t�w�4�d�;�;�;�;�;��;�,�&�&��w�$�$�&�&�
J� ���"�g�1�1�$�D�1�I�I��+�k�9�D��'�,�,�t�w�4�d�;�;�;�;�;�;�
�[�D�
 �
 ��7�<�<��� 5�u�=�=�D��'�-�-�$�-�7�7�K��W�2�F��'�,�,�t�v�v�{�{�%C�D�D�D�D�D��7�+�	3��'�2�2�2�2�2�2�	3�	3rc�,�|jj}|rd|zndS)zu
        Microsoft Windows SDK version subdir.

        Return
        ------
        str
            subdir
        �%s\r)r:r��r#�ucrtvers  rr`zEnvironmentInfo._sdk_subdir�s#���'�/��%,�4��� � �"�4rc�r�|jdkrgStj�|jjd��gS)zs
        Microsoft Windows SDK Setup.

        Return
        ------
        list of str
            paths
        r��Setup)r�rRrSrTr:r�r)s r�SdkSetupzEnvironmentInfo.SdkSetup�s4���;�����I�����T�W�2�G�<�<�=�=rc�t��|j}|j�|jdkr-d}|���o|���}n>|���p|���}|jdkp
|jdk}g}|r|�fd��jD��z
}|r|�fd��jD��z
}|S)zv
        Microsoft .NET Framework Tools.

        Return
        ------
        list of str
            paths
        r�Trc�Z��g|]'}tj��j|����(Sr)rRrSrTr�r(r�r:s  �rrEz+EnvironmentInfo.FxTools.<locals>.<listcomp>��9������9<�����R�.��4�4���rc�Z��g|]'}tj��j|����(Sr)rRrSrTrr~s  �rrEz+EnvironmentInfo.FxTools.<locals>.<listcomp>�rr)	rKr:r�r.r2r1r*rr)r#rK�	include32�	include64r[r:s     @r�FxToolszEnvironmentInfo.FxTools�s
����W��
�W���;�$����I��,�,�.�.�.�J�r�7H�7H�7J�7J�3J�I�I��(�(�*�*�A�b�.?�.?�.A�.A�I���'�1�M�R�]�g�5M�I����	������@B�@U����
�E��	������@B�@U����
�E��rc���|jdks|jjsgS|j�d���}t
j�|jjd|z��gS)z~
        Microsoft .Net Framework SDK Libraries.

        Return
        ------
        list of str
            paths
        r�TrPzlib\um%s)r�r:rrKr;rRrSrT)r#rHs  r�NetFxSDKLibrariesz!EnvironmentInfo.NetFxSDKLibraries�s[���;����T�W�%8���I��g�(�(�T�(�2�2������T�W�0�+��2K�L�L�M�Mrc��|jdks|jjsgStj�|jjd��gS)z}
        Microsoft .Net Framework SDK Includes.

        Return
        ------
        list of str
            paths
        r�z
include\um)r�r:rrRrSrTr)s r�NetFxSDKIncludesz EnvironmentInfo.NetFxSDKIncludes�s>���;����T�W�%8���I�����T�W�0�-�@�@�A�Arc�X�tj�|jjd��gS)z�
        Microsoft Visual Studio Team System Database.

        Return
        ------
        list of str
            paths
        z
VSTSDB\DeployrCr)s r�VsTDbzEnvironmentInfo.VsTDbs#������T�W�1�3C�D�D�E�Erc�\�|jdkrgS|jdkr(|jj}|j�d���}n|jj}d}d|j|fz}tj�||��g}|jdkr%|tj�||d��gz
}|S)zn
        Microsoft Build Engine.

        Return
        ------
        list of str
            paths
        r�rOTrQrzMSBuild\%0.1f\bin%s�Roslyn)	r�r:r�rKr9r�rRrSrT)r#�	base_pathrHrS�builds     r�MSBuildzEnvironmentInfo.MSBuilds����;�����I�
�[�4�
�
���/�I��'�-�-�d�-�;�;�K�K���,�I��K�%���k�(B�B������i��.�.�/���;�$����b�g�l�l�9�d�H�=�=�>�>�E��rc�r�|jdkrgStj�|jjd��gS)zt
        Microsoft HTML Help Workshop.

        Return
        ------
        list of str
            paths
        r�zHTML Help Workshop)r�rRrSrTr:r�r)s r�HTMLHelpWorkshopz EnvironmentInfo.HTMLHelpWorkshop*s5���;�����I�����T�W�4�6J�K�K�L�Lrc��|jdkrgS|j�d���}tj�|jjd��}|j}tj�||�d|����gS)z�
        Microsoft Universal C Runtime SDK Libraries.

        Return
        ------
        list of str
            paths
        r�TrPr��ucrt)	r�rKr;rRrSrTr:r�_ucrt_subdir)r#rHr�rxs    r�
UCRTLibrarieszEnvironmentInfo.UCRTLibraries9st���;�����I��g�(�(�T�(�2�2���g�l�l�4�7�5�u�=�=���#������S������"E�F�F�G�Grc���|jdkrgStj�|jjd��}tj�|d|jz��gS)z�
        Microsoft Universal C Runtime SDK Include.

        Return
        ------
        list of str
            paths
        r�r3z%sucrt)r�rRrSrTr:rr�)r#r3s  r�UCRTIncludeszEnvironmentInfo.UCRTIncludesKsQ���;�����I��'�,�,�t�w�9�9�E�E������W�h��1B�&B�C�C�D�Drc�,�|jj}|rd|zndS)z�
        Microsoft Universal C Runtime SDK version subdir.

        Return
        ------
        str
            subdir
        rvr)r:rrws  rr�zEnvironmentInfo._ucrt_subdir[s#���'�4��%,�4��� � �"�4rc�J�d|jcxkrdkrnngS|jjgS)zk
        Microsoft Visual F#.

        Return
        ------
        list of str
            paths
        r�r�)r�r:r�r)s r�FSharpzEnvironmentInfo.FSharphs;���$�+�$�$�$�$��$�$�$�$�$��I���(�)�)rr�c�$���d|jz�|j�d����d���g}|jj}tj�|�	dd����}tj�
|��r]tj�|t
j|��d��}||tj�|d��gz
}|tj�|d	��gz
}d
|jdzzd
t|j��dzzf}��fd�tj||��D��}t#t%tjj|��d
��S)z{
        Microsoft Visual C++ runtime redistributable dll.

        Returns the first suitable path found or None.
        zvcruntime%d0.dllTrPr=z\Toolsz\Redistr��onecore�redistzMicrosoft.VC%d.CRT�
c3�b�K�|])\}}tj�|�|���V��*dSrJ)rRrSrT)r(r*�crt_dirrH�	vcruntimes   ��rr+z2EnvironmentInfo.VCRuntimeRedist.<locals>.<genexpr>�sO�����
�
�!���
�G�L�L���g�y�A�A�
�
�
�
�
�
rN)r�rKr;�stripr:r�rRrS�dirnamer!r�rTr��intr�r�r�r-�filter�isfile)r#�prefixes�
tools_path�redist_path�crt_dirs�candidate_pathsrHr�s      @@r�VCRuntimeRedistzEnvironmentInfo.VCRuntimeRedistwsl����'���4�	��g�(�(�T�(�2�2�8�8��>�>�����W�)�
��g�o�o�j�&8�&8��J�&O�&O�P�P��
�7�=�=��%�%�	L��'�,�,�{�B�J�{�4K�4K�B�4O�P�P�K���b�g�l�l�;�	�&J�&J�K�K�H��R�W�\�\�*�h�7�7�8�8��
!�D�K�"�$4�5� �C���$4�$4�r�$9�:�
��
�
�
�
�
�%.�%6�x��%J�%J�
�
�
���F�2�7�>�?�;�;�T�B�B�BrT�exists�boolr2c��t|�d|j|j|j|jg|��|�d|j|j|j|j	|j
g|��|�d|j|j|j|jg|��|�d|j
|j|j|j|j|j|j|j|jg	|�����}|jdkr|jr
|j|d<|S)z�
        Return environment dict.

        Parameters
        ----------
        exists: bool
            It True, only return existing paths.

        Return
        ------
        dict
            environment
        r3r�r4rS)r3r�r4rS�r5)r2�_build_pathsrMrfr�r�rTrbr�r�r�rVrnr]rIr�rrr{r�r�r�r�r�)r#r��envs   r�
return_envzEnvironmentInfo.return_env�s9����%�%���O��O��%��)�	��	�	��!�!���$��$��L��&��*���
�
��%�%���!�4�<��1A�4�>�R����
�"�"���L��L��J��M��M��L��L��)��K�
����7*
�*
�*
��V�;�"����!5��)-�)=�C�%�&��
rc��tj�|��}tj|d���tj��}tj||��}|r,tttj
j|����n|}|s6d|���z}tj�|���t!|��}	tj�|	��S)aC
        Given an environment variable name and specified paths,
        return a pathsep-separated string of paths containing
        unique, extant, directories from those paths and from
        the environment variable. Raise an error if no paths
        are resolved.

        Parameters
        ----------
        name: str
            Environment variable name
        spec_path_lists: list of str
            Paths
        exists: bool
            It True, only return existing paths.

        Return
        ------
        str
            Pathsep-separated paths
        rz %s environment variable is empty)r��chain�
from_iterabler
rEr�rR�pathseprpr�rSr��upperr�r�r�rrT)
r#rx�spec_path_listsr��
spec_paths�	env_pathsrG�extant_pathsr��unique_pathss
          rr�zEnvironmentInfo._build_paths�s���.�_�2�2�?�C�C�
��K��b�)�)�/�/��
�;�;�	���
�I�6�6��=C�N�t�F�2�7�=�%�8�8�9�9�9����	?�4�t�z�z�|�|�C�C��"�9�9�#�>�>�>�&�|�4�4���z���|�,�,�,r)NrrAr/)T)r�r�rr2)!r
rrrDr$rFr�r�rIrMrTrVr]rbrfrnrrrqr`r{r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr8r8zs"��������.?�?�?�?�?��	�	��X�	��	�	��X�	��L�L��X�L�&�
�
��X�
��L�L��X�L�(�M�M��X�M��'�'��X�'�R�I�I��X�I�&����X��2�%�%��X�%�N�	'�	'��X�	'�!3�!3�!3�F�
5�
5��X�
5��>�>��X�>�����X��<�
N�
N��X�
N��B�B��X�B��	F�	F��X�	F�����X��6�M�M��X�M��H�H��X�H�"�
E�
E��X�
E��
5�
5��X�
5��*�*��X�*�� C� C� C��X� C�D;�;�;�;�;�z-�-�-�-�-rr8)rD�
__future__rr�r�r�rR�os.path�platform�typingrr�more_itertoolsr�distutils.errorsr��typing_extensionsrr�systemrr
�dictr6rrHr�r2r8rrr�<module>r�s0�����#�"�"�"�"�"�������������	�	�	�	���������+�+�+�+�+�+�+�+�*�*�*�*�*�*������=�<�<�<�<�<�<�<�<��%����*�*�i�7�7��M�M�M��������!�!�!�!�!�!�!�!�#�d�f�f�G�$�$�$�$�v
�v
�v
�v
�v
�v
�v
�v
�rz�z�z�z�z�z�z�z�zP/�P/�P/�P/�P/�P/�P/�P/�f1�1�1�1�1�y�1�1�1�|	-�|	-�|	-�|	-�|	-�|	-�|	-�|	-�|	-�|	-r

?>