%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/_distutils/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/_distutils/__pycache__/msvccompiler.cpython-312.pyc

�


_�d\����dZddlZddlZddlZddlmZmZmZmZm	Z	ddl
mZmZddl
mZdZ	ddlZdZeZej$Zej(Zej,Zej0Zer.ej<ej>ej@ejBfZ"ejFd
e$�d�Z%d�Z&d
�Z'Gd�d�Z(d�Z)d�Z*d�Z+Gd�de�Z,e)�dk\r!ejZd�e,Z.ddl/m,Z,ddl/m(Z(yy#e$r^	ddlZddlZdZeZej&Zej*Zej.Zej0Zn#e$rej:d	�YnwxYwY��wxYw)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.z�msvccompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.c��	t||�}g}d}		t||�}|j|�|dz
}�$#t$rYywxYw#t$rY|SwxYw)zReturn list of registry keys.Nrr)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�ks      �D/usr/lib/python3/dist-packages/setuptools/_distutils/msvccompiler.py�	read_keysrJs|����d�C�(��	�A�	�A�
�	��6�1�%�A�	
�����	�Q���
��	������	��
�H�		�s �7�A�	A�A�	A�Ac���	t||�}i}d}		t||�\}}}|j�}t	|�|t	|�<|dz
}�>#t$rYywxYw#t$rY|SwxYw)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    Nrr)r
r�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�types        r�read_valuesr!\s���
��d�C�(��	�A�	�A�
�	� ,�V�Q� 7��D�%���z�z�|�� ,�U� 3��,�t�
��	�Q�����	������	��
�H�	�s"�A�A �	A�A� 	A-�,A-c�Z�t|dd�}|�	|d�}|S|S#t$rY|SwxYw)N�decode�mbcs)�getattr�UnicodeError)�s�decs  rrrrsG��
�!�X�t�
$�C�
��	��F��A�
�H�1�H���	���H�	�s��	*�*c�$�eZdZd�Zd�Zd�Zd�Zy)�
MacroExpanderc�4�i|_|j|�y�N)�macros�load_macros)�self�versions  r�__init__zMacroExpander.__init__}s���������!�c�d�tD]'}t||�}|s�|||jd|z<yy)Nz$(%s))�HKEYSr!r-)r/�macro�pathrrrs      r�	set_macrozMacroExpander.set_macro�s9���	�D��D�$�'�A��/0��v����G�e�O�,��		r2c���d|z}|jd|dzd�|jd|dzd�d}|jd|d	�	|d
kDr|jd|d�n|jd|d
�d}tD]I}	t	||�}t
|d�}t|dj||��}|d|jd<�Ky#t$rtd��wxYw#t
$rY�pwxYw)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\Productrz{}\{}r0z$(FrameworkVersion))
r7�KeyErrorrr4r
rrr!�formatr-)	r/r0�vsbase�net�pr�hrrs	         rr.zMacroExpander.load_macros�s��9�G�C�����~�v��'<�l�K����~�v��'<�l�K�1�����~�s�M�:�	���}����0�#�7K�L����0�#�7G�H�
>���	>�D�
� ��q�)���Q��"�C��D�(�/�/�!�S�"9�:�A�12�9��D�K�K�-�.�	>���	�(�L��
�	���
��
�s�,C	�C!�	C�!	C-�,C-c�n�|jj�D]\}}|j||�}�|Sr,)r-�items�replace)r/r'r�vs    r�subzMacroExpander.sub�s6���K�K�%�%�'�	 �D�A�q��	�	�!�Q��A�	 ��r2N)�__name__�
__module__�__qualname__r1r7r.rJ�r2rr*r*|s��"��>�:r2r*c�4�d}tjj|�}|dk(ry|t|�z}tj|dj	dd�\}}t|dd�dz
}|dk\r|dz
}t|d	d
�dz}|dk(rd}|dk\r||zSy)
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_versionr`�s����F������� �A��B�w��	�C��K��A��k�k�!�"�o�#�#�C��+�G�A�t��q��"�v�;��?�L��r�������q��1�v�;��%�L��q�����q���l�*�*�r2c���d}tjj|�}|dk(rytjjd|�}tj|t|�z|S)zUReturn the processor architecture.

    Possible results are "Intel" or "AMD64".
    z bit (rP�Intel�))rWr0rXrY)r\r�js   r�get_build_architecturere�sV���F������� �A��B�w��������a� �A��;�;�q�3�v�;���+�+r2c��g}|D]7}tjj|�}||vs�'|j|��9|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr6�normpathr)�paths�
reduced_pathsrD�nps    r�normalize_and_reduce_pathsrl�sJ���M�
�%��
�W�W�
�
�a�
 ��
�]�"�� � ��$�	%�
�r2c����eZdZdZdZiZdgZgd�ZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZd�fd
�	Zd�Zdd�Z							dd�Z	dd�Z										dd�Zd�Zd�Zd�Zdd�Zd�Zd d�Zd�Z�xZS)!�MSVCCompilerztConcrete 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.exec�f��t�|�|||�t�|_t	�|_|j
dk(rT|jdk\r"d|_t|j�|_nd|_d|jz|_	d|_
yd|jdzz|_	d|_
y)	Nrb�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %srQF)�superr1r`�_MSVCCompiler__versionre�_MSVCCompiler__arch�_MSVCCompiler__rootr*�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r/�verbose�dry_run�force�	__class__s    �rr1zMSVCCompiler.__init__�s����
����'�5�1�*�,���,�.����;�;�'�!��~�~��"�@��� -�d�n�n� =��
�=���7�$�.�.�H�D�N�
!���9�D�N�N�Q�<N�O�D�N� ��r2c��g|_dtjvrGdtjvr5|jd�r$d|_d|_d|_d|_d|_n�|jd�|_t|j�d	k(rtd
|jz��|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|jd�|jd�	tjdjd
�D]}|jj|��	t#|j�|_d
j%|j�tjd<d|_|j(dk(rgd�|_gd�|_ngd�|_gd�|_gd�|_|j0dk\r
gd�|_n	gd�|_dg|_d|_y#t $rY��wxYw)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�;rb)�/nologo�/O2�/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:NOrr)r�r��/INCREMENTAL:no�/DEBUG)r�r�r�z	/pdb:Noner�r�T)�_MSVCCompiler__pathsrg�environ�find_exe�cc�linkerr��rc�mc�get_msvc_pathsrYrrx�set_path_env_varrZrr@rl�join�preprocess_optionsru�compile_options�compile_options_debug�ldflags_sharedrt�ldflags_shared_debug�ldflags_staticry)r/rDs  r�
initializezMSVCCompiler.initializes�������2�:�:�-��2�:�:�%��
�
�h�'��D�G�$�D�K� �D�H��D�G��D�G��.�.�v�6�D�L��4�<�<� �A�%�,�G�IM���X����m�m�H�-�D�G��-�-�
�3�D�K��}�}�Y�/�D�H��m�m�H�-�D�G��m�m�H�-�D�G��!�!�%�(��!�!�)�,�	��Z�Z��'�-�-�c�2�
'�����#�#�A�&�
'�2�$�,�,�?��� �X�X�d�l�l�3��
�
�6��"&����;�;�'�!�#V�D� �*�D�&�$X�D� �*�D�&�E����>�>�Q��(X�D�%�)�D�%� )�k�������W�	��	�s�8AH7�7	I�Ic��|�d}g}|D�]y}tjj|�\}}tjj|�d}|tjj	|�d}||j
vrt
d|z��|rtjj|�}||jvr=|jtjj|||jz����||jvr>|jtjj|||jz����>|jtjj|||jz����||S)N�rzDon't know how to compile %s)rgr6�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_filenamesdsD�����J��	�(�	V�H��'�'�*�*�8�4�K�T�3��7�7�%�%�d�+�A�.�D�����
�
�d�+�-�.�D��$�-�-�-�#�#A�H�#L�M�M���w�w�'�'��-���d�)�)�)�� � ������j�$��AS�AS�:S�!T�U���+�+�+�� � ������j�$��AS�AS�:S�!T�U�� � ������j�$��AS�AS�:S�!T�U�!	V�"�r2c	��|js|j�|j||||||�}	|	\}}
}}}|xsg}
|
jd�|r|
j	|j
�n|
j	|j�|
D�]�}	||\}}|rtjj|�}||jvrd|z}�nm||jvrd|z}�nX||jvr0|}d|z}	|j|jg|z|gz|gz���||j$vr�tjj'|�}tjj'|�}	|j|j(gd|d|gz|gz�tjj+tjj-|��\}}tjj/||dz�}|j|jgd|zgz|gz����t#dj1||���d	|z}	|j|j2g|
z|z||gz|z����|
S#t$rY���wxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw)
Nz/cz/Tcz/Tpz/foz-hz-rrpz"Don't know how to compile {} to {}z/Fo)ryr��_setup_compiler�extendr�r�r@rgr6�abspath�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r�rAr�)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.compile}s�������O�O���*�*����g�w��
��;G�7�����%�$�*������D�!������ :� :�;����� 4� 4�5��A	(�C�
� ��:���S���g�g�o�o�c�*���d�(�(�(�!�C�K�	���,�,�,�!�C�K�	���+�+�+��	�"�S�[�
�,��J�J����y�7�2�j�\�A�Y�K�O�P����+�+�+�������,��������-��	,��J�J����y�D�%��v�+F�F�#��N�O� �g�g�.�.�r�w�w�/?�/?��/D�E�G�D�!� �g�g�l�l�6�4�%�<�@�G��J�J����y�E�C�K�=�8�G�9�D�E��#�8�?�?��S�I������J�	
(��
�
��W�W�I�"�#���!�*�-�.�%�	%��sA	(�F���A�
��
��$*�,�&�s�+�+��,��2*�,�&�s�+�+��,��$&�
(�"�3�'�'��
(�s[�I2�;'J�0B0J�*J:�2	I?�>I?�	J�J�J�	J7�'J2�2J7�:	K�K�Kc�n�|js|j�|j||�\}}|j||��}|j	||�r-|d|zgz}|r		|j|jg|z�ytjd|�y#t$r}t|��d}~wwxYw)N)r��/OUT:�skipping %s (up-to-date))ryr��_fix_object_args�library_filename�
_need_linkr�r�rrrr�)	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���*��/�/��:�/�V���?�?�7�O�4��'�O�";�!<�<�H���
$��
�
�D�H�H�:��0�1�
�I�I�0�/�B��&�
$��s�m�#��
$�s�$B�	B4�$B/�/B4c���|js|j�|j||�\}}|j|||�}|\}}}|r|j	dt|�z�t
||||�}|� tjj||�}|j||��r�|tjk(r"|	r|jdd}n+|jdd}n|	r
|j}n|j}g}|xsgD]}|jd|z��||z|z|zd|zgz}|��tjj!tjj#|��\}}tjjtjj%|d�|j'|��}|jd|z�|
r|
|dd|r|j)|�|j+tjj%|��	|j-|j.g|z�yt5j6d|�y#t0$r}t3|��d}~wwxYw)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:r�)ryr�r��
_fix_lib_args�warn�strr
rgr6r�r�r	�
EXECUTABLEr�r�rr�r�r�r�r��mkpathr�r�rrrr�)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�sE�� ����O�O�� $� 5� 5�g�z� J���*��'�'�	�<�AU�V�
�:D�7��L�"6���I�I�G��*�+�,�
�
#�4��7K�Y�W���!� �g�g�l�l�:��G�O��?�?�7�O�4��i�2�2�2��"�7�7���;�G�"�1�1�!�"�5�G��"�7�7�G�"�1�1�G��K�%�+��
5���"�"�:��#3�4�
5��(�"�[�0�7�:�g��>W�=X�X�
��)�&(�g�g�&6�&6��G�G�$�$�_�5�'�#��7�!�g�g�l�l��G�G�O�O�G�A�J�/��1F�1F�x�1P������z�K�7�8��+���������~�.��K�K�������8�9�
%��
�
�D�K�K�=�7�2�3�

�I�I�0�/�B��	&�
%���n�$��
%�s�I�	I-�I(�(I-c��d|zS)Nz	/LIBPATH:rN�r/�dirs  r�library_dir_optionzMSVCCompiler.library_dir_optionBs
���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_optionEs��$�J�
�	
r2c�$�|j|�Sr,)r�)r/r�s  r�library_optionzMSVCCompiler.library_optionJs���$�$�S�)�)r2c���|r|dz|g}n|g}|D]]}|D]V}tjj||j|��}tjj	|�s�R|ccS�_y)N�_d)rgr6r�r��exists)r/�dirsr�r��	try_namesr�r�libfiles        r�find_library_filezMSVCCompiler.find_library_fileMss����t��S�)�I���I��	�C�!�
#���'�'�,�,�s�D�,A�,A�$�,G�H���7�7�>�>�'�*�"�N�
#�	�r2c��|jD]b}tjjtjj	|�|�}tjj|�s�`|cStjdjd�D]b}tjjtjj	|�|�}tjj|�s�`|cS|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�rgr6r�r��isfiler�rZ)r/�exerD�fns    rr�zMSVCCompiler.find_exe_s������	�A������b�g�g�o�o�a�0�#�6�B��w�w�~�~�b�!��	�	����F�#�)�)�#�.�	�A������b�g�g�o�o�a�0�#�6�B��w�w�~�~�b�!��	�	�
�
r2c��tsgS|dz}|jdk\r'dj|j|j�}n|j�d|�d�}tD]d}t||�}|s�|jdk\r/|jj||�jd�cS||jd�cS|jdk(r8tD]/}t|d|jz���|jd	�gSgS)
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 dirsrrz8{}\{:0.1f}\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz.\6.0\Build System\Components\Platforms\Win32 (z
)\Directoriesr�rQz%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_regrtrArvr4r!rwrJrZr�)r/r6�platformrrrs      rr�zMSVCCompiler.get_msvc_pathsus
����I��g�~���>�>�Q��M�T�T��������C�/3�k�k�8�E�
�
�	.�D��D�#�&�A���>�>�Q�&��=�=�,�,�Q�t�W�5�;�;�C�@�@��T�7�=�=��-�-�
	.��>�>�Q���
