%PDF- %PDF-
Mini Shell

Mini Shell

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

�


_�d�u�
���dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlmZddl
mZdd	lmZmZmZdd
lmZddlmZmZdd
lmZddlmZddlmZddlmZdZdddddd�Zdddddd�dddddd�edddddd�dddddd�d �Z erd!d!d"d#d$d�e d%<d!d!d&d'd$d�e d(<e jCejD�dZ#d)�Z$d*�Z%d+�Z&d,�Z'd-�Z(d.�Z)d/�Z*d0�Z+d1�Z,d2�Z-Gd3�d4e	�Z.y)5zFdistutils.command.install

Implements the Distutils 'install' command.�N)�log�)�Command)�DEBUG)�get_config_vars)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError�DistutilsPlatformError�)�_framework_compat)�_collections)�	USER_BASE)�	USER_SITETz{base}/Lib/site-packagesz{base}/Include/{dist_name}z{base}/Scriptsz{base})�purelib�platlib�headers�scripts�datazA{base}/lib/{implementation_lower}{py_version_short}/site-packageszN{platbase}/{platlibdir}/{implementation_lower}{py_version_short}/site-packageszM{base}/include/{implementation_lower}{py_version_short}{abiflags}/{dist_name}z
{base}/binz!{base}/lib/{implementation_lower}z*{base}/{platlibdir}/{implementation_lower}z1{base}/include/{implementation_lower}/{dist_name}z{base}/site-packagesz{base}/include/{dist_name})�posix_prefix�
posix_home�nt�pypy�pypy_ntz
{usersite}zF{userbase}/{implementation}{py_version_nodot_plat}/Include/{dist_name}z:{userbase}/{implementation}{py_version_nodot_plat}/Scriptsz
{userbase}�nt_userzQ{userbase}/include/{implementation_lower}{py_version_short}{abiflags}/{dist_name}z{userbase}/bin�
posix_userc	���tjt�5tj�D�cic]}|tj
|d����c}cddd�Scc}w#1swYyxYw)NF)�expand)�
contextlib�suppress�AttributeError�	sysconfig�get_scheme_names�	get_paths)�schemes �G/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py�_load_sysconfig_schemesr*csb��	�	�	�^�	,�
�$�4�4�6�
��
�I�'�'��u�=�=�
�
�
��
�
�
�s�A!�A�A!�A!�!A*c	���t�xsi}ttjt|��D�cic]-}|itj|i��|j|i����/c}Scc}w)z=
    Extend default schemes with schemes from sysconfig.
    )r*�set�	itertools�chain�INSTALL_SCHEMES�get)�sysconfig_schemesr(s  r)�
_load_schemesr2ks{��
0�1�7�R���)�/�/�/�;L�M�N��

�		�
��!�!�&�"�-�
��#�#�F�B�/�
�	
����s�2A)c�&�ttd�ryy)N�pypy_version_info�PyPy�Python)�hasattr�sys��r)�_get_implementationr;{s���s�'�(��r:c��t|tt|���}t|�j	t|t
|���y�N)�_inject_headers�_load_scheme�_resolve_scheme�vars�update�_remove_set�
_scheme_attrs)�ob�namer(s   r)�_select_schemerG�s4��
�T�<���0E�#F�
G�F���H�O�O�K��M�&�$9�:�;r:c�p�|j�D��cic]\}}t||���||��c}}Scc}}w)z1
    Include only attrs that are None in ob.
    )�items�getattr)rE�attrs�key�values    r)rCrC�s2��*/����S�:�3��'�"�c�:J�:R�C��J�S�S��Ss�2�2c��|jd�\}}}	tj|�}|S#t$r"t	j
t
|��}Y|SwxYw)N�_)�	partitionr%�get_preferred_scheme�	Exception�fwr(�
_pypy_hack)rF�os_name�seprL�resolveds     r)r@r@�s\�����s�+��G�S�#�/��1�1�#�6���O���/��9�9�Z��-�.���O�/�s�.�'A�Ac��t�|Sr=)r2)rFs r)r?r?�s���?�4� � r:c�X�tt|��}|jd|d�|S)z�
    Given a scheme name and the resolved scheme,
    if the scheme does not include headers, resolve
    the fallback scheme for the name and use headers
    from it. pypa/distutils#88
    r)r?rT�
