Your IP : 18.217.237.68


Current Path : /lib64/python3.6/ensurepip/__pycache__/
Upload File :
Current File : //lib64/python3.6/ensurepip/__pycache__/__init__.cpython-36.opt-1.pyc

3

�QgP�@s�ddlZddlZddlZddlZddlZddlZddgZdjej	d�Z
dd�Zed�Zed�Z
defde
fgZdd	d
�Zdd�Zdd
�Zddddddd�dd�Zddddddd�dd�Zdd�dd�Zddd�ZdS)�N�version�	bootstrapz/usr/share/python{}-wheels/csRtjjtdj|���d�dj���}��fdd�tj|�D�}tt|tj	j
d��S)Nz{}-z-py2.py3-none-any.whlz{}*{}c3s$|]}|t��t���VqdS)N)�len)�.0�p)�prefix�suffix��*/usr/lib64/python3.6/ensurepip/__init__.py�	<genexpr>sz1_get_most_recent_wheel_version.<locals>.<genexpr>)�key)�os�path�join�
_WHEEL_DIR�format�glob�str�max�	distutilsrZLooseVersion)Zpkg�patternZversionsr	)rrr
�_get_most_recent_wheel_version
s
rZ
setuptools�pipcCsd|dk	r|tjt_yddlm}Wn tk
rDddlm}YnX|ddkr\|jd�||�S)Nr)�main�install�list�wheelz--pre)rrr)�sysrZ
pip._internalr�ImportErrorr�append)�args�additional_pathsrr	r	r
�_run_pip s
r"cCstS)zA
    Returns a string specifying the bundled version of pip.
    )�_PIP_VERSIONr	r	r	r
r0scCs6dd�tjD�}x|D]}tj|=qWtjtjd<dS)NcSsg|]}|jd�r|�qS)ZPIP_)�
startswith)r�kr	r	r
�
<listcomp>:sz7_disable_pip_configuration_settings.<locals>.<listcomp>ZPIP_CONFIG_FILE)r
�environ�devnull)Zkeys_to_remover%r	r	r
�#_disable_pip_configuration_settings6s
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*r+r,r-r.r/N)�
_bootstrap)r*r+r,r-r.r/r	r	r
rBs
cCs4|r|rtd��t�|r&dtjd<n|s4dtjd<tj���}g}x~tD]v\}}	dj||	�}
ttj	j
t|
�d��4}ttj	j
||
�d��}|j|j
��WdQRXWdQRX|jtj	j
||
��qHWdd	d
|g}
|r�|
d|g7}
|r�|
dg7}
|r�|
d
g7}
|�r|
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 togetherr-ZENSUREPIP_OPTIONSrz{}-{}-py2.py3-none-any.whl�rb�wbNz
--no-indexz--find-linksz--rootz	--upgradez--user�-�vcSsg|]}|d�qS)rr	)rrr	r	r
r&�sz_bootstrap.<locals>.<listcomp>)�
ValueErrorr)r
r'�tempfileZTemporaryDirectory�	_PROJECTSr�openrrr�write�readrr")r*r+r,r-r.r/Ztmpdirr!ZprojectrZ
wheel_nameZsfp�fpr r	r	r
r0Qs2	

"

r0)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-checkr3r4cSsg|]}|d�qS)rr	)rrr	r	r
r&�sz%_uninstall_helper.<locals>.<listcomp>)rr�__version__r#�printrr�stderrr)r"�reversedr7)r/r�msgr r	r	r
�_uninstall_helper�s

rBcCs�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.)rD�default�destrEz-Uz	--upgrade�
store_trueFz8Upgrade pip and dependencies, even if already installed.)rDrGrEz--userzInstall using the user scheme.z--rootz=Install everything relative to this alternate root directory.)rGrEz--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_argumentrr�
parse_argsr0r*r+r,r/r-r.)�argvrJ�parserr r	r	r
�_main�sZ

rP)N)N)Zdistutils.versionrrr
Zos.pathrr6�__all__r�version_inforrZ_SETUPTOOLS_VERSIONr#r7r"rr)rr0rBrPr	r	r	r
�<module>s.


2

?>