add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
f

���_��@s�ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddgZdZiZ
dd�Zed�Zed	�Zded
fd	edfgZddd
�Zdd�Zdd�Zddddddd�dd�Zddddddd�dd�Zdd�dd�Zddd�ZdS)�N)�	resources�version�	bootstrapz/usr/share/python-wheels/cCs�tj�td�|��}it|<dD]J}d�||�}t�|�D].}|t|�t|��}tj�|�t||<q:q t	t
t|tj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)�pkg�prefix�suffix�patternrZversion_str�r�+/usr/lib64/python3.10/ensurepip/__init__.py�_get_most_recent_wheel_versionsrZ
setuptools�pipZpy3zpy2.py3cCs.d|pg�d|�d�}tjtjd|gdd�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-cT)�check)�
subprocess�run�sys�
executable�
returncode)�args�additional_paths�coderrr�_run_pip(s��r#cCstS)zA
    Returns a string specifying the bundled version of pip.
    )�_PIP_VERSIONrrrrr7scCs2dd�tjD�}|D]}tj|=qtjtjd<dS)NcSsg|]}|�d�r|�qS)ZPIP_)�
startswith)�.0�krrr�
<listcomp>A�z7_disable_pip_configuration_settings.<locals>.<listcomp>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)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-rrrrIs
�cCs�|r|rtd��t�d|�t�|r2dtjd<n|s@dtjd<t����*}g}tD]�\}}	}
t	||	}t
tj�t
|�d��R}t
tj�||�d��}
|
�|���Wd�n1s�0YWd�n1s�0Y|�tj�||��qTdd	d
d|g}|�r|d|g7}|�r&|d
g7}|�r6|dg7}|�rN|dd|g7}t|dd�tD�|�Wd�S1�s|0YdS)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.bootstrapr1ZENSUREPIP_OPTIONS�install�rb�wbNz--no-cache-dirz
--no-indexz--find-links�--root�	--upgrade�--user�-�vcSsg|]}|d�qS�rr�r&�prrrr(�r)z_bootstrap.<locals>.<listcomp>)�
ValueErrorr�auditr,rr*�tempfile�TemporaryDirectory�	_PROJECTSr�openrrr	�write�read�appendr#)r.r/r0r1r2r3Ztmpdirr!ZprojectrZpy_tagZ
wheel_nameZsfp�fpr rrrr4Xs4	
J

r4)r3cCs�zddl}Wnty YdS0|jtkrLd}t|�|jt�tjd�dSt�gd�}|rp|dd|g7}t	|dd	�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))�file)Z	uninstallz-yz--disable-pip-version-checkr;r<cSsg|]}|d�qSr=rr>rrrr(�r)z%_uninstall_helper.<locals>.<listcomp>)r�ImportError�__version__r$�printr
r�stderrr,r#�reversedrD)r3r�msgr rrr�_uninstall_helper�s
rQcCs�ddl}|jdd�}|jddd�t��dd�|jd	d
ddd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�countr3zDGive more output. Option is additive, and can be used up to 3 times.)rS�default�destrTz-Ur9�
store_trueFz8Upgrade pip and dependencies, even if already installed.)rSrVrTr:zInstall using the user scheme.r8z=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.)r.r/r0r3r1r2)
�argparse�ArgumentParser�add_argumentr
r�
parse_argsr4r.r/r0r3r1r2)�argvrY�parserr rrr�_main�sj
�������
�r_)N)N)Zdistutils.versionrrrZos.pathrZrunpyrBr�	importlibr�__all__r	rrZ_SETUPTOOLS_VERSIONr$rDr#rr,rr4rQr_rrrr�<module>s<�
��6