PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/alt/python313/lib/python3.13/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib/python3.13/site-packages/setuptools/__pycache__/msvc.cpython-313.pyc

�

D\Lg>���l�SrSSKrSSKJr SSKJrJr SSKJrJ	r	J
r
Jr SSKJ
r
 SSKrSSKrSSKrSSKrSSKrSSKJr \R*"5S:XaSSKrSS	KJr O"S
S5r\"5rSrS
rSSSSS.rSrSrSrSSjr"SS5r "SS5r!"SS5r""SS5r#g) 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�$�\rSrSrSrSrSrSrSrg)�winreg� N�)	�__name__�
__module__�__qualname__�__firstlineno__�
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOT�__static_attributes__r�ڈ/builddir/build/BUILDROOT/alt-python313-setuptools-69.0.2-1.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/setuptools/msvc.pyrr s���
� ��!�� �rrc�f�[R"[RSS[R[R-5nSnSnU [R"5Htn[R"X5upEnU(dM&U[R:XdM<[U5(dMN[[U55nUS:�dMkXq:�dMrXup!Mv SSS5 X4$![
a gf=f![
a  M)f=f![[4a M�f=f!,(df   X4$=f)�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_vc2015r5)s����n�n��%�%�6�
��O�O�f�4�4�4�	
���L��H�	����"�A�
� &� 0� 0�� 8�
��2��q�R�6�=�=�(�U�6�]�]��!�%��(�m�G��b�=�W�%;�-4�(�#�

��!�!��%������
��
��
#�I�.�����

���!�!�s~�AC'�D �(C7�D �
D � D �3D	�D �D �D �'
C4�3C4�7
D�D �D�D �	D�D �D�D � 
D0c
��[R"S5=(d [R"S5nU(dgSnUH�n[R"[[
[5 [R"[USSS5SS	S
USSS
S/	5RSSS9R5n[USSS5n[U5(aSU4sSSS5 s $SSS5 M� g!,(df   M�=f)adPython 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_vc2017rPGs����;�;�*�+�J�w�{�{�>�/J�D�����
)�	�
�
 �
 �!3�W�>P�
Q��'�'�� �";�[�-��"�%�#�!�#�*�#���������9����#
�(��d�K��9�D��T�{�{��4�x�/R�
Q�,�-R�
Q�)�6�3R�
Q�s
�'A)C*�*
C9	�x86�x64�arm�arm64)rQ�	x86_amd64�x86_arm�	x86_arm64c���[5upSnU[;a
[UnO
SU;aSOSnU(a+[USSSSSUS	S
5	nSSKnURUSS
9SnU(d"[5uprU(a[USUSS
5nU(dg[US5n[U5(dgU(a[U5(dSnX�4$![[
[4a SnN�f=f)rN�amd64rRrQz..�redist�MSVCz**zMicrosoft.VC14*.CRTzvcruntime140.dllrT)�	recursive���zMicrosoft.VC140.CRTrz
vcvarsall.bat)	rP�PLAT_SPEC_TO_RUNTIMEr�glob�ImportErrorr$�LookupErrorr5r)	�	plat_spec�_r/�	vcruntime�vcruntime_plat�vcredistr_r.�	vcvarsalls	         r�_msvc14_find_vcvarsallrh�s���%�'�K�A��I��(�(�-�i�8��")�Y�"6��E�����������!��

��	���	�	�(�d�	�;�B�?�I��!4�!6��������%�"��I����X��/�I��)�����F�9�-�-��	�����1�W�k�2�	��I�	�s�C	�	C#�"C#c���S[;a8[R"5VVs0sHupUR5U_M snn$[U5up4U(d[R
R
S5e[R"SRX05[RS9RSSS9nS
UR55VVVs0sH)upnU(dMU(dMUR5U_M+ nnnnU(aXHS'U$s snnf![Ra>n[R
R
SRUR55UeS	nAff=fs snnnf)r�DISTUTILS_USE_SDKzUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)r?zError executing {}Nc3�@# �UHoRS5v� M g7f)�=N)�	partition)�.0�lines  r�	<genexpr>�%_msvc14_get_vc_env.<locals>.<genexpr>�s���O�>N�d�n�n�S�1�1�>N�s��py_vcruntime_redist)r
�items�lowerrh�	distutilsr?�DistutilsPlatformErrorrHrI�format�STDOUTrJr
�cmd�
splitlines)	rbr-�valuergrd�out�excrc�envs	         r�_msvc14_get_vc_envr��sG���g�%�5<�]�]�_�E�_�z�s��	�	��U�"�_�E�E�1�)�<��I�����5�5�6T�U�U���%�%�&�-�-�i�C��$�$�
��&��I�&�
.�	�P�c�n�n�>N�O��O�M�C�E��	��	��	�	��U��O����%.�!�"��J��1F���(�(�����5�5� �'�'����0�
��	����
s0�D�7AD�
E-�#E-�,E-�E*�,9E%�%E*c��[U5$![RRan[	US5 eSnAff=f)z�
Patched "distutils._msvccompiler._get_vc_env" for support extra
Microsoft Visual C++ 14.X compilers.

Set environment without use of "vcvarsall.bat".

Parameters
----------
plat_spec: str
    Target architecture.

Return
------
dict
    environment
�,@N)r�rwr?rx�_augment_exception)rbrs  r�msvc14_get_vc_envr��s;��&�!�)�,�,�����2�2���3��%�
���s�

�=�
8�=c�d�URSnSUR5;dSUR5;aqSnUR"S0[5D6nSnUS:Xa/UR5R	S5S:�aUS	-
nO$US
-
nOUS:Xa
US-
nX5S
--
nOUS:�aUS-
nU4Ulg)z`
Add details to the exception message to help guide the user
as to what action will resolve it.
rrgzvisual cz;Microsoft Visual C++ {version:0.1f} or greater is required.z-www.microsoft.com/download/details.aspx?id=%d�"@�ia64r]z( Get it with "Microsoft Windows SDK 7.0"z% Get it from http://aka.ms/vcpython27�$@z* Get it with "Microsoft Windows SDK 7.1": iW r�zd Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/Nr)�argsrvry�locals�find)rr4�arch�message�tmpl�
msdownloads      rr�r��s����h�h�q�k�G��g�m�m�o�%��w�}�}��)F�L���+�+�)���)��D�
��c�>��z�z�|� � ��(�2�-��E�E��
�B�B��
��_��C�C�G��D�(�(�G�
��_��,�
�G��z�C�Hrc��\rSrSrSr\R"SS5R5rSr	\
S5rSrSr
SS	jrSS
jrSSjrSrg
)�PlatformInfoizi
Current and Target Architectures information.

Parameters
----------
arch: str
    Target architecture.
�processor_architecture�c�N�UR5RSS5Ulg)NrRrY)rvrlr�)�selfr�s  r�__init__�PlatformInfo.__init__"s���J�J�L�(�(���8��	rc�X�URURRS5S-S$)zC
Return Target CPU architecture.

Return
------
str
    Target CPU
rc�N)r�r��r�s r�
target_cpu�PlatformInfo.target_cpu%s(���y�y�������,�q�0�2�3�3rc� �URS:H$)zW
Return True if target CPU is x86 32 bits..

Return
------
bool
    CPU is x86 32 bits
rQ�r�r�s r�
target_is_x86�PlatformInfo.target_is_x861s�����%�'�'rc� �URS:H$)zX
Return True if current CPU is x86 32 bits..

Return
------
bool
    CPU is x86 32 bits
rQ��current_cpur�s r�current_is_x86�PlatformInfo.current_is_x86<s�����5�(�(rc��URS:Xa	U(aS$URS:Xa	U(aS$SUR-$)u
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)
rQr�rY�\x64�\%sr��r��hidex86rRs   r�current_dir�PlatformInfo.current_dirGsO��$� � �E�)�g�
�	
�� � �G�+���	
�
�$�*�*�*�	
rc��URS:Xa	U(aS$URS:Xa	U(aS$SUR-$)a
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)
rQr�rYr�r�r�r�s   r�
target_dir�PlatformInfo.target_dir_sI��$���5�(�W�
�	
����7�*�s��	
�
�$�/�/�)�	
rc��U(aSOURnURU:XaS$UR5RSSU-5$)a
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.
rQr��\z\%s_)r�r�r�rl)r��forcex86�currents   r�	cross_dir�PlatformInfo.cross_dirwsN�� $�%��)9�)9�����'�)�
�	
����"�*�*�4��7�1B�C�	
r)r�N)FF�F)rrrr�__doc__r
rDrvr�r��propertyr�r�r�r�r�r�rrrrr�r�sU����+�+�6��;�A�A�C�K�9��	4��	4�	(�	)�
�0
�0
rr�c��\rSrSrSr\R\R\R\R4r
Sr\S5r
\S5r\S5r\S5r\S5r\S	5r\S
5r\S5r\S5rSS
jrSrSrg)�RegistryInfoi�z�
Microsoft Visual Studio related registry information.

Parameters
----------
platform_info: PlatformInfo
    "PlatformInfo" instance.
c��Xlg�N��pi)r��
platform_infos  rr��RegistryInfo.__init__�s���rc��g)zP
Microsoft Visual Studio root registry key.

Return
------
str
    Registry key
�VisualStudiorr�s r�visualstudio�RegistryInfo.visualstudio�s��rc�.�[URS5$)zO
Microsoft Visual Studio SxS registry key.

Return
------
str
    Registry key
�SxS)rr�r�s r�sxs�RegistryInfo.sxs�s���D�%�%�u�-�-rc�.�[URS5$)zL
Microsoft Visual C++ VC7 registry key.

Return
------
str
    Registry key
�VC7�rr�r�s r�vc�RegistryInfo.vc�����D�H�H�e�$�$rc�.�[URS5$)zO
Microsoft Visual Studio VS7 registry key.

Return
------
str
    Registry key
�VS7r�r�s r�vs�RegistryInfo.vs�r�rc��g)zS
Microsoft Visual C++ for Python registry key.

Return
------
str
    Registry key
zDevDiv\VCForPythonrr�s r�
vc_for_python�RegistryInfo.vc_for_python�s��%rc��g)zA
Microsoft SDK registry key.

Return
------
str
    Registry key
zMicrosoft SDKsrr�s r�
microsoft_sdk�RegistryInfo.microsoft_sdk�s�� rc�.�[URS5$)zR
Microsoft Windows/Platform SDK registry key.

Return
------
str
    Registry key
r�rr�r�s r�windows_sdk�RegistryInfo.windows_sdk�s���D�&�&�	�2�2rc�.�[URS5$)zP
Microsoft .NET Framework SDK registry key.

Return
------
str
    Registry key
�NETFXSDKr�r�s r�	netfx_sdk�RegistryInfo.netfx_sdk�s���D�&�&�
�3�3rc��g)zP
Microsoft Windows Kits Roots registry key.

Return
------
str
    Registry key
zWindows Kits\Installed Rootsrr�s r�windows_kits_roots�RegistryInfo.windows_kits_rootss��/rc�r�URR5(dU(aSOSn[SUSU5$)z�
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)r�r�r)r�r-rQ�node64s    r�	microsoft�RegistryInfo.microsofts0�� �w�w�-�-�/�/�3��M���J���S�9�9rc	�>�[Rn[Rn[RnURnUR
HBnSnU"Xv"U5SU5n[R"X�5SU(aU"U5 s $s $ g![aI URR5(d&U"Xv"US5SU5nNn![a M�f=fM�f=f![a Of=fU(a
U"U5 M�M�!U(a	U"U5 ff=f)z�
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)
rr"r!�CloseKeyr��HKEYSr$r�r��QueryValueEx)	r�r-�name�key_read�openkey�closekey�ms�hkey�bkeys	         r�lookup�RegistryInfo.lookup"s�� �?�?���.�.���?�?��
�^�^���J�J�D��D�	
��t�R��W�a��:��
#��*�*�4�6�q�9���T�N��#���
��w�w�-�-�/�/�!�&�t�R��T�]�A�x�H���"�!� �!���
���
��
�����T�N���4��T�N��sT�B� C&�)C#�:C
�
C�C#�C�C#�"C#�&
C3�0D
�2C3�3D
�
Dr�Nr�)rrrrr�rrrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�r��s����	���� � ��!�!�� � �	
�E� ��	��	��	.��	.��	%��	%��	%��	%��	%��	%��	 ��	 ��	3��	3��	4��	4��	/��	/�:�&&#rr�c���\rSrSrSr\R"SS5r\R"SS5r\R"S\5r	S!Sjr
S	rS
rSr
\S5r\S
5r\S5rSrSr\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r \S5r!Sr"\S"Sj5r#S r$g)#�
SystemInfoiKz�
Microsoft Windows and Visual Studio related system information.

Parameters
----------
registry_info: RegistryInfo
    "RegistryInfo" instance.
vc_ver: float
    Required Microsoft Visual C++ version.
�WinDirr�r8r7Nc��XlURRUlUR5UlU=(d UR	5=UlUlgr�)�rir��find_programdata_vs_vers�known_vs_paths�_find_latest_available_vs_ver�vs_ver�vc_ver)r��
registry_infors   rr��SystemInfo.__init__]sE�����'�'�*�*���"�;�;�=���%+�$R�d�.P�.P�.R�R���d�krc��UR5nU(d0UR(d[RR	S5e[U5nUR
UR5 [U5S$)z=
Find the latest VC version

Return
------
float
    version
z%No Microsoft Visual C++ version foundr])�find_reg_vs_versr�rwr?rx�set�update�sorted)r��reg_vc_vers�vc_verss   rr�(SystemInfo._find_latest_available_vs_verfsf���+�+�-���t�2�2��"�"�9�9�7��
��k�"�����t�*�*�+��g��r�"�"rc
��URRnURRURRURR4n/n[
R"URRU5GH.upE[R"XA"U5S[R5nU [R"U5upxn	[U5H^n
[R"[ 5 [#[R$"Xj5S5nX�;aUR'U5 SSS5 M` [U5H[n
[R"[ 5 [#[R("Xj55nX�;aUR'U5 SSS5 M] SSS5 GM1 [+U5$![a GMLf=f!,(df   GM=f!,(df   M�=f!,(df   GM�=f)zh
Find Microsoft Visual Studio versions available in registry.

Return
------
list of float
    Versions
rN)r�r�r�r�r�r%�productr�rr!r"r$�QueryInfoKey�rangerErFr+r*r'�append�EnumKeyr	)r�r��vckeys�vs_versr�r-r��subkeys�valuesrcr0�vers            rr�SystemInfo.find_reg_vs_verszsw���W�W�
�
���'�'�*�*�d�g�g�3�3�T�W�W�Z�Z�@����"�*�*�4�7�7�=�=�&�A�I�D�
��~�~�d�B�s�G�Q����H���%+�%8�%8��%>�"����v��A�#�,�,�Z�8�#�F�$4�$4�T�$=�a�$@�A���-�#�N�N�3�/�9�8�'�
�w��A�#�,�,�Z�8�#�F�N�N�4�$;�<���-�#�N�N�3�/�9�8�(���B�"�g�����
��
��
9�8��
9�8����sO�,G�:AG:�<9G	�54G:�)6G(	�G:�
G�G�
G%
�	G:�(
G7
�2G:�:
H
	c�|�0nSn[U5nUHkn[X$S5n[USSS9n[R
"U5nSSS5 WSn[[US55 UUUR
US	5'Mm U$![a Us$f=f!,(df   NW=f![[4a M�f=f)
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)r>Nr:�
VC\Tools\MSVC�installationVersion)rr$rr�json�load�_as_float_version�KeyError)	r��vs_versions�
instances_dir�hashed_namesr��
state_path�
state_file�state�vs_paths	         rr��#SystemInfo.find_programdata_vs_vers�s�����T�
�	�"�=�1�L�!�D�
�!�-�|�D�
��*�d�W�=�� �I�I�j�1�E�>�� 2�3����W�&6�7�8�
���*�*�5�1F�+G�H��!�(���1�	���	��>�=���X�&�
��
�s9�B�B'�B�9B'�B�B�
B$	� B'�'B;�:B;c�Z�[SRURS5SS55$)z�
Return a string version as a simplified float version (major.minor)

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

Return
------
float
    version
�.N�)r*r�split)r4s rr�SystemInfo._as_float_version�s(���S�X�X�g�m�m�C�0��!�4�5�6�6rc���[URSUR-5nURR	URR
SUR-5=(d U$)z@
Microsoft Visual Studio directory.

Return
------
str
    path
zMicrosoft Visual Studio %0.1f�%0.1f)r�ProgramFilesx86rr�r�r�)r��defaults  r�VSInstallDir�SystemInfo.VSInstallDir�sP���� � �"A�D�K�K�"O�
��
�w�w�~�~�d�g�g�j�j�'�D�K�K�*?�@�K�G�Krc��UR5=(d UR5n[U5(d!Sn[RRU5eU$)z=
Microsoft Visual C++ directory.

Return
------
str
    path
z(Microsoft Visual C++ directory not found)�	_guess_vc�_guess_vc_legacyrrwr?rx)r�rO�msgs   r�VCInstallDir�SystemInfo.VCInstallDir�sH���~�~��:�4�#8�#8�#:���T�{�{�<�C��"�"�9�9�#�>�>��rc�4�URS::agURURn[	US5n[U5SnUR
U5Ul[	X#5$![a URnNTf=f![[4a gf=f)z<
Locate Visual C++ for VS2017+.

Return
------
str
    path
r�r�rr])
rr�r r2rrrrr$�
IndexError)r��vs_dir�guess_vcrs    rr5�SystemInfo._guess_vc�s����;�;�$���	'��(�(����5�F�
�� 0�1��	��X�&�r�*�F��0�0��8�D�K���)�)���	'��&�&�F�	'����$�	��	�s"�A(�.B�(B�B�B�Bc��[URSUR-5n[URRSUR-5nURRUS5nU(a[US5OUnURRURRSUR-5=(d U$)zK
Locate Visual C++ for versions prior to 2017.

Return
------
str
    path
z Microsoft Visual Studio %0.1f\VCr/�
installdirr@)rr0rr�r�r�r�)r�r1�reg_path�	python_vc�
default_vcs     rr6�SystemInfo._guess_vc_legacys����� � �"E����"S�
��
����-�-�w����/D�E���G�G�N�N�8�\�:�	�.7�T�)�T�*�W�
��w�w�~�~�d�g�g�j�j�'�D�K�K�*?�@�N�J�Nrc��URS::agURS:XagURS:XagURS:XagURS	:�ag
g)zg
Microsoft Windows SDK versions for specified MSVC++ version.

Return
------
tuple of str
    versions
r�)z7.0z6.1z6.0ar�)z7.1z7.0a�&@)z8.0z8.0a�(@)�8.1z8.1ar�)z10.0rHN�rr�s r�WindowsSdkVersion�SystemInfo.WindowsSdkVersion+sT���;�;�#��'�
�[�[�D�
 � �
�[�[�D�
 � �
�[�[�D�
 � �
�[�[�D�
 � �!rc�L�UR[URS55$)zD
Microsoft Windows SDK last version.

Return
------
str
    version
�lib)�_use_last_dir_namer�
WindowsSdkDirr�s r�WindowsSdkLastVersion� SystemInfo.WindowsSdkLastVersion@s"���&�&�t�D�,>�,>��'F�G�Grc�l�SnURHKn[URRSU-5nURR	US5nU(dMK O U(a[U5(d\[URRSUR-5nURR	US5nU(a[US5nU(a[U5(dVURHFnUSURS5nS	U-n[URU5n[U5(dMDUnMH U(a[U5(dBURH2nS
U-n[URU5n[U5(dM0UnM4 U(d[URS5nU$)z>
Microsoft Windows SDK directory.

Return
------
str
    path
r�zv%s�installationfolderr/r@�WinSDKNr*zMicrosoft SDKs\Windows Kits\%szMicrosoft SDKs\Windows\v%s�PlatformSDK)rJrr�r�r�rr�r�rfindr8r8)r��sdkdirr�locrO�install_base�intver�ds        rrO�SystemInfo.WindowsSdkDirLs\�����)�)�C��t�w�w�*�*�E�C�K�8�C��W�W�^�^�C�)=�>�F��v��*��U�6�]�]�����-�-�w����/D�E�D��7�7�>�>�$��=�L���l�H�5���U�6�]�]��-�-���-�s�y�y��~�.��8�6�A����*�*�D�1����8�8��F�.��U�6�]�]��-�-��4�s�:����*�*�D�1����8�8��F�	.�
��$�+�+�]�;�F��
rc�"�URS::aSnSnO0SnURS::aSOSnURRSUS9nS	XRS
S54-n/nURS:�a7URH'nU[URRXd5/-
nM) URH+nU[URRS
U-U5/-
nM- UH*nURRUS5nU(dM(Us $ g)zI
Microsoft Windows SDK executable directory.

Return
------
str
    path
rF�#r��(rGTF)rRr�zWinSDK-NetFx%dTools%sr��-r�zv%sArSN)rr�r�rl�NetFxSdkVersionrr�r�rJr�r�)	r��netfxverr�r��fx�regpathsrrO�execpaths	         r�WindowsSDKExecutablePath�#SystemInfo.WindowsSDKExecutablePathws���;�;�$���H��D��H�"�k�k�T�1�d�u�G��7�7�&�&�4��&�A�D�
$��,�,�t�S�2I�'J�
J�����;�;�$���+�+���T�$�'�'�"3�"3�S�=�>�>��,��)�)�C���d�g�g�1�1�6�C�<��D�E�E�H�*��D��w�w�~�~�d�,@�A�H��x���rc��[URRSUR-5nURR	US5=(d S$)z<
Microsoft Visual F# directory.

Return
------
str
    path
z%0.1f\Setup\F#�
productdirr�)rr�r�rr�)r�rOs  r�FSharpInstallDir�SystemInfo.FSharpInstallDir�s>���D�G�G�(�(�*;�d�k�k�*I�J���w�w�~�~�d�L�1�7�R�7rc���URS:�aSOSnUHJnURRURRSU-5nU(dM?U=(d Ss $ g)zD
Microsoft Universal CRT SDK directory.

Return
------
str
    path
r�)�10�81rz
kitsroot%sr�N)rr�r�r�)r��versrrWs    r�UniversalCRTSdkDir�SystemInfo.UniversalCRTSdkDir�sT�� $�{�{�d�2�|����C��W�W�^�^�D�G�G�$>�$>��s�@R�S�F��v��|��#�rc�L�UR[URS55$)zP
Microsoft Universal C Runtime SDK last version.

Return
------
str
    version
rM)rNrrpr�s r�UniversalCRTSdkLastVersion�%SystemInfo.UniversalCRTSdkLastVersion�s"���&�&�t�D�,C�,C�U�'K�L�Lrc�*�URS:�aS$S$)zQ
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.5rrIr�s rra�SystemInfo.NetFxSdkVersion�s%���{�{�d�"�
X�	
��	
rc��SnURHIn[URRU5nURR	US5nU(dMH U$ U$)zE
Microsoft .NET Framework SDK directory.

Return
------
str
    path
r��kitsinstallationfolder)rarr�r�r�)r�rWrrXs    r�NetFxSdkDir�SystemInfo.NetFxSdkDir�sX�����'�'�C��t�w�w�(�(�#�.�C��W�W�^�^�C�)A�B�F��v���
�(�
�
rc��[URS5nURRURRS5=(d U$)zG
Microsoft .NET Framework 32bit directory.

Return
------
str
    path
zMicrosoft.NET\Framework�frameworkdir32�rr�r�r�r��r��guess_fws  r�FrameworkDir32�SystemInfo.FrameworkDir32�s:������%?�@���w�w�~�~�d�g�g�j�j�*:�;�G�x�Grc��[URS5nURRURRS5=(d U$)zG
Microsoft .NET Framework 64bit directory.

Return
------
str
    path
zMicrosoft.NET\Framework64�frameworkdir64r}r~s  r�FrameworkDir64�SystemInfo.FrameworkDir64�s:������%A�B���w�w�~�~�d�g�g�j�j�*:�;�G�x�Grc�$�URS5$)zS
Microsoft .NET Framework 32bit versions.

Return
------
tuple of str
    versions
r��_find_dot_net_versionsr�s r�FrameworkVersion32�SystemInfo.FrameworkVersion32	����*�*�2�.�.rc�$�URS5$)zS
Microsoft .NET Framework 64bit versions.

Return
------
tuple of str
    versions
�@r�r�s r�FrameworkVersion64�SystemInfo.FrameworkVersion64r�rc��URRURRSU-5n[USU-5nU=(d UR	US5=(d SnUR
S:�aUS4$UR
S:�aUR
5SS	S
:waSS4$US4$UR
S
:XagUR
S:Xagg)z�
Find Microsoft .NET Framework versions.

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

Return
------
tuple of str
    versions
zframeworkver%dzFrameworkDir%dr1r�rGzv4.0r�Nr+�v4z
v4.0.30319�v3.5r�)r��
v2.0.50727g @)zv3.0r�)r�r�r��getattrrNrrv)r��bits�reg_ver�dot_net_dirrs     rr��!SystemInfo._find_dot_net_versions!s����'�'�.�.������-=��-D�E���d�$4�t�$;�<���H��0�0��c�B�H�b���;�;�$����;��
�[�[�D�
 �#&�9�9�;�r��?�d�#:�<�V�K�K��V�K�K�
�[�[�C�
�'�
�[�[�C�
�'� rc�n^^�UU4Sj[[T555n[US5=(d S$)z�
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�># �UH;n[[TU55(dMURT5(dM7Uv� M= g7fr�)rr�
startswith)rp�dir_namerO�prefixs  ��rrr�0SystemInfo._use_last_dir_name.<locals>.<genexpr>Os<����
�3���T�$��)�*�
�/7�/B�/B�6�/J�
�H�3�s�A�A�	ANr�)�reversedr�next)rOr��
matching_dirss`` rrN�SystemInfo._use_last_dir_name>s/���"
�$�W�T�]�3�
�
�
�M�4�(�.�B�.r)r�r�r�rrr��r�)%rrrrr�r
rDr�r8r0r�rrr��staticmethodrr�r2r8r5r6rJrPrOrfrjrprsraryr�r�r�r�r�rNrrrrr�r�Ks���	��[�[��2�
&�F��;�;�~�r�2�L��k�k�"5�|�D�O�S�#�(�>(�T�7��7� �L��L�"����"�<O�*�!��!�(�	H��	H��(��(�T�  ��  �D�
8��
8��$��$�$�	M��	M��
��
� ����"�
H��
H��
H��
H��	/��	/��	/��	/�(�:�/��/rr�c��\rSrSrSrS!Sjr\S5r\S5r\S5r	\S5r
\S	5r\S
5r\S5r
\S5r\S
5r\S5r\S5rSr\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5r\S5rS"Sjr Sr!S r"g)#�EnvironmentInfoiWa
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.
Nc���[U5Ul[UR5Ul[	URU5UlURU:a!Sn[RRU5eg)Nz.No suitable Microsoft Visual C++ version found)
r�r�r�r�r��sirrwr?rx)r�r�r�
vc_min_ver�errs     rr��EnvironmentInfo.__init__os]���t�$����t�w�w�'����T�W�W�f�-����;�;��#�B�C��"�"�9�9�#�>�>�$rc�.�URR$)z;
Microsoft Visual Studio.

Return
------
float
    version
)r�rr�s rr�EnvironmentInfo.vs_verx����w�w�~�~�rc�.�URR$)z@
Microsoft Visual C++ version.

Return
------
float
    version
)r�rr�s rr�EnvironmentInfo.vc_ver�r�rc���SS/nURS:�a/URRSSS9nUS/-
nUS/-
nUSU-/-
nUVs/sH#n[URR
U5PM% sn$s snf)	zE
Microsoft Visual Studio Tools.

Return
------
list of str
    paths
zCommon7\IDEz
Common7\Toolsr�T�r�rRz1Common7\IDE\CommonExtensions\Microsoft\TestWindowzTeam Tools\Performance ToolszTeam Tools\Performance Tools%s)rr�r�rr�r2)r��paths�arch_subdirrOs    r�VSTools�EnvironmentInfo.VSTools�s��� �!1�2���;�;�$���'�'�-�-�d��-�E�K��J�K�K�E��5�6�6�E��7�+�E�F�F�E�=B�C�U�T��T�W�W�)�)�4�0�U�C�C��Cs�)A4c��[URRS5[URRS5/$)zb
Microsoft Visual C++ & Microsoft Foundation Class Includes.

Return
------
list of str
    paths
�IncludezATLMFC\Include)rr�r8r�s r�
VCIncludes�EnvironmentInfo.VCIncludes�s7��
����%�%�y�1�����%�%�'8�9�
�	
rc�8�URS:�aURRSS9nOURRSS9nSU-SU-/nURS:�a	USU-/-
nUVs/sH#n[URR
U5PM% sn$s snf)	zc
Microsoft Visual C++ & Microsoft Foundation Class Libraries.

Return
------
list of str
    paths
�.@T�rR�r��Lib%szATLMFC\Lib%sr�zLib\store%s)rr�r�rr�r8)r�r�r�rOs    r�VCLibraries�EnvironmentInfo.VCLibraries�s����;�;�$���'�'�,�,��,�6�K��'�'�,�,�T�,�:�K��;�&��+�(E�F���;�;�$���n�{�2�3�3�E�=B�C�U�T��T�W�W�)�)�4�0�U�C�C��Cs�+)Bc�h�URS:a/$[URRS5/$)zW
Microsoft Visual C++ store references Libraries.

