add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
f

���_�c@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{}*{})Zkey)�os�path�join�
_WHEEL_DIR�format�_wheels�globZlenZbasenameZstrZmax�	distutilsrZLooseVersion)ZpkgZprefixZsuffixZpatternrZversion_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)Zcheck)�
subprocessZrun�sysZ
executableZ
returncode)�args�additional_pathsZcoderrr
�_run_pip(s��rcCstS)zA
    Returns a string specifying the bundled version of pip.
    )�_PIP_VERSIONrrrr
r7scCs2dd�tjD�}|D]}tj|=qtjtjd<dS)NcSsg|]}|�d�r|�qS)ZPIP_)Z
startswith)�.0�krrr
�
<listcomp>A�z7_disable_pip_configuration_settings.<locals>.<listcomp>ZPIP_CONFIG_FILE)r�environZdevnull)Zkeys_to_removerrrr
�#_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.
    rN)�
_bootstraprrrr
rIs
�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.bootstrapr ZENSUREPIP_OPTIONSZinstallZrbZwbNz--no-cache-dirz
--no-indexz--find-links�--root�	--upgrade�--user�-�vcS�g|]}|d�qS�rr�rZprrr
r�rz_bootstrap.<locals>.<listcomp>)Z
ValueErrorrZauditrrr�tempfileZTemporaryDirectory�	_PROJECTSr	ZopenrrrZwriteZreadZappendr)rrrr r!r"ZtmpdirrZprojectrZpy_tagZ
wheel_nameZsfpZfprrrr
r#Xs4	
J

r#)r"cCs�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))Zfile)Z	uninstallz-yz--disable-pip-version-checkr'r(cSr)r*rr+rrr
r�rz%_uninstall_helper.<locals>.<listcomp>)rZImportErrorZ__version__rZprintrrZstderrrrZreversedr-)r"rZmsgrrrr
�_uninstall_helper�s
r.cCs�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)Zprogz	--versionrzpip {}z9Show the version of pip that is bundled with this Python.)�actionr�helpz-vz	--verboseZcountr"zDGive more output. Option is additive, and can be used up to 3 times.)r/�defaultZdestr0z-Ur%Z
store_trueFz8Upgrade pip and dependencies, even if already installed.)r/r1r0r&zInstall using the user scheme.r$z=Install everything relative to this alternate root directory.)r1r0z--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"r r!)
�argparseZArgumentParserZadd_argumentrrZ
parse_argsr#rrrr"r r!)Zargvr2Zparserrrrr
�_main�sj
�������
�r3�Nr4)Zdistutils.versionrr
rZos.pathrZrunpyr,rZ	importlibrZ__all__rr	rZ_SETUPTOOLS_VERSIONrr-rrrrr#r.r3rrrr
Z<module>s<�
��6