ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/distutils/__pycache__/msvccompiler.cpython-311.opt-2.pyc

�

�f�[��.�	ddlZddlZddlmZmZmZmZmZddlm	Z	m
Z
ddlmZdZ
	ddlZdZ
eZejZejZejZejZnP#e$rH	ddlZddlZdZ
eZejZejZejZejZn#e$rejd��YnwxYwYnwxYwe
rejejejejfZ d�Z!d	�Z"d
�Z#Gd�d��Z$d
�Z%d�Z&d�Z'Gd�de	��Z(e%��dkr ej)d��e(Z*ddl+m(Z(ddl+m$Z$dSdS)�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�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���		t||��}n#t$rYdSwxYwg}d}		t||��}n#t$rYnwxYw|�|��|dz
}�=|S�NrT�)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�ks      �=/opt/alt/python311/lib64/python3.11/distutils/msvccompiler.py�	read_keysr6s���'���d�C�(�(���������t�t�����
�A�	�A��	��6�1�%�%�A�A���	�	�	��E�	����	�������	�Q���
�
�Hs��
"�"�<�
A	�A	c��		t||��}n#t$rYdSwxYwi}d}		t||��\}}}n#t$rYn=wxYw|���}t	|��|t	|��<|dz
}�_|Sr)rr�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�types        r�read_valuesr"Gs������d�C�(�(���������t�t�����
�A�	�A��	� ,�V�Q� 7� 7��D�%�����	�	�	��E�	�����z�z�|�|�� ,�U� 3� 3��,�t�
�
��	�Q����
�Hs��
"�"�A�
A
�A
c�f�t|dd��}|�	|d��}n#t$rYnwxYw|S)N�decode�mbcs)�getattr�UnicodeError)�s�decs  rrr\sQ��
�!�X�t�
$�
$�C�
��	���F���A�A���	�	�	��D�	�����Hs�!�
.�.c�&�eZdZd�Zd�Zd�Zd�ZdS)�
MacroExpanderc�>�i|_|�|��dS�N)�macros�load_macros)�self�versions  r�__init__zMacroExpander.__init__fs#���������!�!�!�!�!�c�j�tD]*}t||��}|r|||jd|z<dS�+dS)Nz$(%s))�HKEYSr"r.)r0�macro�pathrrrs      r�	set_macrozMacroExpander.set_macrojsR���	�	�D��D�$�'�'�A��
�/0��v���G�e�O�,����
�	�	r3c� �d|z}|�d|dzd��|�d|dzd��d}|�d|d	��	|d
kr|�d|d��n|�d|d
��n!#t$r}td���d}~wwxYwd}tD]Y}	t	||��}n#t
$rY� wxYwt
|d��}t||�d|����}	|	d|jd<�ZdS)Nz%Software\Microsoft\VisualStudio\%0.1f�VCInstallDirz	\Setup\VC�
productdir�VSInstallDirz	\Setup\VSz Software\Microsoft\.NETFramework�FrameworkDir�installrootg@�FrameworkSDKDirzsdkinstallrootv1.1�sdkinstallrootaPython 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�\r1z$(FrameworkVersion))	r8�KeyErrorrr5rrrr"r.)
r0r1�vsbase�net�exc�pr�hrrs
          rr/zMacroExpander.load_macrosqsq��9�G�C�����~�v��'<�l�K�K�K����~�v��'<�l�K�K�K�1�����~�s�M�:�:�:�
	M���}�}����0�#�7K�L�L�L�L����0�#�7G�H�H�H����	M�	M�	M�(�
L�M�M�
M�����	M����
>���	>�	>�D�
� ��q�)�)�����
�
�
���
�����Q��"�"�C��D�a�a�a���"5�6�6�A�12�9��D�K�-�.�.�	>�	>s*�5B
�

