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-1.pyc

�

�f�[��0�dZddlZddlZddlmZmZmZmZmZddl	m
Z
mZddlm
Z
dZ	ddlZdZeZejZejZejZejZnP#e$rH	ddlZddlZdZeZejZejZejZejZn#e$re
jd��YnwxYwYnwxYwerejejejej fZ!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)z�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
�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)zReturn list of registry keys.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�Ac��	t||��}n#t$rYdSwxYwi}d}		t||��\}}}n#t$rYn=wxYw|���}t	|��|t	|��<|dz
}�_|S)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    NrTr)r
r�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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-)r/�macro�pathrrrs      r�	set_macrozMacroExpander.set_macrojsR���	�	�D��D�$�'�'�A��
�/0��v���G�e�O�,����
�	�	r2c� �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�\r0z$(FrameworkVersion))	r7�KeyErrorrr4r
rrr!r-)
r/r0�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)r/r'r�vs    r�subzMacroExpander.sub�s;���K�%�%�'�'�	 �	 �D�A�q��	�	�!�Q���A�A��r2N)�__name__�
__module__�__qualname__r1r7r.rK�r2rr*r*esP������"�"�"����>�>�>�8����r2r*c�v�d}tj�|��}|dkrdS|t|��z}tj|d��dd��\}}t|dd���dz
}|dkr|dz
}t|d	d
���dz}|dkrd}|dkr||zSdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.����N� r����
��g$@r)�sysr0�find�len�split�int)�prefixrr'�rest�majorVersion�minorVersions      r�get_build_versionra�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�*�*��4r2c���d}tj�|��}|dkrdStj�d|��}tj|t|��z|�S)zUReturn the processor architecture.

    Possible results are "Intel" or "AMD64".
    z bit (rQ�Intel�))rXr0rYrZ)r]r�js   r�get_build_architecturerf�s^���F������ � �A��B�w�w��w������a� � �A��;�q��V���}�Q��'�'r2c��g}|D]:}tj�|��}||vr|�|���;|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr6�normpathr)�paths�
reduced_pathsrE�nps    r�normalize_and_reduce_pathsrm�sS���M�
�%�%��
�W�
�
�a�
 �
 ��
�]�"�"�� � ��$�$�$���r2c���eZdZdZdZiZdgZgd�ZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZdd�Zd�Z		dd�Z		d d�Z			d!d�Z										d"d�Zd�Zd�Zd�Zd#d�Zd�Zd$d�Zd�ZdS)%�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.�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)	Nrc�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %srRF)rr1ra�_MSVCCompiler__versionrf�_MSVCCompiler__arch�_MSVCCompiler__rootr*�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r/�verbose�dry_run�forces    rr1zMSVCCompiler.__init__�s�����D�'�7�E�:�:�:�*�,�,���,�.�.����;�'�!�!��~��"�"�@��� -�d�n� =� =��
�
�=���7�$�.�H�D�N�N�9�D�N�Q�<N�O�D�N� ����r2c��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.exer6rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�lib�include�;rc)�/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:NOrs)r�r��/INCREMENTAL:no�/DEBUG)r�r�r�z	/pdb:Noner�r�T)�_MSVCCompiler__pathsrh�environ�find_exe�cc�linkerr��rc�mc�get_msvc_pathsrZrrx�set_path_env_varr[rrArm�join�preprocess_optionsru�compile_options�compile_options_debug�ldflags_sharedrt�ldflags_shared_debug�ldflags_staticry)r/rEs  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)rhr6�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrr��
res_extension�_mc_extensions�
obj_extension)r/�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��r2Nc	��|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-rrqzDon't know how to compile z to z/Fo)ryr��_setup_compiler�extendr�r�rArhr6�abspath�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r�r�)r/�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))ryr��_fix_object_args�library_filename�
_need_linkr�r�rrr
r�)	r/r��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�)ryr�r��
_fix_lib_args�warn�strr	rhr6r�r�r�
EXECUTABLEr�r�rr�r�r�r�r��mkpathr�r�rrr
r�)r/�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:rO�r/�dirs  r�library_dir_optionzMSVCCompiler.library_dir_options
���S� � r2c� �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�	Nr2c�,�|�|��Sr,)r�)r/r�s  r�library_optionzMSVCCompiler.library_options���$�$�S�)�)�)r2c���|r|dz|g}n|g}|D]_}|D]Z}tj�||�|����}tj�|��r|ccS�[�`dS)N�_d)rhr6r�r��exists)r/�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�#�
#��4r2c���|jD]b}tj�tj�|��|��}tj�|��r|cS�ctjd�d��D]b}tj�tj�|��|��}tj�|��r|cS�c|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        �Pathr�)r�rhr6r�r��isfiler�r[)r/�exerE�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�!�!�
��	�	�	�
��
r2�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)z�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        z dirsrsz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz.\6.0\Build System\Components\Platforms\Win32 (z
)\Directoriesr�rRz%s\6.0Nz�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_regrtrvr4r!rwrKr[r�)r/r6�platformrrrs      rr�zMSVCCompiler.get_msvc_pathsJs@���	��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��	r2c��|dkr|�d��}n|�|��}|r$d�|��tj|<dSdS)z�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        r��libraryr�N)r�r�rhr�)r/rrEs   rr�zMSVCCompiler.set_path_env_varnsc���5�=�=��#�#�I�.�.�A�A��#�#�D�)�)�A��	+�"�x�x��{�{�B�J�t����	+�	+r2)rrr)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r)r)rLrMrN�__doc__�
compiler_type�executablesr�r�r�r�r�r�r��static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionr1r�r�r�r�r�r�r�r�rr�r�r�rOr2rroro�s�������6�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+�+�+�+�+r2rog @z3Importing new compiler from distutils.msvc9compiler)ro)r*)-rrXrh�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_ROOTr4rr!rr*rarfrmror��OldMSVCCompiler�distutils.msvc9compilerrOr2r�<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