a `@sddlZddlZddlZddlZddlZddlZddlmZddlm Z ddgZ dZ dZ d e d fd e d fgZ dd d ZddZddZdddddddddZdddddddddZddddZdddZdS)N) resources)_bundledversion bootstrapz56.0.0z21.1.3Z setuptoolsZpy3pipcCs.d|pgd|d}tjtjd|gddjS)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) subprocessrunsys executable returncode)argsadditional_pathscoder5/usr/local/src/Python-3.9.6/Lib/ensurepip/__init__.py_run_pips rcCstS)zA Returns a string specifying the bundled version of pip. ) _PIP_VERSIONrrrrr)scCs2ddtjD}|D] }tj|=qtjtjd<dS)NcSsg|]}|dr|qS)ZPIP_) startswith).0krrr 3z7_disable_pip_configuration_settings..ZPIP_CONFIG_FILE)osenvirondevnull)Zkeys_to_removerrrr#_disable_pip_configuration_settings/s rFrootupgradeuser altinstall default_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. rN) _bootstraprrrrr;s c Cs\|r|rtdtd|t|r2dtjd<n|s@dtjd<t}g}tD]v\}} } d || | } t t | } t tj|| d} | | Wdn1s0Y|tj|| qTdd d d |g}|r|d |g7}|r|d g7}|r|dg7}|r |dd|g7}t|ddtD|WdS1sN0YdS)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_OPTIONSZinstallz{}-{}-{}-none-any.whlwbNz--no-cache-dirz --no-indexz --find-links--root --upgrade--user-vcSsg|] }|dqSrrrprrrrrz_bootstrap..) ValueErrorr auditrrrtempfileZTemporaryDirectory _PROJECTSformatrZ read_binaryropenpathjoinwriteappendr)rrr r!r"r#ZtmpdirrZprojectrZpy_tagZ wheel_nameZwhlfpr rrrr$Js:     (   r$)r#cCsz ddl}Wnty YdS0|jtkrLd}t||jttjddStgd}|rp|dd|g7}t |dd t t 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))file)Z uninstallz-yz--disable-pip-version-checkr)r*cSsg|] }|dqSr+rr,rrrrrz%_uninstall_helper..) r ImportError __version__rprintr2r stderrrrreversedr1)r#rmsgr rrr_uninstall_helpers   r@cCsddl}|jdd}|jdddtdd|jd d d dd d d|jdddddd|jddddd|jdddd|jddddd|jddddd||}t|j|j|j |j |j |j dS)Nrzpython -m ensurepip)Zprogz --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.)rAdefaultZdestrBz-Ur'Z store_trueFz8Upgrade pip and dependencies, even if already installed.)rArDrBr(zInstall using the user scheme.r&z=Install everything relative to this alternate root directory.)rDrBz --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.)rrr r#r!r") argparseZArgumentParserZ add_argumentr2rZ parse_argsr$rrr r#r!r")argvrEZparserr rrr_mainsj   rG)N)N)rZos.pathr Zrunpyr0r importlibrr__all__Z_SETUPTOOLS_VERSIONrr1rrrrr$r@rGrrrrs4      9