B(�B#�#B(�7C�
C�Cc�p�|j���D]\}}|�||��}�|Sr-)r.�items�replace)r0r(r�vs    r�subzMacroExpander.sub�s;���K�%�%�'�'�	 �	 �D�A�q��	�	�!�Q���A�A��r3N)�__name__�
__module__�__qualname__r2r8r/rL�r3rr+r+esP������"�"�"����>�>�>�8����r3r+c�x�	d}tj�|��}|dkrdS|t|��z}tj|d��dd��\}}t|dd���dz
}|dkr|dz
}t|dd	���d
z}|dkrd}|dkr||zSdS)NzMSC v.����� r
����
��g$@r)�sysr1�find�len�split�int)�prefixrr(�rest�majorVersion�minorVersions      r�get_build_versionrb�s����
�F������ � �A��B�w�w��q�	�C��K�K��A��k�!�"�"�o�#�#�C��+�+�G�A�t��q��"��v�;�;��?�L��r��������q��1��v�;�;��%�L��q������q����l�*�*��4r3c���	d}tj�|��}|dkrdStj�d|��}tj|t|��z|�S)Nz bit (rR�Intel�))rYr1rZr[)r^r�js   r�get_build_architecturerg�sc���
�F������ � �A��B�w�w��w������a� � �A��;�q��V���}�Q��'�'r3c��	g}|D]:}tj�|��}||vr|�|���;|Sr-)�osr7�normpathr)�paths�
reduced_pathsrF�nps    r�normalize_and_reduce_pathsrn�sX���
�M�
�%�%��
�W�
�
�a�
 �
 ��
�]�"�"�� � ��$�$�$���r3c���eZdZ	dZiZdgZgd�ZdgZdgZeezezezZ	dZ
dZdZd	Z
d
xZZdZdd
�Zd�Z		dd�Z		dd�Z			d d�Z										d!d�Zd�Zd�Zd�Zd"d�Zd�Zd#d�Zd�ZdS)$�MSVCCompiler�msvcz.c)z.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exerc�N�tj||||��t��|_t	��|_|jdkrC|jdkr!d|_t|j��|_nd|_d|jz|_	nd|jdzz|_	d|_
dS)	Nrd�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %srSF)rr2rb�_MSVCCompiler__versionrg�_MSVCCompiler__arch�_MSVCCompiler__rootr+�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r0�verbose�dry_run�forces    rr2zMSVCCompiler.__init__�s�����D�'�7�E�:�:�:�*�,�,���,�.�.����;�'�!�!��~��"�"�@��� -�d�n� =� =��
�
�=���7�$�.�H�D�N�N�9�D�N�Q�<N�O�D�N� ����r3c��g|_dtjvrGdtjvr9|�d��r$d|_d|_d|_d|_d|_n�|�	d��|_t|j��d	krtd
|jz���|�d��|_|�d��|_|�d��|_|�d��|_|�d��|_|�
d��|�
d��	tjd�d
��D]}|j�|���n#t $rYnwxYwt#|j��|_d
�|j��tjd<d|_|jdkrgd�|_gd�|_ngd�|_gd�|_gd�|_|jdkr
gd�|_n	gd�|_dg|_d|_dS)N�DISTUTILS_USE_SDK�MSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer7rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�lib�include�;rd)�/nologo�/Ox�/MD�/W3�/GX�/DNDEBUG)r��/Od�/MDdr�r��/Z7�/D_DEBUG)r�r�r�r��/GS-r�)r�r�r�r�r�r�r�)�/DLLr�z/INCREMENTAL:NOrt)r�r��/INCREMENTAL:no�/DEBUG)r�r�r�z	/pdb:Noner�r�T)�_MSVCCompiler__pathsri�environ�find_exe�cc�linkerr��rc�mc�get_msvc_pathsr[rry�set_path_env_varr\rrBrn�join�preprocess_optionsrv�compile_options�compile_options_debug�ldflags_sharedru�ldflags_shared_debug�ldflags_staticrz)r0rFs  r�
initializezMSVCCompiler.initialize�s�������"�*�,�,��B�J�1F�1F�4�=�=�Ya�Kb�Kb�1F��D�G�$�D�K� �D�H��D�G��D�G�G��.�.�v�6�6�D�L��4�<� � �A�%�%�,�.J���.(�)�)�)�
�m�m�H�-�-�D�G��-�-�
�3�3�D�K��}�}�Y�/�/�D�H��m�m�H�-�-�D�G��m�m�H�-�-�D�G��!�!�%�(�(�(��!�!�)�,�,�,�	��Z��'�-�-�c�2�2�
'�
'����#�#�A�&�&�&�&�
'���	�	�	��D�	����1�$�,�?�?��� �X�X�d�l�3�3��
�6��"&����;�'�!�!�$1�$1�$1�D� �*=�*=�*=�D�&�&�$1�$1�$1�D� �*=�*=�*=�D�&�E�D�D����>�Q���)�)�)�D�%�%�)�)�)�D�%�!*�l�������s�AF�
F#�"F#�c��|�d}g}|D�]s}tj�|��\}}tj�|��d}|tj�|��d�}||jvrt
d|z���|rtj�|��}||jvr<|�	tj�
|||jz������||jvr=|�	tj�
|||jz������8|�	tj�
|||j
z������u|S)Nr�r
zDon't know how to compile %s)rir7�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrr��
res_extension�_mc_extensions�
obj_extension)r0�source_filenames�	strip_dir�
output_dir�	obj_names�src_namer�exts        r�object_filenameszMSVCCompiler.object_filenames7s�����B�z��	�(�	L�	L�H��'�*�*�H�5�5�K�T�3��7�%�%�d�+�+�A�.�D����
�
�d�+�+�,�,�-�D��$�-�-�-�#�$B�X�$M�N�N�N��
/��w�'�'��.�.���d�)�)�)�� � �"�'�,�,�
�04�t�7I�0I�#K�#K�L�L�L�L���+�+�+�� � �"�'�,�,�
�04�t�7I�0I�#K�#K�L�L�L�L�� � �"�'�,�,�
�04�t�7I�0I�#K�#K�L�L�L�L��r3Nc	��|js|���|�||||||��}	|	\}}
}}}|pg}
|
�d��|r|
�|j��n|
�|j��|
D�];}	||\}}n#t$rY�wxYw|rtj	�
|��}||jvrd|z}�n�||jvrd|z}�n�||j
vrQ|}d|z}	|�|jg|z|gz|gz��n!#t $r}t#|���d}~wwxYw��||jv�rtj	�|��}tj	�|��}	|�|jgd|d|gz|gz��tj	�tj	�|����\}}tj	�||dz��}|�|jgd|zgz|gz��n!#t $r}t#|���d}~wwxYw���t#d|�d	|�����d
|z}	|�|jg|
z|z||gz|z����#t $r}t#|���d}~wwxYw|
S)Nz/cz/Tcz/Tpz/foz-hz-rrrzDon't know how to compile z to z/Fo)rzr��_setup_compiler�extendr�r�rBrir7�abspath�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r�r�)r0�sourcesr�r.�include_dirs�debug�
extra_preargs�extra_postargs�depends�compile_info�objects�pp_opts�build�compile_opts�obj�srcr��	input_opt�
output_opt�msg�h_dir�rc_dirr�_�rc_files                         r�compilezMSVCCompiler.compileVs�����	��O�O�����*�*�:�v�|�+2�G�^�M�M��:F�7�����%�$�*������T�"�"�"��	6����� :�;�;�;�;����� 4�5�5�5��?	(�?	(�C�
� ��:���S�S���
�
�
���
�����
+��g�o�o�c�*�*���d�(�(�(�!�C�K�	�	���,�,�,�!�C�K�	�	���+�+�+��	�"�S�[�
�,��J�J���y�7�2� *�|� ,�/8�k� :�;�;�;�;��)�,�,�,�&�s�+�+�+�����,�������+�+�+������,�,�������-�-��,��J�J���y� $�e�T�6�:� ;�>A�U� C�D�D�D� �g�.�.���0@�0@�#�0F�0F�G�G�G�D�!� �g�l�l�F�D�5�L�A�A�G��J�J���y� %���}� -�07�y� 9�:�:�:�:��*�,�,�,�&�s�+�+�+�����,�����#�l�&)�c�c�3�3�$0�1�1�1����J�
(��
�
�D�G�9�|�3�g�=�%�z�2�3�)�*�+�+�+�+��&�
(�
(�
(�"�3�'�'�'�����
(�����s[�B � 
B-�,B-�&D)�)
E�3E�E�B.I�
I!�
I�I!�)J,�,
K
�6K�K
c��|js|���|�||��\}}|�||���}|�||��rN|d|zgz}|r		|�|jg|z��dS#t$r}t|���d}~wwxYwtj
d|��dS)N)r��/OUT:�skipping %s (up-to-date))rzr��_fix_object_args�library_filename�
_need_linkr�r�rrr
r�)	r0r��output_libnamer�r��target_lang�output_filename�lib_argsr�s	         r�create_static_libzMSVCCompiler.create_static_lib�s�����	��O�O���� $� 5� 5�g�z� J� J���*��/�/��;E�0�G�G���?�?�7�O�4�4�		C��'�O�";�!<�<�H��
��
$��
�
�D�H�:��0�1�1�1�1�1��%�
$�
$�
$��s�m�m�#�����
$����
�I�0�/�B�B�B�B�Bs�/B�
B-�B(�(B-c�(�|js|���|�||��\}}|�|||��}|\}}}|r%|�dt|��z��t
||||��}|� tj�	||��}|�
||���r�|tjkr"|	r|j
dd�}n!|jdd�}n|	r|j
}n|j}g}|pgD]}|�d|z���||z|z|zd|zgz}|��tj�tj�|����\}}tj�	tj�|d��|�|����}|�d|z��|
r|
|dd�<|r|�|��|�tj�|����	|�|jg|z��dS#t0$r}t3|���d}~wwxYwt5jd|��dS)Nz5I don't know what to do with 'runtime_library_dirs': r
z/EXPORT:r�rz/IMPLIB:r�)rzr�r��
_fix_lib_args�warn�strr	rir7r�r�r�
EXECUTABLEr�r�rr�r�r�r�r��mkpathr�r�rrr
r�)r0�target_descr�r�r��	libraries�library_dirs�runtime_library_dirs�export_symbolsr�r�r��
build_tempr��
fixed_args�lib_opts�ldflags�export_opts�sym�ld_args�dll_name�dll_ext�implib_filer�s                        r�linkzMSVCCompiler.link�s�����	��O�O���� $� 5� 5�g�z� J� J���*��'�'�	�<�(<�>�>�
�:D�7��L�"6��	5��I�I�N��2�3�3�4�
5�
5�
5�#�4�#/�1E�#,�.�.���!� �g�l�l�:��G�G�O��?�?�7�O�4�4�,	C��i�2�2�2��6�"�7����;�G�G�"�1�!�"�"�5�G�G��2�"�7�G�G�"�1�G��K�&�,�"�
5�
5���"�"�:��#3�4�4�4�4���)�K�7���")�O�";�!<�=�G��)�&(�g�&6�&6��G�$�$�_�5�5�'7�'7�#��7� �g�l�l��G�O�O�G�A�J�/�/��)�)�(�3�3�5�5�����
�[� 8�9�9�9��
,�+�������
/����~�.�.�.��K�K������8�8�9�9�9�
%��
�
�D�K�=�7�2�3�3�3�3�3��%�
%�
%�
%���n�n�$�����
%����
�I�0�/�B�B�B�B�Bs�<I�
I:�&I5�5I:c��d|zS)Nz	/LIBPATH:rP�r0�dirs  r�library_dir_optionzMSVCCompiler.library_dir_options
���S� � r3c� �td���)Nz<don't know how to set runtime library search path for MSVC++)rr�s  r�runtime_library_dir_optionz'MSVCCompiler.runtime_library_dir_options��$�L�N�N�	Nr3c�,�|�|��Sr-)r�)r0r�s  r�library_optionzMSVCCompiler.library_options���$�$�S�)�)�)r3c���|r|dz|g}n|g}|D]_}|D]Z}tj�||�|����}tj�|��r|ccS�[�`dS)N�_d)rir7r�r��exists)r0�dirsr�r��	try_namesr�r�libfiles        r�find_library_filezMSVCCompiler.find_library_file"s����	��t��S�)�I�I���I��	�	�C�!�
#�
#���'�,�,�s�D�,A�,A�4�,H�,H�I�I���7�>�>�'�*�*�#�"�N�N�N�N�N�#�
#��4r3c���	|jD]b}tj�tj�|��|��}tj�|��r|cS�ctjd�d��D]b}tj�tj�|��|��}tj�|��r|cS�c|S)N�Pathr�)r�rir7r�r��isfiler�r\)r0�exerF�fns    rr�zMSVCCompiler.find_exe4s���	���	�	�A�����b�g�o�o�a�0�0�#�6�6�B��w�~�~�b�!�!�
��	�	�	�
���F�#�)�)�#�.�.�	�	�A�����b�g�o�o�a�0�0��5�5�B��w�~�~�b�!�!�
��	�	�	�
��
r3�x86c���	tsgS|dz}|jdkrd|j|jfz}n
|j�d|�d�}tD]q}t	||��}|r]|jdkr5|j�||���d��cS||�d��cS�r|jdkr9tD]1}t	|d|jz���|�d	��n�2gS)
Nz dirsrtz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz.\6.0\Build System\Components\Platforms\Win32 (z
)\Directoriesr�rSz%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_regrurwr5r"rxrLr\r�)r0r7�platformrrrs      rr�zMSVCCompiler.get_msvc_pathsJsE��	�
�	��I��g�~���>�Q���L��k�4�>�2�3�C�C�26����h�h�h�H�C��	.�	.�D��D�#�&�&�A��
.��>�Q�&�&��=�,�,�Q�t�W�5�5�;�;�C�@�@�@�@�@��T�7�=�=��-�-�-�-�-�	
.��>�Q����
�
���t�Y���%<�=�=�I��I�I�=�>�>�>��E�J��	r3c��	|dkr|�d��}n|�|��}|r$d�|��tj|<dSdS)Nr��libraryr�)r�r�rir�)r0rrFs   rr�zMSVCCompiler.set_path_env_varnsh��	��5�=�=��#�#�I�.�.�A�A��#�#�D�)�)�A��	+�"�x�x��{�{�B�J�t����	+�	+r3)rrr)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r)r)rMrNrO�
compiler_type�executablesr�r�r�r�r�r�r��static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionr2r�r�r�r�r�r�r�r�rr�r�r�rPr3rrprp�s�������6��M��K��F�M�-�-�-�O��W�N��W�N�$�o�5�$�%�'5�6�N��M��M�!��!��,2�2��)��M�!�!�!�!�$< �< �< �D$%�$&�����@HI�AE�R�R�R�R�p&*� !�&*�C�C�C�C�:���"&� ��� ���LC�LC�LC�LC�f!�!�!�N�N�N�*�*�*�����$���,"�"�"�"�H+�+�+�+�+r3rpg @z3Importing new compiler from distutils.msvc9compiler)rp)r+),rYri�distutils.errorsrrrrr�distutils.ccompilerrr	�	distutilsr
r	�winreg�hkey_mod�	OpenKeyExr�EnumKeyr�	EnumValuer�errorr�ImportError�win32api�win32con�info�
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOTr5rr"rr+rbrgrnrpr��OldMSVCCompiler�distutils.msvc9compilerrPr3r�<module>r's������������'�'�'�'�'�'�'�'�'�'�'�'�'�'� � � � � � � � ��������
�8��M�M�M��M��H��#�L���J��#�L��|�H�H���8�8�8�8����������
����,���(�
��,���>�����8�8�8����7�	8�	8�	8�	8�	8�8������8����"�)�
�
 �
�
'�
�
(�
�
'�
)�E�

�
�
�"
�
�
�*
�
�
�+�+�+�+�+�+�+�+�Z���2(�(�(����s+�s+�s+�s+�s+�9�s+�s+�s+�l
����#���
�C�I�C�D�D�D�"�O�4�4�4�4�4�4�5�5�5�5�5�5�5�5��s5�$A�B�(A=�<B�=B�B�B�B�B

Zerion Mini Shell 1.0