B  f��@s�ddlZddlZddlZddlZddlZddlZddlZddgZdZ dZ iZ dd�Z e d�Z e d �Zde d fd ed fgZdd d �Zd d�Zdd�Zddddddd�dd�Zddddddd�dd�Zdd�dd�Zddd�ZdS)�N�version� bootstrap)� setuptools�pipz&/opt/alt/python37/share/python-wheels/cCs�tj�td�|��}it|<xVdD]N}d�||�}xWq"Wt 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�7/opt/alt/python37/lib64/python3.7/ensurepip/__init__.py�_get_most_recent_wheel_versions  rrrZpy3c Cs�|dk r|tjt_tjdd�}|tjdd�<z>ytjdddd�Wn$tk rj}z|jSd}~XYnXWd|tjdd�<Xtd��dS)N�r�__main__T)Zrun_nameZ alter_sysz*pip did not exit, this should never happen)�sysr�argv�runpyZ run_module� SystemExit�code� SystemError)�args�additional_pathsZ backup_argv�excrrr�_run_pip$s r$cCstS)N)� _PIP_VERSIONrrrrr7scCs6dd�tjD�}x|D] }tj|=qWtjtjd<dS)NcSsg|]}|�d�r|�qS)ZPIP_)� startswith)�.0�krrr� Asz7_disable_pip_configuration_settings..ZPIP_CONFIG_FILE)r�environ�devnull)Zkeys_to_remover(rrr�#_disable_pip_configuration_settings=s  r,F)�root�upgrade�user� altinstall� default_pip� verbositycCst||||||d�dS)N)r-r.r/r0r1r2)� _bootstrap)r-r.r/r0r1r2rrrrIs c Cs8|r|rtd��t�|r&dtjd<n|s4dtjd<t����}g}x�tD]x\}} } t|| } ttj � t | �d��4} ttj � || �d��} | � | � ��WdQRXWdQRX|�tj � || ��qHWdddd |g}|r�|d |g7}|r�|d g7}|r�|d g7}|�r|d d|g7}t|dd�tD�|�SQRXdS)Nz.Cannot use altinstall and default_pip togetherr0ZENSUREPIP_OPTIONS�install�rb�wbz--no-cache-dirz --no-indexz --find-linksz--rootz --upgradez--user�-�vcSsg|] }|d�qS)rr)r'�prrrr)�sz_bootstrap..)� ValueErrorr,rr*�tempfileZTemporaryDirectory� _PROJECTSr �openrr r �write�read�appendr$)r-r.r/r0r1r2Ztmpdirr"ZprojectrZpy_tagZ wheel_nameZsfp�fpr!rrrr3Xs2     "   r3)r2cCs�y ddl}Wntk r dSX|jtkrLd}t|�|jt�tjd�dSt�dddg}|rr|dd|g7}t |d d �t t �D��S) NrzOensurepip will only uninstall a matching version ({!r} installed, {!r} bundled))�fileZ uninstallz-yz--disable-pip-version-checkr7r8cSsg|] }|d�qS)rr)r'r9rrrr)�sz%_uninstall_helper..) r� ImportError� __version__r%�printr r�stderrr,r$�reversedr<)r2r�msgr!rrr�_uninstall_helper�s   rIcCs�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�countr2zDGive more output. Option is additive, and can be used up to 3 times.)rK�default�destrLz-Uz --upgrade� store_trueFz8Upgrade pip and dependencies, even if already installed.)rKrNrLz--userzInstall using the user scheme.z--rootz=Install everything relative to this alternate root directory.)rNrLz --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.)r-r.r/r2r0r1) �argparse�ArgumentParser� add_argumentr r� parse_argsr3r-r.r/r2r0r1)rrQ�parserr!rrr�_main�sZ   rV)N)N)Zdistutils.versionrr rZos.pathrrr;�__all__Z_PACKAGE_NAMESr r rZ_SETUPTOOLS_VERSIONr%r<r$rr,rr3rIrVrrrr�s4     2