���t�Y����%<�=�I��I�I�=����	�
��	r2c��|dk(r|jd�}n|j|�}|r#dj|�tj|<yy)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�rgr�)r/rrDs   rr�zMSVCCompiler.set_path_env_var�sI���5�=��#�#�I�.�A��#�#�D�)�A��"�x�x��{�B�J�J�t��
r2)rrr)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r)�x86) rKrLrM�__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��
__classcell__)r}s@rrnrn�s����3��M��K��F�M�-�O��W�N��W�N�#�_�4�~�E��V�N��M��M�!��!��,2�2��)��M�!�$O �f�8�������\�~NR�C�0���!�������NC�h!�
�
*��$�,(�T+r2rng @z3Importing new compiler from distutils.msvc9compiler)rn)r*)0r
rWrg�warnings�errorsrrrrr�	ccompilerr	r
�_logrr�winreg�hkey_mod�	OpenKeyExr
�EnumKeyr�	EnumValuer�errorr�ImportError�win32api�win32con�info�
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOTr4r��DeprecationWarningrr!rr*r`rerlrnr��OldMSVCCompiler�distutils.msvc9compilerrNr2r�<module>r+s�����	����2���
�
���M��H��#�#�L����J��#�#�L��|�|�H�.�����"�"��#�#��"�"�	
�E���
�
�4��	�
�$
�,
�,�,�^�4,��I+�9�I+�X��#��
�C�I�I�C�D�"�O�4�6�
��U�
�
����
����,�,���(�(�
��,�,���>�>����
�����
2�	
�	
�
��
�s5�8C<�<E�<D?�>E�?E�E�E�E�E

Zerion Mini Shell 1.0