U &Ì.ebã@sæddlZddlZddlZddlZddlZddlZddlZddlZddgZ dZ dZ iZ dd„Z e dƒZe d ƒZded fd ed fgZdd d „Zd d„Zdd„Zdddddddœdd„Zdddddddœdd„Zddœdd„Zddd„ZdS)éNÚversionÚ bootstrap)Ú setuptoolsÚpipz/usr/share/python38-wheels/cCs„tj td |¡¡}it|<dD]J}d ||¡}t |¡D].}|t|ƒt|ƒ …}tj |¡t||<q:q t t t|t j j d�ƒS)Nz{}-)z-py2.py3-none-any.whlz-py3-none-any.whlz{}*{})Úkey)ÚosÚpathÚjoinÚ _WHEEL_DIRÚformatÚ_wheelsÚglobÚlenÚbasenameÚstrÚmaxÚ distutilsrZ LooseVersion)ZpkgÚprefixÚsuffixÚpatternrZ version_str©rú*/usr/lib64/python3.8/ensurepip/__init__.pyÚ_get_most_recent_wheel_versions rrrZpy3cCsFd|pg›d|›d�}tjd|g}tjjr6| dd¡tj|dd�jS) 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-céz-IT)Zcheck)ÚsysÚ executableÚflagsÚisolatedÚinsertÚ subprocessÚrunÚ returncode)ÚargsÚadditional_pathsÚcodeÚcmdrrrÚ_run_pip'sýü  r&cCstS)zA Returns a string specifying the bundled version of pip. )Ú _PIP_VERSIONrrrrr;scCs2dd„tjDƒ}|D] }tj|=qtjtjd<dS)NcSsg|]}| d¡r|‘qS)ZPIP_)Ú startswith)Ú.0ÚkrrrÚ Es z7_disable_pip_configuration_settings..ZPIP_CONFIG_FILE)rÚenvironÚdevnull)Zkeys_to_remover*rrrÚ#_disable_pip_configuration_settingsAs 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/N)Ú _bootstrapr/rrrrMs þc CsP|r|rtdƒ‚t d|¡tƒ|r2dtjd<n|s@dtjd<t ¡��ü}g}tD]x\}} } t || } t tj   t | ¡dƒ�4} t tj   || ¡dƒ�} |  |  ¡¡W5QRXW5QRX| tj   || ¡¡qTddd d |g}|rì|d |g7}|rú|d g7}|�r |d g7}|�r"|dd|g7}t|dd„tDƒ|ƒW5QR£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 togetherzensurepip.bootstrapr3ZENSUREPIP_OPTIONSZinstallÚrbÚwbz--no-cache-dirz --no-indexz --find-linksú--rootú --upgradeú--userú-ÚvcSsg|] }|d‘qS©rr©r)Úprrrr+�sz_bootstrap..N)Ú ValueErrorrÚauditr.rr,ÚtempfileZTemporaryDirectoryÚ _PROJECTSr Úopenrr r ÚwriteÚreadÚappendr&)r0r1r2r3r4r5Ztmpdirr#ZprojectrZpy_tagZ wheel_nameZsfpÚfpr"rrrr6\s4      "   r6)r5cCsŽz ddl}Wntk r"YdSX|jtkrNd}t| |jt¡tjd�dStƒdddg}|rt|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‘qSr>rr?rrrr+«sz%_uninstall_helper..) rÚ ImportErrorÚ __version__r'Úprintr rÚstderrr.r&ÚreversedrD)r5rÚmsgr"rrrÚ_uninstall_helper’s   rQcCsÈddl}|jdd�}|jddd tƒ¡dd�|jd d d dd d d�|jdddddd�|jddddd�|jdddd�|jddddd�|jddddd�| |¡}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Úcountr5zDGive more output. Option is additive, and can be used up to 3 times.)rSÚdefaultÚdestrTz-Ur:Ú store_trueFz8Upgrade pip and dependencies, even if already installed.)rSrVrTr;zInstall using the user scheme.r9z=Install everything relative to this alternate root directory.)rVrTz --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.)r0r1r2r5r3r4) ÚargparseÚArgumentParserÚ add_argumentr rÚ parse_argsr6r0r1r2r5r3r4)ÚargvrYÚparserr"rrrÚ_main®sn  üûüüýüü úr_)N)N)Zdistutils.versionrr rZos.pathrZrunpyrCrÚ__all__Z_PACKAGE_NAMESr r rZ_SETUPTOOLS_VERSIONr'rDr&rr.rr6rQr_rrrrÚs@ þ  þ þ 6