Your IP : 18.191.189.119


Current Path : /opt/alt/python312/lib64/python3.12/ensurepip/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/ensurepip/__pycache__/__init__.cpython-312.opt-1.pyc

�

�Q�f2.��&�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
dZejdd�Z
daiZGd�de�Zd	�Zed
�Zd
edfgZd�Zd
�Zdadd�Zd�Zd�Zddddddd�d�Zddddddd�d�Zdd�d�Zdd�Zy)�N)�	resources)�pip�Package)�version�
wheel_name�
wheel_pathz'/opt/alt/python312/share/python-wheels/c��eZdZejdej
�Zdd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zed
��Zy)�LooseVersionz(\d+ | [a-z]+ | \.)Nc�,�|r|j|�yy�N)�parse)�self�vstrings  �9/opt/alt/python312/lib64/python3.12/ensurepip/__init__.py�__init__zLooseVersion.__init__ s����J�J�w���c�J�|j|�}|turtS|dk(S�Nr��_cmp�NotImplemented�r�other�cs   r�__eq__zLooseVersion.__eq__$�'���I�I�e������!�!��A�v�
rc�J�|j|�}|turtS|dkSrrrs   r�__lt__zLooseVersion.__lt__*�'���I�I�e������!�!��1�u�rc�J�|j|�}|turtS|dkSrrrs   r�__le__zLooseVersion.__le__0rrc�J�|j|�}|turtS|dkDSrrrs   r�__gt__zLooseVersion.__gt__6rrc�J�|j|�}|turtS|dk\Srrrs   r�__ge__zLooseVersion.__ge__<rrc���||_|jj|�D�cgc]
}|s�|dk7s�|��}}t|�D]\}}	t	|�||<�||_ycc}w#t
$rY�/wxYw)N�.)r�component_re�split�	enumerate�int�
ValueErrorr)rr�x�
components�i�objs      rr
zLooseVersion.parseBs������!%�!2�!2�!8�!8��!A�T�!A�A�Q�1�PS�8�a�!A�
�T��
�+�F�A�s�
� #�C��
�1�
�,�"����U���
��
�s!�A#�A#�A#�A(�(	A4�3A4c��|jSr)r�rs r�__str__zLooseVersion.__str__Ps���|�|�rc��dt|�zS)NzLooseVersion ('%s'))�strr2s r�__repr__zLooseVersion.__repr__Ss��$�s�4�y�0�0rc���|j|�}|turtS|j|jk(ry|j|jkry|j|jkDrytS)Nr����)�_coercerr)rrs  rrzLooseVersion._cmpVs]�����U�#���N�"�!�!��<�<�5�=�=�(���<�<�%�-�-�'���<�<�%�-�-�'���rc�Z�t||�r|St|t�r||�StSr)�
isinstancer5r)�clsrs  rr:zLooseVersion._coercecs+���e�S�!��L�
��s�
#��u�:���rr)�__name__�
__module__�__qualname__�re�compile�VERBOSEr(rrrr!r#r%r
r3r6r�classmethodr:�rrr
r
s_���2�:�:�4�b�j�j�A�L� ������"��1�����rr
c��tjjtdj	|��}it
|<dD]o}dj	||�}t
j|�D]C}|t|�t|�}tjj|�t
||<�E�qttt
|t���S)Nz{}-)z-py2.py3-none-any.whlz-py3-none-any.whlz{}*{})�key)�os�path�join�_WHEEL_PKG_DIR�format�_wheels�glob�len�basenamer5�maxr
)�pkg�prefix�suffix�patternrI�version_strs      r�_get_most_recent_wheel_versionrWks���
�W�W�\�\�.�%�,�,�s�*;�
<�F��G�C�L�>���.�.���0���I�I�g�&�D��s�6�{�C��K�<�8�K�(*���(8�(8��(>�G�C�L��%�'�?�
�s�7�3�<�\�2�3�3rr�py3c��i}	tj|�}t|�}|D]�}|j	d�s�t
D]}|dz}|j
|�s�n�9|j|�jd�d}tjj||�}t|d|�||<��|S#t$rd}Y��wxYw)NrEz.whl�-r)rH�listdir�OSError�sorted�endswith�_PACKAGE_NAMES�
startswith�removeprefix�	partitionrIrJ�_Package)rI�packages�	filenames�filename�namerSrrs        r�_find_packagesrh{s����H���J�J�t�$�	��y�!�I���� � ��(��"�D��C�Z�F��"�"�6�*��#�

��'�'��/�9�9�#�>�q�A���W�W�\�\�$��1�
�!�'�4��<������O��-���	��s�B6�6C�Cc����t�tSi}tD]"\}}}t||}t||d�||<�$tr)tt��t
�fd�tD��r�}|a|S)Nc3�&�K�|]}|�v���
y�wrrE)�.0rg�dir_packagess  �r�	<genexpr>z _get_packages.<locals>.<genexpr>�s�����?���t�|�#��s�)�	_PACKAGES�	_PROJECTSrMrcrKrh�allr_)rdrgr�py_tagrrls     @r�
_get_packagesrr�sq��������H�!*���g�v��d�m�G�,�
�!�'�:�t�<����"+��%�n�5���?��?�?�#�H��I��Orc���d|xsg�d|�d�}tjddd|g}tjjr|j	dd�tj|d	�
�jS)Nz$
import runpy
import sys
sys.path = z + sys.path
sys.argv[1:] = z>
runpy.run_module("pip", run_name="__main__", alter_sys=True)
z-Wzignore::DeprecationWarningz-cr9z-IT)�check)�sys�
executable�flags�isolated�insert�
subprocess�run�
returncode)�args�additional_paths�code�cmds    r�_run_pipr��sz��
�
�"��#�$��v��	�D�	����$����C��y�y����
�
�1�d���>�>�#�T�*�5�5�5rc�0�t�djS)zA
    Returns a string specifying the bundled version of pip.
    r)rrrrErrrr�s���?�5�!�)�)�)rc���tjD�cgc]}|jd�s�|��}}|D]}tj|=�tjtjd<ycc}w)N�PIP_�PIP_CONFIG_FILE)rH�environr`�devnull)�k�keys_to_removes  r�#_disable_pip_configuration_settingsr��sW��"$���D��A�q�|�|�F�/C�a��N�D�
���J�J�q�M��%'�J�J�B�J�J� �!��Es
�A*�A*F��root�upgrade�user�
altinstall�default_pip�	verbosityc�&�t||||||��y)z�
    Bootstrap pip into the current Python installation (or the given root
    directory).

    Note that calling this function will alter both sys.path and os.environ.
    r�N)�
_bootstrapr�s      r�	bootstrapr��s���D�'��$�+�"�$rc	�4�|r
|rtd��tjd|�t�|rdtj
d<n|sdtj
d<t
j�5}g}tD]�\}}	}
t||	}tjjt|�}tjj||�}
t|d�5}t|
d�5}|j|j��ddd�ddd�|j!|
���dd	d
d|g}|r|d|gz
}|r|d
gz
}|r|dgz
}|r|dd|zzgz
}t#g|�t$�|�cddd�S#1swY�oxYw#1swY�sxYw#1swYyxYw)z�
    Bootstrap pip into the current Python installation (or the given root
    directory). Returns pip command status code.

    Note that calling this function will alter both sys.path and os.environ.
    z.Cannot use altinstall and default_pip togetherzensurepip.bootstrapr��ENSUREPIP_OPTIONS�install�rb�wbNz--no-cache-dirz
--no-indexz--find-links�--root�	--upgrade�--userrZ�v)r,ru�auditr�rHr��tempfile�TemporaryDirectoryrorMrIrJrK�open�write�read�appendr�r_)r�r�r�r�r�r��tmpdirr~�projectrrqr�filename_wheel�filename_tmp�sfp�fpr}s                 rr�r��s����k��I�J�J��I�I�#�T�*�'�)��*6��
�
�&�'�
�*3��
�
�&�'�	�	$�	$�	&�&���(1�$�G�W�f� ��)�'�2�J��W�W�\�\�.�*�E�N��7�7�<�<��
�;�L��n�d�+�s��,��-���H�H�S�X�X�Z�(�.�,�
�#�#�L�1�)2��+�\�>�6�R����X�t�$�$�D���[�M�!�D���X�J��D���S�3��?�*�+�+�D��0�$�0��0�2B�C�3D�D�.�-��,�+��
'�	&�s>�/A,F�
F�( E6	�F�AF�6E?
�;F�F�F�F)r�c�&�	ddl}t�}|j|k7r-t	d|j�d|�d�t
j��yt�gd�}|r|dd	|zzgz
}tg|�tt���S#t$rYywxYw)
z~Helper to support a clean default uninstall process on Windows

    Note that calling this function may alter os.environ.
    rNz2ensurepip will only uninstall a matching version (z installed, z available))�file)�	uninstallz-yz--disable-pip-version-checkrZr�)r�ImportErrorr�__version__�printru�stderrr�r��reversedr_)r�r�available_versionr}s    r�_uninstall_helperr�s����� �	��
���+�+�
���/�/�$�L�"�%�[�2��:�:�	�	�'�)�>�D����s�Y��&�'�'���6�d�6�X�n�5�6�7�7��)����s�B�	B�Bc�B�ddl}|jd��}|jdddjt	��d��|jd	d
dddd
��|jddddd��|jdddd��|jddd��|jdddd��|jdddd��|j|�}t
|j|j|j|j|j|j��S)Nrzpython -m ensurepip)�progz	--versionrzpip {}z9Show the version of pip that is bundled with this Python.)�actionr�helpz-vz	--verbose�countr�zDGive more output. Option is additive, and can be used up to 3 times.)r��default�destr�z-Ur��
store_trueFz8Upgrade pip and dependencies, even if already installed.)r�r�r�r�zInstall using the user scheme.r�z=Install everything relative to this alternate root directory.)r�r�z--altinstallz]Make an alternate install, installing only the X.Y versioned scripts (Default: pipX, pipX.Y).z
--default-pipz`Make a default pip install, installing the unqualified pip in addition to the versioned scripts.)r�r�r�r�r�r�)
�argparse�ArgumentParser�add_argumentrLr�
parse_argsr�r�r�r�r�r�r�)�argvr��parserr}s    r�_mainr�>s^���
�
$�
$�*?�
$�
@�F�
���������	�*�
H�	������k���
��������k���
G�	��������
-�	�������
L���
������1�	��������6�	�����T�"�D��
�Y�Y����
�Y�Y��.�.��?�?��$�$�
�rr)rArN�collectionsrH�os.pathrzru�	sysconfigr��	importlibrr_�
namedtuplercrKrM�objectr
rW�_PIP_VERSIONrorhrrrnr�rr�r�r�r�r�rErr�<module>r�s���	���	���
������"�;�!�!�)�"I�K��;��
��M�6�M�^4�.�e�4��
�L�%� �
�	�
�:� 
�	�6�4*�	/��E���E��$��U���E��6D�p$%�8�>:r

?>