HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/setuptools/command/__pycache__/sdist.cpython-310.pyc
o

��h��@s�ddlmZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZdd	l
mZddlmmZdd
lmZeZddd
�ZGdd�dej�ZdS)�)�annotationsN)�chain)�ClassVar�)�metadata)�Distribution�)�_ORIGINAL_SUBCOMMANDS)�log�ccs*�tjdd�D]}|��|�EdHqdS)z%Find all files under revision controlzsetuptools.file_finders)�groupN)r�entry_points�load)�dirname�ep�r�C/usr/local/lib/python3.10/dist-packages/setuptools/command/sdist.py�walk_revctrls��rcs�eZdZUdZgd�Zded<iZded<gd�Zedd	�eD��Z	d,dd
�Z
d,dd�Zd,dd�Ze
ejdd���Zd,�fdd�Z�fdd�Zdd�Zdd�Zdd�Zdd�Z�fd d!�Zd,�fd"d#�Zd,d$d%�Zd,d&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]r�distributionzClassVar[dict[str, str]]�negative_opt)rz.rstz.txtz.mdccs�|]}d|��VqdS)�READMENr)�.0�extrrr�	<genexpr>8��zsdist.<genexpr>�return�NonecCs�|�d�|�d�}|j|_|j�tj�|jd��|��|�	�D]}|�|�q"|�
�t|jdg�}|j
D]}dd|f}||vrH|�|�q8dS)N�egg_infozSOURCES.txt�
dist_filesrr)�run_command�get_finalized_command�filelist�append�os�path�joinr"�check_readme�get_sub_commands�make_distribution�getattrr�
archive_files)�self�ei_cmd�cmd_namer#�file�datarrr�run:s




��z	sdist.runcCstj�|�dS�N)�origr�initialize_options�r0rrrr8Mszsdist.initialize_optionscCs:|���tj�|�Wd�dS1swYdS)z%
        Workaround for #516
        N)�_remove_os_linkr7rr-r9rrrr-Ps
"�zsdist.make_distributionccsh�Gdd�d�}ttd|�}zt`Wn	tyYnwzdVW||ur*|t_dSdS||ur3|t_w)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__rrrr�NoValue^sr>�linkN)r.r(r?�	Exception)r>�orig_valrrrr:Ws��
�zsdist._remove_os_linkcst���|��dSr6)�super�add_defaults� _add_defaults_build_sub_commandsr9��	__class__rrrCls
zsdist.add_defaultscs*t���tj�d�r|j�d�dSdS)Nzpyproject.toml)rB�_add_defaults_optionalr(r)�isfiler&r'r9rErrrGps
�zsdist._add_defaults_optionalcCs<|j��r|�d�}|j�|���|�|�|��dSdS)zgetting python files�build_pyN)r�has_pure_modulesr%r&�extend�get_source_files�_add_data_files�_safe_data_files�r0rIrrr�_add_defaults_pythonus


�zsdist._add_defaults_pythoncsP��d�}t|���t}�fdd�|D�}dd�|D�}�j�t�|��dS)N�buildc3s�|]}��|�VqdSr6)r%�r�cr9rrr�rz9sdist._add_defaults_build_sub_commands.<locals>.<genexpr>css"�|]}t|d�r|��VqdS)rLN)�hasattrrLrRrrrr�s� )r%�setr,r	r&rKr�
from_iterable)r0rQ�missing_cmds�cmds�filesrr9rrD|s

z&sdist._add_defaults_build_sub_commandscCs|jS)a�
        Since the ``sdist`` class is also used to compute the MANIFEST
        (via :obj:`setuptools.command.egg_info.manifest_maker`),
        there might be recursion problems when trying to obtain the list of
        data_files and ``include_package_data=True`` (which in turn depends on
        the files included in the MANIFEST).

        To avoid that, ``manifest_maker`` should be able to overwrite this
        method and avoid recursive attempts to build/analyze the MANIFEST.
        )�
data_filesrOrrrrN�szsdist._safe_data_filescCs|j�dd�|D��dS)zA
        Add data files as found in build_py.data_files.
        css0�|]\}}}}|D]
}tj�||�Vq
qdSr6)r(r)r*)r�_�src_dir�	filenames�namerrrr�s�
���z(sdist._add_data_files.<locals>.<genexpr>N)r&rK)r0rZrrrrM�s�zsdist._add_data_filescs0zt���WdStyt�d�YdSw)Nz&data_files contains unexpected objects)rB�_add_defaults_data_files�	TypeErrorr
�warnr9rErrr_�s
�zsdist._add_defaults_data_filescs.t���t�tj�}|jjd|dd�dS)Nz^(\.tox|\.nox|\.venv)T)�is_regex)rB�prune_file_list�re�escaper(�sepr&�exclude_pattern)r0rfrErrrc�s
zsdist.prune_file_listcCs8|jD]}tj�|�rdSq|�dd�|j��dS)Nz,standard file not found: should have one of z, )�READMESr(r)�existsrar*)r0�frrrr+�s
��zsdist.check_readmecCs^tj�|||�tj�|d�}ttd�r%tj�|�r%t�|�|�	d|�|�
d��|�dS)Nz	setup.cfgr?r")r7r�make_release_treer(r)r*rTri�unlink�	copy_filer%�save_version_info)r0�base_dirrY�destrrrrk�s
zsdist.make_release_treecCsTtj�|j�s	dSt|jd��}|��}Wd�|dkS1s!wY|dkS)NF�rbs+# file GENERATED by distutils, do NOT edit
)r(r)rH�manifest�open�readline)r0�fp�
first_linerrr�_manifest_is_not_generated�s

��z sdist._manifest_is_not_generatedc	Cs�t�d|j�t|jd�}|D]-}z|�d�}Wnty)t�|�d��Yqw|��}|�d�s5|s6q|j	�
|�q|��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'rqzUTF-8z  not UTF-8 decodable -- skipping�#N)r
�inforrrs�decode�UnicodeDecodeErrorra�strip�
startswithr&r'�close)r0rr�
bytes_line�linerrr�
read_manifest�s�zsdist.read_manifest)r r!)r;r<r=�__doc__�user_options�__annotations__r�README_EXTENSIONS�tuplerhr5r8r-�staticmethod�
contextlib�contextmanagerr:rCrGrPrDrNrMr_rcr+rkrwr��
__classcell__rrrErrs2







	
	r)r)�
__future__rr�r(rd�	itertoolsr�typingr�
_importlibr�distrrQr	�distutils.command.sdist�commandrr7�	distutilsr
�list�_default_revctrlrrrrr�<module>s