Return
------
list of str
    paths
r�zLib\store\references)rrr�r8r�s r�VCStoreRefs�EnvironmentInfo.VCStoreRefs�s0���;�;����I��T�W�W�)�)�+B�C�D�Drc	�H�URn[URS5/nURS::aSOSnURRU5nU(aU[URSU-5/-
nURS:Xa8SURR
SS9-nU[URU5/-
nU$URS:�a�URR5(aS	OS
nU[URX`RRSS9-5/-
nURRURR:wa3U[URX`RR
SS9-5/-
nU$U[URS5/-
nU$)
zB
Microsoft Visual C++ Tools.

Return
------
list of str
    paths
�
VCPackagesr�TF�Bin%sr�r�r�z
bin\HostX86%sz
bin\HostX64%sr��Bin)r�rr8rr�r�r�r�r�r�r�)r�r��toolsr�r�rO�host_dirs       r�VCTools�EnvironmentInfo.VCTools�s|���W�W���b�o�o�|�4�5���;�;�$�.�4�E���g�g�'�'��1����d�2�?�?�G�k�,A�B�C�C�E��;�;�$���T�W�W�0�0��0�>�>�D��d�2�?�?�D�1�2�2�E� ���[�[�D�
 �$(�G�G�$:�$:�$<�$<� �BR�
�
�d�2�?�?�H�w�w�7I�7I�d�7I�7S�,S�T�U�U�E��w�w�"�"�d�g�g�&8�&8�8������(�W�W�5H�5H�T�5H�5R�*R�S������
�d�2�?�?�E�2�3�3�E��rc�N�URS::a>URRSSS9n[URR
SU-5/$URRSS9n[URR
S5nURn[X#<SU<35/$)zG
Microsoft Windows SDK Libraries.

Return
------
list of str
    paths
r�Tr�r�r�rM�um)rr�r�rr�rO�_sdk_subdir)r�r�rM�libvers    r�OSLibraries�EnvironmentInfo.OSLibraries�s����;�;�$���'�'�,�,�T�t�,�D�K�����.�.��+�0E�F�G�G��'�'�,�,��,�6�K��t�w�w�,�,�e�4�C��%�%�F���&�+�>�?�@�@rc��[URRS5nURS::aU[US5/$URS:�a
URnOSn[USU-5[USU-5[USU-5/$)	zE
Microsoft Windows SDK Include.

Return
------
list of str
    paths
�includer��glr�r�z%ssharedz%sumz%swinrt)rr�rOrr�)r�r��sdkvers   r�
OSIncludes�EnvironmentInfo.OSIncludess����t�w�w�,�,�i�8���;�;�$���T�'�4�0�1�1��{�{�d�"��)�)�����W�j�6�1�2��W�f�v�o�.��W�i�&�0�1��
rc���[URRS5n/nURS::aX R-
nURS:�aU[US5/-
nURS:�azUU[URRS5[USS5[US	S5[US
S5[URRSSS
UR-SSS5/-
nU$)zM
Microsoft Windows SDK Libraries Paths.

Return
------
list of str
    paths
�
Referencesr�rFzCommonConfiguration\Neutralr��
UnionMetadataz'Windows.Foundation.UniversalApiContractz1.0.0.0z%Windows.Foundation.FoundationContractz,Windows.Networking.Connectivity.WwanContract�
ExtensionSDKszMicrosoft.VCLibsr/�CommonConfiguration�neutral)rr�rOrr�)r��ref�libpaths   r�	OSLibpath�EnvironmentInfo.OSLibpath*s����4�7�7�(�(�,�7�����;�;�#���'�'�'�G��;�;�$����S�"@�A�B�B�G��;�;�$�����T�W�W�*�*�O�<��S�C�Y�O��S�A�9�M��S�H�)�T���G�G�)�)�#�&��d�k�k�)� �)���
�
�G� �rc�4�[UR55$)zC
Microsoft Windows SDK Tools.

Return
------
list of str
    paths
)�list�
_sdk_toolsr�s r�SdkTools�EnvironmentInfo.SdkToolsPs���D�O�O�%�&�&rc#�# �URS:a6URS::aSOSn[URRU5v� URR5(d@URR
SS9nSU-n[URRU5v� URS;adURR5(aS	nOURR
SSS
9nSU-n[URRU5v� OrURS:�ab[URRS5nURR
SS9nURRn[X4<U<35v� URR(aURRv� gg7f)
zX
Microsoft Windows SDK Tools paths generator.

Return
------
generator of str
    paths
r�rFr�zBin\x86Tr�r�)r�rFr�r�zBin\NETFX 4.0 Tools%sN)
rrr�rOr�r�r�r�rPrf)r��bin_dirr�rOr�s     rr��EnvironmentInfo._sdk_tools\sa����;�;���#�{�{�d�2�e�
�G��t�w�w�,�,�g�6�6��w�w�%�%�'�'��'�'�-�-�$�-�7�K��[�(�D��t�w�w�,�,�d�3�3��;�;�,�&��w�w�$�$�&�&� ��"�g�g�1�1�$�D�1�I��+�k�9�D��t�w�w�,�,�d�3�3�
�[�[�D�
 �����-�-�u�5�D��'�'�-�-�$�-�7�K��W�W�2�2�F��t�v�{�;�<�<��7�7�+�+��'�'�2�2�2�,�s�GGc�J�URRnU(aSU-$S$)zE
Microsoft Windows SDK version subdir.

Return
------
str
    subdir
�%s\r�)r�rP�r��ucrtvers  rr��EnvironmentInfo._sdk_subdirs%���'�'�/�/��%,��� �4�"�4rc�h�URS:�a/$[URRS5/$)zC
Microsoft Windows SDK Setup.

Return
------
list of str
    paths
r��Setup)rrr�rOr�s r�SdkSetup�EnvironmentInfo.SdkSetup�s/���;�;����I��T�W�W�*�*�G�4�5�5rc�R�URnURnURS::a4SnUR5(+=(a UR	5(+nOLUR5=(d UR	5nUR
S:H=(d URS:Hn/nU(a2XRRVs/sHn[URU5PM sn-
nU(a2XRRVs/sHn[URU5PM sn-
nU$s snfs snf)zF
Microsoft .NET Framework Tools.

Return
------
list of str
    paths
r�TrY)r�r�rr�r�r�r�r�rr�r�r�)r�r�r��	include32�	include64r�rs       r�FxTools�EnvironmentInfo.FxTools�s����W�W��
�W�W���;�;�$���I��,�,�.�.�J�r�7H�7H�7J�3J�I��(�(�*�A�b�.?�.?�.A�I����'�1�M�R�]�]�g�5M�I�����>S�>S�T�>S�s�d�2�,�,�c�2�>S�T�T�E���>S�>S�T�>S�s�d�2�,�,�c�2�>S�T�T�E����U��Ts�D�9D$c���URS:dURR(d/$URR	SS9n[URRSU-5/$)zN
Microsoft .Net Framework SDK Libraries.

Return
------
list of str
    paths
r�Tr�zlib\um%s)rr�ryr�r�r)r�r�s  r�NetFxSDKLibraries�!EnvironmentInfo.NetFxSDKLibraries�sW���;�;���T�W�W�%8�%8��I��g�g�(�(�T�(�2���T�W�W�(�(�+��*C�D�E�Erc��URS:dURR(d/$[URRS5/$)zM
Microsoft .Net Framework SDK Includes.

Return
------
list of str
    paths
r�z
include\um)rr�ryrr�s r�NetFxSDKIncludes� EnvironmentInfo.NetFxSDKIncludes�s;���;�;���T�W�W�%8�%8��I��T�W�W�(�(�-�8�9�9rc�D�[URRS5/$)zT
Microsoft Visual Studio Team System Database.

Return
------
list of str
    paths
z
VSTSDB\Deploy)rr�r2r�s r�VsTDb�EnvironmentInfo.VsTDb�s���T�W�W�)�)�+;�<�=�=rc�T�URS:a/$URS:a0URRnURR	SS9nOURR
nSnSURU4-n[
X5/nURS:�aU[
XS5/-
nU$)z>
Microsoft Build Engine.

Return
------
list of str
    paths
rGr�Tr�r�zMSBuild\%0.1f\bin%s�Roslyn)rr�r0r�r�r2r)r��	base_pathr�rO�builds     r�MSBuild�EnvironmentInfo.MSBuild�s����;�;����I�
�[�[�4�
����/�/�I��'�'�-�-�d�-�;�K����,�,�I��K�%����k�(B�B���i�&�'���;�;�$���d�9�H�5�6�6�E��rc�h�URS:a/$[URRS5/$)zD
Microsoft HTML Help Workshop.

Return
------
list of str
    paths
rFzHTML Help Workshop)rrr�r0r�s r�HTMLHelpWorkshop� EnvironmentInfo.HTMLHelpWorkshop�s0���;�;����I��T�W�W�,�,�.B�C�D�Drc���URS:a/$URRSS9n[URR
S5nURn[X#<SU<35/$)zS
Microsoft Universal C Runtime SDK Libraries.

Return
------
list of str
    paths
r�Tr�rM�ucrt)rr�r�rr�rp�_ucrt_subdir)r�r�rMr�s    r�
UCRTLibraries�EnvironmentInfo.UCRTLibrariessb���;�;����I��g�g�(�(�T�(�2���4�7�7�-�-�u�5���#�#���S���=�>�?�?rc��URS:a/$[URRS5n[USUR-5/$)zQ
Microsoft Universal C Runtime SDK Include.

Return
------
list of str
    paths
r�r�z%sucrt)rrr�rpr
)r�r�s  r�UCRTIncludes�EnvironmentInfo.UCRTIncludessF���;�;����I��t�w�w�1�1�9�=���W�h��):�):�:�;�<�<rc�J�URRnU(aSU-$S$)zQ
Microsoft Universal C Runtime SDK version subdir.

Return
------
str
    subdir
r�r�)r�rsr�s  rr
�EnvironmentInfo._ucrt_subdir.s%���'�'�4�4��%,��� �4�"�4rc�f�SURs=:�aS:�a/$ URR/$)z;
Microsoft Visual F#.

Return
------
list of str
    paths
rFrG)rr�rjr�s r�FSharp�EnvironmentInfo.FSharp;s4���$�+�+�$��$��I�%����(�(�)�)rc�@�SUR-nURRSS9RS5n/nURR
n[
URSS55n[U5(a([U[U5S5nX5[US5/-
nU[US	5/-
nS
URS--S
[UR5S--4n[R"X65H%upx[XrX�5n	[U	5(dM#U	s $ g)
zO
Microsoft Visual C++ runtime redistributable dll.

Return
------
str
    path
zvcruntime%d0.dllTr�r�z\Toolsz\Redistr]�onecorerZzMicrosoft.VC%d.CRT�
N)rr�r�rKr�r8r	rlrrrr)rr%rr)
r�rdr��prefixes�
tools_path�redist_path�crt_dirsr��crt_dirrOs
          r�VCRuntimeRedist�EnvironmentInfo.VCRuntimeRedistJs��'����4�	��g�g�(�(�T�(�2�8�8��>�����W�W�)�)�
��j�0�0��J�G�H�������{�G�K�,@��,D�E�K��d�;�	�&B�C�C�H��T�*�h�/�0�0��
!�D�K�K�"�$4�5� �C����$4�r�$9�:�
�� )�0�0��D�O�F���W�@�D��d�|�|��� Erc��[URSURURURUR
/U5URSURURURURUR/U5URSURURURUR/U5URSURURURUR UR"URUR$UR&UR(/	U5S9nUR*S:�a)[-UR.5(aUR.US'U$)z�
Return environment dict.

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

Return
------
dict
    environment
r�rMr�rO)r�rMr�rOr rt)�dict�_build_pathsr�r�rr�r�r�r�rr�r�r�r�r�rr�r�rr	rrrr )r��existsr�s   r�
return_env�EnvironmentInfo.return_envosZ����%�%���O�O��O�O��%�%��)�)�	��	��!�!���$�$��$�$��L�L��&�&��*�*���
��%�%���!�!�4�<�<��1A�1A�4�>�>�R���
�"�"���L�L��L�L��J�J��M�M��M�M��L�L��L�L��)�)��K�K�
���7*
��V�;�;�"����(<�(<�!=�!=�)-�)=�)=�C�%�&��
rc��[RRU5n[R"US5R[5n[R"XE5nU(a[[[U55OUnU(d2SUR5-n[RRU5e[U5n	[R"U	5$)a�
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
r�z %s environment variable is empty)r%�chain�
from_iterabler
rDr,rr��filterr�upperrwr?rxrr)
r�r��spec_path_listsr%�
spec_paths�	env_pathsr��extant_pathsr7�unique_pathss
          rr$�EnvironmentInfo._build_paths�s���.�_�_�2�2�?�C�
��K�K��b�)�/�/��8�	����
�6��5;�t�F�5�%�0�1����4�t�z�z�|�C�C��"�"�9�9�#�>�>�&�|�4���|�|�L�)�)r)r�r�r�)Nr)T)#rrrrr�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr	rrr
rr r&r$rrrrr�r�Ws���.?��	��	��	��	��D��D�&�
��
��D��D�(�E��E��#��#�J�A��A�&����2�#��#�J�	'��	'�!3�F�
5��
5��6��6�����4�
F��
F��:��:��	>��	>�����6�E��E��@��@�"�
=��
=��
5��
5��*��*��"��"�H;�z*rr�r�)$r�r�ior�osrr�os.pathrrrr	rHr
rE�platformr%�distutils.errorsrw� setuptools.extern.more_itertoolsr�systemrr
r#r5rPr^rhr�r�r�r�r�r�r�rrr�<module>r:s�������0�0�)������<��?�?��	�!���!�!��f�G�"�<0�h����	��2 �j�<�4$�Nv
�v
�ry#�y#�xI/�I/�Xt	*�t	*r

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic