HOME


Mini Shell 1.0
DIR: /snap/certbot/current/usr/lib/python3.12/ensurepip/__pycache__/
Upload File :
Current File : //snap/certbot/current/usr/lib/python3.12/ensurepip/__pycache__/__init__.cpython-312.pyc
�

�(�g�)���ddlZddlZddlZddlZddlZddlZddlZddlmZd�Z	ddgZ
dZdZded	fgZ
ejd
d�Zej d�ad
�Zd�Zdadd�Zd�Zd�Zddddddd�d�Zddddddd�d�Zdd�d�Zdd�Zy)�N)�	resourcesc���ttd�rytjttdtj�k7ryt	d�tj
d�y)N�real_prefix�base_prefixa�ensurepip is disabled in Debian/Ubuntu for the system python.

Python modules for the system python are usually handled by dpkg and apt-get.

    apt install python3-<module name>

Install the python3-pip package to use pip itself.  Using pip together
with the system python might have unexpected results for any system installed
module, so use it on your own risk, or make sure to only use it in virtual
environments.
�)�hasattr�sys�prefix�getattr�print�exit���x/build/snapcraft-certbot-2c33630aaf29c47357e5a1683f659d3d/parts/certbot/install/usr/lib/python3.12/ensurepip/__init__.py�+_ensurepip_is_disabled_in_debian_for_systemr
sK���s�M�"���z�z�W�S�-����<�<��

����H�H�Q�Kr�version�	bootstrap)�pipz24.0r�py3�Package)r�
wheel_name�
wheel_path�
WHEEL_PKG_DIRc��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)Nrz.whl�-r)�os�listdir�OSError�sorted�endswith�_PACKAGE_NAMES�
startswith�removeprefix�	partition�path�join�_Package)r%�packages�	filenames�filename�namer
rrs        r�_find_packagesr,: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]!\}}}|�d|�d|�d�}t||d�||<�#tr)t	t��t�fd�tD��r�}|a|S)Nrz
-none-any.whlc3�&�K�|]}|�v���
y�w�Nr)�.0r+�dir_packagess  �r�	<genexpr>z _get_packages.<locals>.<genexpr>cs�����?��t�|�#�?�s�)�	_PACKAGES�	_PROJECTSr'�_WHEEL_PKG_DIRr,�allr!)r(r+r�py_tagrr1s     @r�
_get_packagesr8Ws���������H�!*�=���g�v��v�Q�w�i�q���
�>�
�!�'�:�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-crz-IT)�check)r	�
executable�flags�isolated�insert�
subprocess�run�
returncode)�args�additional_paths�code�cmds    r�_run_piprFjsz��
�
�"��#�$��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)r8rrrrrr�s���?�5�!�)�)�)rc���tjD�cgc]}|jd�s�|��}}|D]}tj|=�tjtjd<ycc}w)N�PIP_�PIP_CONFIG_FILE)r�environr"�devnull)�k�keys_to_removes  r�#_disable_pip_configuration_settingsrO�s[��"$���D�A�q�|�|�F�/C�a�D�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.
    rPN)�
_bootstraprPs      rrr�s���D�'��$�+�"�$rc��t�|r
|rtd��tjd|�t	�|rdt
jd<n|sdt
jd<tj�5}g}t�j�D]�\}}	|	jr8|	j}
tjd�dz|
z}|j�}nXt|	j d�5}
|
j#�}d	d	d	�t
j$j'|	j �}
t
j$j)||
�}t|d
�5}
|
j+�d	d	d	�|j-|���dddd
|g}|r|d|gz
}|r|dgz
}|r|dgz
}|r|dd|zzgz
}t/g|�t0�|�cd	d	d	�S#1swY��xYw#1swY�sxYw#1swYy	xYw)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.bootstraprT�ENSUREPIP_OPTIONS�install�	ensurepip�_bundled�rbN�wbz--no-cache-dirz
--no-indexz--find-links�--root�	--upgrade�--userr�v)r�
ValueErrorr	�auditrOrrK�tempfile�TemporaryDirectoryr8�itemsrr�files�
read_bytes�openr�readr%�basenamer&�write�appendrFr!)rQrRrSrTrUrV�tmpdirrCr+�packagerr�whl�fpr*rBs                rrXrX�s���0�1��k��I�J�J��I�I�#�T�*�'�)��*6��
�
�&�'�
�*3��
�
�&�'�	�	$�	$�	&�!D�&���*�_�2�2�4�	.�M�D�'��!�!�$�/�/�
�&�_�_�[�9�J�F��S�
� �+�+�-���'�,�,�d�3�$�r��'�'�)�C�$��W�W�-�-�g�.@�.@�A�
��w�w�|�|�F�J�7�H��h��%�
������
�
�
�#�#�H�-�!	.�&�+�\�>�6�R����X�t�$�$�D���[�M�!�D���X�J��D���S�3��?�*�+�+�D��0�$�0��0�2B�C�C!D�!D�$�$��

�
��#!D�!D�s?�9A;G2�4G�AG2�"G&�4AG2�G#�G2�&G/�+G2�2G;)rVc�&�	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-checkrrc)r�ImportErrorr�__version__rr	�stderrrOrF�reversedr!)rVr�available_versionrBs    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�countrVzDGive more output. Option is additive, and can be used up to 3 times.)r�default�destr�z-Ura�
store_trueFz8Upgrade pip and dependencies, even if already installed.)rr�r�rbzInstall 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.)rQrRrSrVrTrU)
�argparse�ArgumentParser�add_argument�formatr�
parse_argsrXrQrRrSrVrTrU)�argvr��parserrBs    r�_mainr�
s^���
�
$�
$�*?�
$�
@�F�
���������	�*�
H�	������k���
��������k���
G�	��������
-�	�������
L���
������1�	��������6�	�����T�"�D��
�Y�Y����
�Y�Y��.�.��?�?��$�$�
�rr/)�collectionsr�os.pathr?r	�	sysconfigrf�	importlibrr�__all__r!�_PIP_VERSIONr4�
namedtupler'�get_config_varr5r,r8r3rFrrOrrXr|r�rrr�<module>r�s����	���
�����:�k�
"������
�L�%� �
�	�"�;�!�!�)�"I�K��*��)�)�/�:���:� 
�	�6�4*�	/��E���E��$��U���E��CD�J$%�8�>:r