3 ¦ fŸã@sÂddlZddlZddlZddlZddlZddlZddlmZddgZdZ dZ de fde fgZ dd d „Z d d„Z d d „Zdddddddœdd„Zdddddddœdd„Zddœdd„Zddd„ZdS)éN)ÚrewheelÚversionÚ bootstrapz40.6.2z9.0.1Z setuptoolsÚpipcCs>|dk r|tjt_ddl}|ddkr2|jdƒ|jj|ƒS)NrÚinstallÚlistÚwheelz--pre)rrr)ÚsysÚpathZ pip._internalÚappendZ _internalÚmain)ÚargsÚadditional_pathsr©rú7/opt/alt/python36/lib64/python3.6/ensurepip/__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ú -sz7_disable_pip_configuration_settings..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. )rrrrrr N)Ú _bootstrap)rrrrrr rrrr5s 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.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)rrrrrr ZwhlsZ rewheel_dirZ dep_recordsZdrZnew_whlZprojectrZwhlZtmpdirrr rrrr!DsL             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..) rÚ ImportErrorÚ __version__rÚprintr-r ÚstderrrrÚreversedr&)r rÚmsgr rrrÚ_uninstall_helperŽs   r8cCsÈddl}|jdd�}|jdddjtƒƒdd�|jd d d dd 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@Úparserr rrrÚ_mainªsZ   rF)N)N)rZos.pathZpkgutilr.r r(Z ensurepiprÚ__all__Z_SETUPTOOLS_VERSIONrr&rrrrr!r8rFrrrrÚs,     H