Viewing File: /usr/lib64/python3.6/ensurepip/__pycache__/__init__.cpython-36.opt-1.pyc

3

sj@sddlZddlZddlZddlZddlZddlZddlmZddgZdZ	dZ
de	fde
fgZdd	d
ZddZ
dd
ZdddddddddZdddddddddZddddZdddZdS)N)rewheelversion	bootstrapz40.6.2z9.0.3Z
setuptoolspipcCsd|dk	r|tjt_yddlm}Wn tk
rDddlm}YnX|ddkr\|jd||S)Nr)maininstalllistwheelz--pre)rrr	)syspathZ
pip._internalrImportErrorrappend)argsadditional_pathsrr /usr/lib64/python3.6/__init__.py_run_pips
rcCstS)zA
    Returns a string specifying the bundled version of pip.
    )_PIP_VERSIONrrrrr(scCs6ddtjD}x|D]}tj|=qWtjtjd<dS)NcSsg|]}|jdr|qS)ZPIP_)
startswith).0krrr
<listcomp>2sz7_disable_pip_configuration_settings.<locals>.<listcomp>ZPIP_CONFIG_FILE)osenvirondevnull)Zkeys_to_removerrrr#_disable_pip_configuration_settings.s
rF)rootupgradeuser
altinstalldefault_pip	verbositycCst||||||ddS)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|rtdt|r&dtjd<n|s4dtjd<g}d}tjddtD}t|rtj	}xn|D](}	tj
|	|j}
|jtj
j|j|
qfWn<x:tD]2\}}tj
jtj
jtdd	j||}
|j|
qWtj	}g}x4|D],}
tj|
||jtj
j|tj
j|
qW|r"|jdd
d|g}|r@|d|g7}|rP|d
g7}|r`|dg7}|rx|dd|g7}t|ddtD|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|]}|dqS)rr)rprrrrgsz_bootstrap.<locals>.<listcomp>Z_bundledz{}-{}-py2.py3-none-any.whlz
--no-indexz--find-linksz--rootz	--upgradez--user-vcSsg|]}|dqS)rr)rr#rrrrs)
ValueErrorrrrrZfind_system_records	_PROJECTSalltempfileZTemporaryDirectoryZrewheel_from_recordnamer
rjoindirname__file__formatshutilcopybasenameZcleanupr)rrrrr r!ZwhlsZrewheel_dirZdep_recordsZdrZnew_whlZprojectrZwhlZtmpdirrrrrrr"IsL	




 

r")r!c
Csyddl}Wntk
r dSX|jtkrLd}t|j|jttjddStdddg}|rr|dd	|g7}t	|d
dt
tDS)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|]}|dqS)rr)rr#rrrrsz%_uninstall_helper.<locals>.<listcomp>)rr__version__rprintr.r
stderrrrreversedr')r!rmsgrrrr_uninstall_helpers

r8cCsddl}|jdd}|jdddjtdd|jd	d
dddd
d|jdddddd|jddddd|jdddd|jddddd|jddddd|j|}t|j|j|j	|j
|j|jdS)Nrzpython -m ensurepip)progz	--versionrzpip {}z9Show the version of pip that is bundled with this Python.)actionrhelpz-vz	--verbosecountr!zDGive more output. Option is additive, and can be used up to 3 times.)r:defaultdestr;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 )
argparseArgumentParseradd_argumentr.r
parse_argsr"rrrr!rr )argvr@parserrrrr_mainsZ

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


H
Back to Directory File Manager