HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/lib/python3.9/ensurepip/__pycache__/__init__.cpython-39.pyc
a

kx�g2%�@s�ddlZddlZddlZddlZddlZddlZddlZddlmZddgZ	dd�Z
gd�Zddd	�Zd
d�Z
dd�Zdd
d
d
d
dd�dd�Zdd
d
d
d
dd�dd�Zdd�dd�Zddd�ZdS)�N)�	resources�version�	bootstrapcCs<ttd�rdStjttdtj�kr&dStd�t�d�dS)NZreal_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-get install python-<module name>

Install the python-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.9/ensurepip/__init__.py�+_ensurepip_is_disabled_in_debian_for_systems
r)Z
setuptools�pipZ
pkg_resourcescCs.d|pg�d|�d�}tjtjd|gdd�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-cT)Zcheck)�
subprocess�runr�
executable�
returncode)�args�additional_paths�coder
r
r�_run_pip2s��rcCs8t�d�}t|�dksJ|��tj�|d��d�dS)zA
    Returns a string specifying the bundled version of pip.
    z"/usr/share/python-wheels/pip-*.whlrr�-)�glob�len�os�path�basename�split)�wheel_namesr
r
rrAs
cCs2dd�tjD�}|D]}tj|=qtjtjd<dS)NcSsg|]}|�d�r|�qS)ZPIP_)�
startswith)�.0�kr
r
r�
<listcomp>M�z7_disable_pip_configuration_settings.<locals>.<listcomp>ZPIP_CONFIG_FILE)r�environ�devnull)Zkeys_to_remover#r
r
r�#_disable_pip_configuration_settingsIs
r(F��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.
    r)N)�
_bootstrapr)r
r
rrUs
�cCs,t�|r|rtd��t�d|�t�|r8dtjd<n|sFdtjd<dd�}t����}tj	�
tjdd	�}tj|d
d�dd
�t
�
d�D�}	||	|tj	�g}
|t||
�dddd|g}|r�|d|g7}|r�|dg7}|r�|dg7}|r�|dd|g7}t|t|
�Wd�S1�s0YdS)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-ZENSUREPIP_OPTIONSZinstallc
	Ss�|D]�}t�d�|��}t|�dkr0td|��t|�dksDJ|��tj�|d�}tj�d|�}t|d��}|�	�}Wd�n1s�0Ytj�||�}	t|	d��}|�
|�Wd�n1s�0Y|�|	�qdS)Nz!/usr/share/python-wheels/{}-*.whlrzmissing dependency wheel %srz/usr/share/python-wheels�rb�wb)r�formatr�RuntimeErrorrrr�join�open�read�write�append)
ZwheelsZdestdir�pathsZprojectr Z
wheel_namer�fp�whl�destr
r
r�copy_wheels�s�&(z_bootstrap.<locals>.copy_wheelsZsharez
python-wheelsT)�exist_okcSs"g|]}tj�|��d�d�qS)rr)rrrr)r"r<r
r
rr$�s�z_bootstrap.<locals>.<listcomp>z/usr/share/python-wheels/*.whlz--no-cache-dirz
--no-indexz--find-links�--root�	--upgrade�--userr�vN)r�
ValueErrorr�auditr(rr&�tempfileZTemporaryDirectoryrr5r	�makedirsr�	_PROJECTSr)r*r+r,r-r.r/r>ZtmpdirZvenv_wheel_dirZdependenciesrrr
r
rr0ds:

�

r0)r/cCs�zddl}Wnty YdS0drP|jtkrPd}t|�|jt�tjd�dSt�gd�}|rt|dd|g7}t	|t
t��S)	z~Helper to support a clean default uninstall process on Windows

    Note that calling this function may alter os.environ.
    rNFzOensurepip will only uninstall a matching version ({!r} installed, {!r} bundled))�file)Z	uninstallz-yz--disable-pip-version-checkrrC)r�ImportError�__version__Z_PIP_VERSIONrr3r�stderrr(r�reversedrH)r/r�msgrr
r
r�_uninstall_helper�srOcCs�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�countr/zDGive more output. Option is additive, and can be used up to 3 times.)rQ�defaultr=rRz-UrA�
store_trueFz8Upgrade pip and dependencies, even if already installed.)rQrTrRrBzInstall using the user scheme.r@z=Install everything relative to this alternate root directory.)rTrRz--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.)r*r+r,r/r-r.)
�argparse�ArgumentParser�add_argumentr3r�
parse_argsr0r*r+r,r/r-r.)�argvrV�parserrr
r
r�_main�sj
�������
�r\)N)N)rr�os.pathrZrunpyrFr�	importlibr�__all__rrHrrr(rr0rOr\r
r
r
r�<module>s.
��V