Your IP : 18.227.46.87


Current Path : /opt/alt/python35/lib64/python3.5/ensurepip/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/ensurepip/__pycache__/__init__.cpython-35.pyc



��Yf��@sVddlZddlZddlZddlZddlZddlZddlmZddgZdZ	dZ
dje
�Zyddl
Z
Wn$ek
r�dZ
dd	�ZYn
Xd
d	�Zde	fde
fgZdd
d�Zdd�Zdd�Zdddddddddddddd�Zdddd�Zddd�ZdS)�N)�rewheel�version�	bootstrapz28.8.0z7.1.0zpip {} requires SSL/TLScCstt��dS)N)�RuntimeError�_MISSING_SSL_MESSAGE�rr�7/opt/alt/python35/lib64/python3.5/ensurepip/__init__.py�_require_ssl_for_pipsr	cCsdS)Nrrrrrr	sZ
setuptools�pipcCsV|dk	r|tjt_ddl}|ddkrE|jd�|j|�dS)Nr�install�list�wheelz--pre)rrr
)�sys�pathr
�append�main)�args�additional_pathsr
rrr�_run_pip$s
rcCstS)zA
    Returns a string specifying the bundled version of pip.
    )�_PIP_VERSIONrrrrr0scCsEdd�tjD�}x|D]}tj|=qWtjtjd<dS)NcSs%g|]}|jd�r|�qS)ZPIP_)�
startswith)�.0�krrr�
<listcomp>:s	z7_disable_pip_configuration_settings.<locals>.<listcomp>ZPIP_CONFIG_FILE)�os�environ�devnull)Zkeys_to_removerrrr�#_disable_pip_configuration_settings6s
r�root�upgradeF�user�
altinstall�default_pip�	verbosityc
Cs+|r|rtd��t�t�|r<dtjd<n|sOdtjd<g}d}tjdd�tD��}t|�r�t	j
�}x�|D]:}	tj|	|j�}
|j
tjj|j|
��q�WnTxQtD]I\}}tjjtjjt�dd	j||��}
|j
|
�q�Wt	j
���}g}xF|D]>}
tj|
|�|j
tjj|tjj|
���qGW|r�|j�dd
d|g}|r�|d|g7}|r�|d
g7}|r�|dg7}|r|dd|g7}t|dd�tD�|�WdQRXdS)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.
    z.Cannot use altinstall and default_pip togetherr!ZENSUREPIP_OPTIONSrNcSsg|]}|d�qS)rr)r�prrrras	zbootstrap.<locals>.<listcomp>Z_bundledz{}-{}-py2.py3-none-any.whlz
--no-indexz--find-linksz--rootz	--upgradez--user�-�vcSsg|]}|d�qS)rr)rr$rrrr�s	)�
ValueErrorr	rrrrZfind_system_records�	_PROJECTS�all�tempfileZTemporaryDirectoryZrewheel_from_record�namerr�join�dirname�__file__�format�shutil�copy�basenameZcleanupr)rrr r!r"r#ZwhlsZrewheel_dirZdep_recordsZdrZnew_whlZprojectrZwhlZtmpdirrrrrrrBsN	

&	
,


c
Cs�yddl}Wntk
r(dSYnX|jtkrdd}t|j|jt�dtj�dSt�t	�dddg}|r�|dd	|g7}t
|d
d�tt�D��dS)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�s	z%_uninstall_helper.<locals>.<listcomp>)
r
�ImportError�__version__r�printr/r�stderrr	rr�reversedr()r#r
�msgrrrr�_uninstall_helper�s
	"r:c
Cs�tdkr,tdjt�dtj�dSddl}|jdd�}|jddddd	jt	��d
d�|jdd
ddddddd
d�|jddddddd
d�|jdddddd
d�|jdddd
d�|jdddddd
d�|jdddddd
d�|j
|�}td |jd!|j
d"|jd|jd#|jd$|j�dS)%NzIgnoring ensurepip failure: {}r3r�progzpython -m ensurepipz	--version�actionrzpip {}�helpz9Show the version of pip that is bundled with this Python.z-vz	--verbose�count�default�destr#zDGive more output. Option is additive, and can be used up to 3 times.z-Uz	--upgrade�
store_trueFz8Upgrade pip and dependencies, even if already installed.z--userzInstall using the user scheme.z--rootz=Install everything relative to this alternate root directory.z--altinstallzmMake an alternate install, installing only the X.Y versionedscripts (Default: pipX, pipX.Y, easy_install-X.Y)z
--default-pipzpMake a default pip install, installing the unqualified pip and easy_install in addition to the versioned scriptsrrr r!r")�sslr6r/rrr7�argparse�ArgumentParser�add_argumentr�
parse_argsrrrr r#r!r")�argvrC�parserrrrr�_main�sb
							rI)rZos.pathZpkgutilr0rr*Z	ensurepipr�__all__Z_SETUPTOOLS_VERSIONrr/rrBr4r	r(rrrrr:rIrrrr�<module>s4
	I

?>