Your IP : 18.226.165.234


Current Path : /opt/alt/python37/lib/python3.7/site-packages/setuptools/command/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/setuptools/command/__pycache__/sdist.cpython-37.pyc

B

��Re�@sxddlmZddlmmZddlZddlZddlZddl	Z	ddl
mZddlZe
Zd
dd�ZGdd	�d	eej�ZdS)�)�logN�)�sdist_add_defaults�ccs4x.t�d�D] }x|��|�D]
}|VqWqWdS)z%Find all files under revision controlzsetuptools.file_findersN)�
pkg_resources�iter_entry_points�load)�dirname�ep�item�r��/builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/command/sdist.py�walk_revctrlsrcs�eZdZdZdddddgZiZddd	d
gZedd�eD��Zd
d�Z	dd�Z
dd�Zdd�Ze
ejdd���Z�fdd�Zdd�Zdd�Zdd�Z�fdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Z�ZS))�sdistz=Smart sdist that finds anything supported by revision control)zformats=Nz6formats for source distribution (comma-separated list))z	keep-temp�kz@keep the distribution tree around after creating archive file(s))z	dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]rz.rstz.txtz.mdccs|]}d�|�VqdS)z	README{0}N)�format)�.0�extrrr
�	<genexpr>+szsdist.<genexpr>cCs�|�d�|�d�}|j|_|j�tj�|jd��|��x|�	�D]}|�|�qFW|�
�t|jdg�}x*|j
D] }dd|f}||krv|�|�qvWdS)N�egg_infozSOURCES.txt�
dist_filesrr)�run_command�get_finalized_command�filelist�append�os�path�joinr�check_readme�get_sub_commands�make_distribution�getattr�distributionZ
archive_files)�selfZei_cmd�cmd_namer�file�datarrr
�run-s


z	sdist.runcCstj�|�|��dS)N)�origr�initialize_options�_default_to_gztar)r&rrr
r,@szsdist.initialize_optionscCstjdkrdSdg|_dS)N)��r�betar�gztar)�sys�version_info�formats)r&rrr
r-Es
zsdist._default_to_gztarc	Cs$|���tj�|�WdQRXdS)z%
        Workaround for #516
        N)�_remove_os_linkr+rr#)r&rrr
r#Ks
zsdist.make_distributionc
cs^Gdd�d�}ttd|�}yt`Wntk
r6YnXz
dVWd||k	rXttd|�XdS)zG
        In a context, remove and restore os.link if it exists
        c@seZdZdS)z&sdist._remove_os_link.<locals>.NoValueN)�__name__�
__module__�__qualname__rrrr
�NoValueYsr9�linkN)r$rr:�	Exception�setattr)r9Zorig_valrrr
r5Rs
zsdist._remove_os_linkcs&t���tj�d�r"|j�d�dS)Nzpyproject.toml)�super�_add_defaults_optionalrr�isfilerr)r&)�	__class__rr
r>gs
zsdist._add_defaults_optionalcCs8|j��r4|�d�}|j�|���|�|�|��dS)zgetting python files�build_pyN)r%�has_pure_modulesrr�extendZget_source_files�_add_data_files�_safe_data_files)r&rArrr
�_add_defaults_pythonls

zsdist._add_defaults_pythoncCs|jjrdS|jS)z�
        Extracting data_files from build_py is known to cause
        infinite recursion errors when `include_package_data`
        is enabled, so suppress it in that case.
        r)r%Zinclude_package_data�
data_files)r&rArrr
rEsszsdist._safe_data_filescCs|j�dd�|D��dS)zA
        Add data files as found in build_py.data_files.
        css.|]&\}}}}|D]}tj�||�VqqdS)N)rrr )r�_�src_dir�	filenames�namerrr
r�s
z(sdist._add_data_files.<locals>.<genexpr>N)rrC)r&rGrrr
rD}szsdist._add_data_filescs2yt���Wntk
r,t�d�YnXdS)Nz&data_files contains unexpected objects)r=�_add_defaults_data_files�	TypeErrorr�warn)r&)r@rr
rL�szsdist._add_defaults_data_filescCs:x4|jD]}tj�|�rdSqW|�dd�|j��dS)Nz,standard file not found: should have one of z, )�READMESrr�existsrNr )r&�frrr
r!�szsdist.check_readmecCs^tj�|||�tj�|d�}ttd�rJtj�|�rJt�|�|�	d|�|�
d��|�dS)Nz	setup.cfgr:r)r+r�make_release_treerrr �hasattrrP�unlink�	copy_filerZsave_version_info)r&�base_dir�files�destrrr
rR�s
zsdist.make_release_treec	Cs@tj�|j�sdSt�|jd��}|��}WdQRX|d��kS)NF�rbz+# file GENERATED by distutils, do NOT edit
)rrr?�manifest�io�open�readline�encode)r&�fp�
first_linerrr
�_manifest_is_not_generated�sz sdist._manifest_is_not_generatedc	Cs�t�d|j�t|jd�}xd|D]\}y|�d�}Wn$tk
rVt�d|�w YnX|��}|�d�s |spq |j	�
|�q W|��dS)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'rYzUTF-8z"%r not UTF-8 decodable -- skipping�#N)r�inforZr\�decode�UnicodeDecodeErrorrN�strip�
startswithrr�close)r&rZ�linerrr
�
read_manifest�s
zsdist.read_manifest)r6r7r8�__doc__�user_options�negative_optZREADME_EXTENSIONS�tuplerOr*r,r-r#�staticmethod�
contextlib�contextmanagerr5r>rFrErDrLr!rRrarj�
__classcell__rr)r@r
rs0




r)r)�	distutilsrZdistutils.command.sdist�commandrr+rr2r[rpZ
py36compatrr�listZ_default_revctrlrrrrr
�<module>s


?>