HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3.10/ensurepip/__pycache__/__init__.cpython-310.pyc
o

�w[ep*�@sddlZddlZddlZddlZddlZddlZddlZddlmZdd�Z	ddgZ
dZdZd	Z
d
edfde
dfgZe�d
d�Ze�d�add�Zdd�Zdad#dd�Zdd�Zdd�Zddddddd�dd�Zddddddd�dd�Zdd�dd �Zd#d!d"�ZdS)$�N)�	resourcescCs<ttd�rdStjttdtj�krdStd�t�d�dS)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�rr�)/usr/lib/python3.10/ensurepip/__init__.py�+_ensurepip_is_disabled_in_debian_for_systems
r�version�	bootstrap)�
setuptools�pipz65.5.0z23.0.1r�py3r�Package)r�
wheel_name�
wheel_path�
WHEEL_PKG_DIRcCs�i}zt�|�}Wntyd}Ynwt|�}|D]2}|�d�s#qtD]
}|d}|�|�r2nq%q|�|��d�d}tj	�
||�}t|d|�||<q|S)Nrz.whl�-r)�os�listdir�OSError�sorted�endswith�_PACKAGE_NAMES�
startswith�removeprefix�	partition�path�join�_Package)r"�packages�	filenames�filename�namerrrrrr
�_find_packages=s(�

�r)csttdurtSi}tD]\}}}|�d|�d|�d�}t||d�||<q
tr6tt��t�fdd�tD��r6�}|a|S)Nrz
-none-any.whlc3s�|]}|�vVqdS�Nr)�.0r(��dir_packagesrr
�	<genexpr>fs�z _get_packages.<locals>.<genexpr>)�	_PACKAGES�	_PROJECTSr$�_WHEEL_PKG_DIRr)�allr)r%r(r�py_tagrrr,r
�
_get_packagesZsr4cCsJd|pg�d|�d�}tjddd|g}tjjr|�dd�tj|d	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�cmdrrr
�_run_pipms��	�rAcCst�djS)zA
    Returns a string specifying the bundled version of pip.
    r)r4rrrrr
r�scCs2dd�tjD�}|D]}tj|=q
tjtjd<dS)NcSsg|]	}|�d�r|�qS)�PIP_)r)r+�krrr
�
<listcomp>�sz7_disable_pip_configuration_settings.<locals>.<listcomp>�PIP_CONFIG_FILE)r�environ�devnull)�keys_to_removerCrrr
�#_disable_pip_configuration_settings�s
rIF��root�upgrade�user�
altinstall�default_pip�	verbositycCst||||||d�dS)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.
    rJN)�
_bootstraprJrrr
r�s

�c
Cs�t�|r|rtd��t�d|�t�|rdtjd<n|s#dtjd<t����}g}t	��
�D]^\}}	|	jrFddlm
}
|	j}t�|
|�}n!t|	jd��}
|
��}Wd	�n1s[wYtj�|	j�}tj�||�}t|d
��
}
|
�|�Wd	�n1s�wY|�|�q/dddd
|g}|r�|d|g7}|r�|dg7}|r�|dg7}|r�|dd|g7}tg|�t�|�Wd	�S1s�wYd	S)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.bootstraprN�ENSUREPIP_OPTIONS�installr)�_bundled�rbN�wbz--no-cache-dirz
--no-indexz--find-links�--root�	--upgrade�--userr�v)r�
ValueErrorr�auditrIrrF�tempfile�TemporaryDirectoryr4�itemsr�	ensurepiprTr�read_binary�openr�readr"�basenamer#�write�appendrAr)rKrLrMrNrOrP�tmpdirr>r(�packagerTr�whl�fpr'r=rrr
rQ�sH


��

$�rQ)rPcCs�zddl}Wn
tyYdSwt�}|j|kr*td|j�d|�d�tjd�dSt�gd�}|r<|dd	|g7}tg|�t	t
���S)
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-checkrrZ)r�ImportErrorr�__version__r
r�stderrrIrA�reversedr)rPr�available_versionr=rrr
�_uninstall_helper�s(�
���rrcCs�ddl}|jdd�}|jddd�t��dd�|jd	d
dddd
d�|jdddddd�|jddddd�|jdddd�|jddddd�|jddddd�|�|�}t|j|j|j	|j
|j|jd�S)Nrzpython -m ensurepip)�progz	--versionrzpip {}z9Show the version of pip that is bundled with this Python.)�actionr�helpz-vz	--verbose�countrPzDGive more output. Option is additive, and can be used up to 3 times.)rt�default�destruz-UrX�
store_trueFz8Upgrade pip and dependencies, even if already installed.)rtrwrurYzInstall using the user scheme.rWz=Install everything relative to this alternate root directory.)rwruz--altinstallzoMake an alternate install, installing only the X.Y versioned scripts (Default: pipX, pipX.Y, easy_install-X.Y).z
--default-pipzqMake a default pip install, installing the unqualified pip and easy_install in addition to the versioned scripts.)rKrLrMrPrNrO)
�argparse�ArgumentParser�add_argument�formatr�
parse_argsrQrKrLrMrPrNrO)�argvrz�parserr=rrr
�_main
sj
�������
�r�r*)�collectionsr�os.pathr:r�	sysconfigr]�	importlibrr�__all__r�_SETUPTOOLS_VERSION�_PIP_VERSIONr0�
namedtupler$�get_config_varr1r)r4r/rArrIrrQrrr�rrrr
�<module>sH��

��E