setdefault)rFr(�fallbacks   r)r>r>�s-���J�t�,�-�H�
���i��)�!4�5��Mr:c�B�tD�cic]}d|��||��
c}Scc}w)z<Resolve install directories by applying the install schemes.�install_)�SCHEME_KEYS)r(rLs  r)rDrD�s&��5@�A�c�h�s�e��f�S�k�)�A�A��As�c��tjdk}ttd�xr|}|jd�}ddtj
dk(zz}|r|r|S|S)N)��r4)�_user�_homer�_ntr)r8�version_infor7�endswith�osrF)rF�PY37�old_pypy�prefix�	pypy_names     r)rTrT�s\�����f�$�D��s�/�0�9�T�H����1�2�
2�F���"�'�'�T�/�2�2�I� �V�9�5��5r:c��eZdZdZgd�Zgd�Zer(ejdddezf�ejd�ddiZ	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdefdefd efd!efd"d#�fgZy)$�installz'install everything from build directory))zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z
install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nz<install everything relative to this alternate root directory)zinstall-purelib=Nz;installation directory for pure Python module distributions)zinstall-platlib=Nz8installation directory for non-pure module distributions)zinstall-lib=Nzginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))zinstall-headers=Nz(installation directory for C/C++ headers)zinstall-scripts=Nz)installation directory for Python scripts)z
install-data=Nz%installation directory for data files)�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz1force installation (overwrite any existing files))�
skip-buildNz2skip rebuilding everything (for testing/debugging))zrecord=Nz3filename in which to record list of installed files)rnrrrt�userNz!install in user site-package '%s'rprnc�r�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_y)zInitializes options.Nrr)rj�exec_prefix�homeru�install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar�install_userbaser�install_usersitern�optimize�
extra_path�install_path_filerr�
skip_build�warn_dir�
build_base�	build_lib�record��selfs r)�initialize_optionszinstall.initialize_options�s�����������	���	�
!��� $�����	� $���#���#������#��� ��� )��� )��������
����!"�����
������
���������r:c�4	�|js|js|jr#|js|jrtd��|jr#|js|jrtd��|jrG|js0|js$|js|js|jrtd��tjdk7r$|jr|jd�d|_|jd�tjdk(r|j�n|j�|jd�tjj�d	}t!d
d�\}}	tj"}|j&j)�|j&j+�|j&j-�|d
tj.ddzdtj.ddz|||||t1tdd�t3�j5�t3�d�}t7t1tdd�j9dd���}t:r|j<|d<|j>|d<tAjBtEjF�|tIj �|g�|_%|jM�|jd�|j|d<|j|d<tNr,d	dl(m(}tSd�|t7|jJ��|jU�|jd�|jr|jW�|jX�=|j&j[�r|j\|_,n|j^|_,|jadddd d!d"dd�|jc�|jX|_2tjfji|jX|jj�|_,|jl�|jod#dddd d!d"�|jd$�|jqd%d&d'�y#t$$rd}Y���wxYw)(zFinalizes options.zWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rrjrw�z%d.%drz%d%d�
platlibdir�lib)�	dist_name�dist_version�
dist_fullname�
py_version�py_version_short�py_version_nodot�
sys_prefixrj�sys_exec_prefixrw�abiflagsr��implementation_lower�implementation�winver�.)�py_version_nodot_plat�userbase�usersitezpost-expand_basedirs()�base�platbase)�pprintzconfig vars:zpost-expand_dirs()rrrrr�libbasezafter prepending root�build)r�r�)r�r�)9rjrwrxryrzr
rurgrF�warn�	dump_dirs�
finalize_unix�finalize_otherr8�version�splitrr�r$�distribution�get_name�get_version�get_fullnamererJr;�lower�dict�replace�
HAS_USER_SITEr�r�r�	DictStackrSrAr%�config_vars�expand_basedirsrr��print�expand_dirs�create_home_pathr�has_ext_modulesr}r|�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsr{�change_roots�set_undefined_options)r�r�rjrwr��
local_vars�compat_varsr�s        r)�finalize_optionszinstall.finalize_optionsLs��� 
�K�K�4�+�+�t�y�y�����!6�!6�&�>��
�
�9�9�$�+�+��)9�)9�&�K��
��9�9��K�K�����y�y�� � ��$�$�&�:��
��7�7�g������	�	�G�H�#'�� �	
���2�3�
�7�7�g����� ����!����5�6��[�[�&�&�(��+�
� /��-� H����	��|�|�H�
�*�*�3�3�5� �-�-�9�9�;�!�.�.�;�;�=�$� '�#�*:�*:�2�A�*>� >� &��)9�)9�"�1�)=� =� ��*�&� �!�#�|�U�;�$7�$9�$?�$?�$A�1�3�
�
�$�")�#�x��"<�"D�"D�S�"�"M�
��
�%)�%:�%:�J�z�"�%)�%:�%:�J�z�"�'�1�1�
�W�W�Y��Y�%>�%>�%@�*�M�
���	
�������/�0�"�.�.�
�6��!%�!6�!6�
�:���%��.�!��4��(�(�)�*�	
�������+�,��9�9��!�!�#����#�� � �0�0�2�#'�#7�#7�� �#'�#7�#7�� �	
�����������		
� 	
��� �#�/�/����7�7�<�<��(8�(8�$�/�/�J����9�9� �����5�)�Y�	�6�9�
�	
���.�/�	
�"�"��1�3M�	
��K�	��H�	�s�R�R�Rc�t�tsyddlm}tj|dz�|j
D]�}|d}|ddk(r|dd}||jvr.|j|}|j|�}t||�}n|j|�}t||�}tjd||���y)	zDumps the list of user options.Nr)�
longopt_xlate�:r����=z  %s: %s)	r�fancy_getoptr�r�debug�user_options�negative_opt�	translaterJ)r��msgr��opt�opt_name�vals      r)r�zinstall.dump_dirss�����0��	�	�#��)���$�$�	1�C��1�v�H���|�s�"�#�A�b�>���4�,�,�,��,�,�X�6��#�-�-�m�<��!�$��1�1��#�-�-�m�<���d�H�-���I�I�j�(�C�0�	1r:c���|j�|j�l|jduxr|jduxr|jduxs.|j
duxs|jduxs|jdu}|rtd��y|jrA|j�td��|jx|_|_|jd�y|j�*|jx|_|_|jd�y|j��|j�td��t!t"dd�}t$j&j)t*j�|z|_t$j&j)t*j�|z|_n|j�|j|_|j|_|j|_|jd	�y)
z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incomplete�$User base directory is not specifiedrrz*must not supply exec-prefix without prefix�_prefix_additionr�r)ryrzrr|r}r~r�r�r
rur�r�
select_schemerxrjrwrJr%rgr��normpathr8)r��incomplete_schemer�s   r)r�zinstall.finalize_unixs������(�D�,A�,A�,M��$�$��,�5��,�,��4�5��,�,��4�-�
�'�'�4�/�-��'�'�4�/�
-��$�$��,�
�!�*�8���
��9�9��$�$�,�,�-S�T�T�8<�8M�8M�M�D��� 5����|�,�
�Y�Y�
"�8<�	�	�A�D��� 5����|�,��{�{�"��#�#�/�.�D���
$+�9�6H�"�#M� � �g�g�.�.�s�z�z�:�=M�M���#%�7�7�#3�#3�C�O�O�#D�GW�#W�� ��#�#�+�'+�{�{�D�$� $���D��$(�$4�$4�D�!����~�.r:c�j�|jrR|j�td��|jx|_|_|jtjdz�y|j�*|jx|_|_|jd�y|j�2tjjtj�|_	|jx|_|_	|jtj�y#t$rtdtjz��wxYw)z)Finalizes options for non-posix platformsNr�rbrz)I don't know how to install stuff on '%s')rur�rryrzr�rgrFrxrjr�r�r8�KeyErrorr�s r)r�zinstall.finalize_otherFs����9�9��$�$�,�,�-S�T�T�8<�8M�8M�M�D��� 5����r�w�w��0�1�
�Y�Y�
"�8<�	�	�A�D��� 5����|�,��{�{�"� �g�g�.�.�s�z�z�:���8<���C�D��� 5�
��"�"�2�7�7�+���
�,�?�"�'�'�I���
�s�,D�&D2c��t||�yr=)rG)r�rFs  r)r�zinstall.select_scheme\s���t�T�"r:c���|D]e}t||�}|��tjdvrtjj	|�}t||j�}t|||��gy)N)r�r)rJrgrFr��
expanduserr
r��setattr)r�rK�attrr�s    r)�
_expand_attrszinstall._expand_attrs_s`���	)�D��$��%�C����7�7�o�-��'�'�,�,�S�1�C� ��d�&6�&6�7����d�C�(�
	)r:c�*�|jgd��y)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.)ryrzr{N�r�r�s r)r�zinstall.expand_basedirshs��	
���G�Hr:c�*�|jgd��y)z+Calls `os.path.expanduser` on install dirs.)r|r}rr~r�r�Nr�r�s r)r�zinstall.expand_dirsms�����
�		
r:c�\�|D]'}d|z}t||tt||����)y)z!Call `convert_path` over `names`.r]N)r�r	rJ�r��namesrFr�s    r)r�zinstall.convert_pathszs5���	C�D���$�D��D�$��W�T�4�-@� A�B�	Cr:c��|j�|jj|_|j��tjd�t	|jt
�r |jj
d�|_t|j�dk(r|jdx}}n3t|j�dk(r|j\}}ntd��t|�}nd}d}||_
||_y)	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.�,rrrzY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr�)r�r�r�warning�
isinstance�strr��lenr
r	�	path_filer�)r�r�r�s   r)r�zinstall.handle_extra_path�s����?�?�"�"�/�/�:�:�D�O��?�?�&��K�K�.�
��$�/�/�3�/�"&�/�/�"7�"7��"<����4�?�?�#�q�(�)-����);�;�	�J��T�_�_�%��*�(,���%�	�:�*�B���&�j�1�J��I��J�#���$��r:c�r�|D]2}d|z}t||t|jt||����4y)z:Change the install directories pointed by name using root.r]N)r�rr{rJr�s    r)r�zinstall.change_roots�s;���	M�D���$�D��D�$��D�I�I�w�t�T�7J� K�L�	Mr:c�|�|jsyttjj	d��}|j
j
�D]j\}}t|�j|�s�!tjj|�r�A|jd|z�tj|d��ly)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)rur	rgr�r�r�rIr��
startswith�isdir�debug_print�makedirs)r�rxrFr�s    r)r�zinstall.create_home_path�s����y�y���B�G�G�.�.�s�3�4���*�*�0�0�2�	)�J�D�$��4�y�#�#�D�)�"�'�'�-�-��2E�� � �!;�d�!B�C����D�%�(�	)r:c�D�|jsZ|jd�|jjd�j}|j
r|t
�k7rtd��|j�D]}|j|��|jr|j�|jr�|j�}|jr9t|j�}tt|��D]
}|||d||<�|j!t"|j|fd|jz�t%t&j(j*t,j(�}t%t&j(j.|�}t&j(j/t&j(j+|j0��}|j
r?|jr|j2s&||vr!t5j6d|j0�yyyy)zRuns the command.r�z"Can't install when cross-compilingNz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r��run_commandr��get_command_obj�	plat_namer�rr�get_sub_commandsr��create_path_filer��get_outputsr{r��range�executer�maprgr�r�r8�normcaserr�rr�)r��
build_plat�cmd_name�outputs�root_len�counter�sys_pathrs        r)�runzinstall.run�s���������W�%��*�*�:�:�7�C�M�M�J��}�}��|�~�!=�,�-T�U�U��-�-�/�	'�H����X�&�	'��>�>��!�!�#��;�;��&�&�(�G��y�y��t�y�y�>��$�S��\�2�C�G�'.�w�'7��	�'B�G�G�$�C��L�L�����g�&�9�D�K�K�G�
��r�w�w�'�'����2���r�w�w�'�'��2���g�g�&�&�r�w�w�'7�'7��8H�8H�'I�J���M�M��^�^��(>�(>��8�+��I�I�E�� � �

�,�)?�
r:c��tjj|j|jdz�}|j
r(|j
t||jgfd|z�y|jd|z�y)zCreates the .pth file�.pthzcreating %szpath file '%s' not createdN)
rgr�r�r�r�r�rrr�r�)r��filenames  r)r�zinstall.create_path_file�sf���7�7�<�<�� 4� 4�d�n�n�v�6M�N���!�!��L�L��X����'8�9�=�8�;S�
�
�I�I�2�X�=�>r:c�h�g}|j�D]>}|j|�}|j�D]}||vs�|j|���@|jrR|j
rF|jtjj|j|jdz��|S)z.Assembles the outputs of all the sub-commands.r)
r��get_finalized_commandr��appendr�r�rgr�r�r�)r�rr�cmdr
s     r)r�zinstall.get_outputs�s������-�-�/�	-�H��,�,�X�6�C� �O�O�-�
-���7�*��N�N�8�,�
-�		-��>�>�d�4�4��N�N�2�7�7�<�<��(<�(<�d�n�n�v�>U�V�W��r:c��g}|j�D]2}|j|�}|j|j���4|S)z*Returns the inputs of all the sub-commands)r�r�extend�
get_inputs)r��inputsrrs    r)rzinstall.get_inputssK�����-�-�/�	,�H��,�,�X�6�C��M�M�#�.�.�*�+�	,��
r:c�n�|jj�xs|jj�S)zSReturns true if the current distribution has any Python
        modules to install.)r��has_pure_modulesr�r�s r)�has_libzinstall.has_libs/��
���.�.�0�W�D�4E�4E�4U�4U�4W�	
r:c�6�|jj�S)zLReturns true if the current distribution has any headers to
        install.)r��has_headersr�s r)rzinstall.has_headers���� � �,�,�.�.r:c�6�|jj�S)zMReturns true if the current distribution has any scripts to.
        install.)r��has_scriptsr�s r)rzinstall.has_scriptsrr:c�6�|jj�S)zJReturns true if the current distribution has any data to.
        install.)r��has_data_filesr�s r)�has_datazinstall.has_data s��� � �/�/�1�1r:rr~r�r��install_egg_infoc��y)NTr9r�s r)�<lambda>zinstall.<lambda>,s�r:) �__name__�
__module__�__qualname__�descriptionr��boolean_optionsr�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r
r�r�rrrrr �sub_commandsr9r:r)rmrm�s���;�K�:�L�x9�O�����
�T�>��J�K�	
�	���v�&� �)�,�L�E�Zp
�j1�(//�b�,#�)�I�

�C�!%�FM�)�0�d?�� �
�/�
/�
2�
�� �	�K�(�	�K�(�	��"�	�.�/��Lr:rm)/�__doc__r8rgr"r%r-�distutils._logr�corerr�rr�	file_utilr�utilr	r
rr�errorsr
rr�rrSr�siterrr��WINDOWS_SCHEMEr/rB�schemesr^r*r2r;rGrCr@r?r>rDrTrmr9r:r)�<module>r3sf��/��	�������'�"�8�8��A�%�����
�*�)�+�����W�+�3����7�?�F�����)�)�/���
�*�)�/�#���3 ��F����O��
"�O�I�� ��3�#��
%�O�L�!����r�z�z�"�C��
�
� �<�
T��!��B�
6�w	�g�w	r:

Zerion Mini Shell 1.0