Spade

Mini Shell

Directory:~$ /lib64/python3.6/ensurepip/__pycache__/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //lib64/python3.6/ensurepip/__pycache__/__init__.cpython-36.pyc

3

k��h��@s�ddlZddlZddlZddlZddlZddlZddlmZddgZdZ	dZ
de	fde
fgZdd	d
�Zdd�Z
dd
�Zddddddd�dd�Zddddddd�dd�Zdd�dd�Zddd�ZdS)�N)�rewheel�version�	bootstrapz40.6.2z9.0.3Z
setuptools�pipcCsd|dk	r|tjt_yddlm}Wn tk
rDddlm}YnX|ddkr\|jd�||�S)Nr)�main�install�list�wheelz--pre)rrr	)�sys�pathZ
pip._internalr�ImportErrorr�append)�args�additional_pathsr�r�
/usr/lib64/python3.6/__init__.py�_run_pips
rcCstS)zA
    Returns a string specifying the bundled version of pip.
   
)�_PIP_VERSIONrrrrr(scCs6dd�tjD�}x|D]}tj|=qWtjtjd<dS)NcSsg|]}|jd�r|�qS)ZPIP_)�
startswith)�.0�krrr�
<listcomp>2sz7_disable_pip_configuration_settings.<locals>.<listcomp>ZPIP_CONFIG_FILE)�os�environ�devnull)Zkeys_to_removerrrr�#_disable_pip_configuration_settings.s
rF)�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.
    )rrrrr r!N)�
_bootstrap)rrrrr r!rrrr:s
c
Cs�|r|rtd��t�|r&dtjd<n|s4dtjd<g}d}tjdd�tD��}t|�r�tj	�}xn|D](}	tj
|	|j�}
|jtj
j|j|
��qfWn<x:tD]2\}}tj
jtj
jt�dd	j||��}
|j|
�q�Wtj	���}g}x4|D],}
tj|
|�|jtj
j|tj
j|
���q�W|�r"|j�dd
d|g}|�r@|d|g7}|�rP|d
g7}|�r`|dg7}|�rx|dd|g7}t|dd�tD�|�SQRXdS)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
togetherrZENSUREPIP_OPTIONSrNcSsg|]}|d�qS)rr)r�prrrrgsz_bootstrap.<locals>.<listcomp>Z_bundledz{}-{}-py2.py3-none-any.whlz
--no-indexz--find-linksz--rootz	--upgradez--user�-�vcSsg|]}|d�qS)rr)rr#rrrr�s)�
ValueErrorrrrrZfind_system_records�	_PROJECTS�all�tempfileZTemporaryDirectoryZrewheel_from_record�namer
r�join�dirname�__file__�format�shutil�copy�basenameZcleanupr)rrrrr
r!ZwhlsZrewheel_dirZdep_recordsZdrZnew_whlZprojectrZwhlZtmpdirrrrrrr"IsL	




 

r")r!c
Cs�yddl}Wntk
r
dSX|jtkrLd}t|j|jt�tjd�dSt�dddg}|rr|dd	|g7}t	|d
d�t
t�D��S)z~Helper to support a clean default uninstall process on
Windows

    Note that calling this function may alter os.environ.
    rNzOensurepip will only uninstall a matching version ({!r} installed,
{!r}
bundled))�fileZ	uninstallz-yz--disable-pip-version-checkr$r%cSsg|]}|d�qS)rr)rr#rrrr�sz%_uninstall_helper.<locals>.<listcomp>)rr�__version__r�printr.r
�stderrrr�reversedr')r!r�msgrrrr�_uninstall_helper�s

r8cCs�ddl}|jdd�}|jdddjt��dd�|jd	d
dddd
d�|jdddddd�|jddddd�|jdddd�|jddddd�|jddddd�|j|�}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.)r:�default�destr;z-Uz	--upgrade�
store_trueFz8Upgrade pip and dependencies, even if already
installed.)r:r=r;z--userzInstall using the user scheme.z--rootz=Install
everything relative to this alternate root
directory.)r=r;z--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.)rrrr!rr
)
�argparse�ArgumentParser�add_argumentr.r�
parse_argsr"rrrr!rr
)�argvr@�parserrrrr�_main�sZ

rF)N)N)rZos.pathZpkgutilr/r
r)Z	ensurepipr�__all__Z_SETUPTOOLS_VERSIONrr'rrrrr"r8rFrrrr�<module>s,


H