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: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/setuptools/command/__pycache__/egg_info.cpython-310.pyc
o

��he�@s�dZddlZddlZddlZddlZddlZddlmZddlZddl	Zddl
ZddlmZddl
mZddlmZddlmZmZddlmZddlmZd	d
lmZmZd	dlmZd	dlmZd
dlmZddl Z!ddl"Z!ddl!m#Z#ddl m$Z$ddl"m%Z&ddl'm(Z(ej)j*�dej)j+��Z,dd�Z-Gdd�d�Z.Gdd�de.e�Z/Gdd�de&�Z%Gdd�de�Z0d3dd �Z1d3d!d"�Z2d3d#d$�Z3ej4Z4ej5Z5d3d%d&�Z6d3d'd(�Z7d4d*e8ddfd+d,�Z9d3d-d.�Z:d5d/d0�Z;Gd1d2�d2e�Z<dS)6zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contents�N)�Callable)�Command)�	bdist_egg)�sdist�walk_revctrl)�edit_config)�glob�)�
_entry_points�_normalization)�metadata)�SetuptoolsDeprecationWarning�)�_requirestxt)�log)�DistutilsInternalError)�FileList)�convert_path�.cCs�d}|�tjj�}t�tj�}d|�d�}t|�D]�\}}|t|�dk}|dkr<|r0|d7}n|d|�d|�d	�7}qd
}t|�}	||	kr�||}
|
dkrU||d7}n�|
dkr^||7}ny|
d
kr�|d}||	krt||dkrt|d}||	kr�||dkr�|d}||	kr�||dkr�|d}||	kr�||dks�||	kr�|t�|
�7}n1||d|�}d}
|d
dkr�d}
|dd�}|
t�|�7}
|d
|
�d�7}|}n|t�|
�7}|d7}||	ksF|s�||7}q|d7}tj|tj	tj
Bd�S)z�
    Translate a file path glob like '*.txt' in to a regular expression.
    This differs from fnmatch.translate which allows wildcards to match
    directory separators. It also knows about '**/' which matches any number of
    directories.
    �z[^�]r�**z.*z(?:�+z)*r�*�?�[�!�^Nz\Z)�flags)�split�os�path�sep�re�escape�	enumerate�len�compile�	MULTILINE�DOTALL)r�pat�chunksr"�
valid_char�c�chunk�
last_chunk�i�	chunk_len�char�inner_i�inner�
char_class�r6�F/usr/local/lib/python3.10/dist-packages/setuptools/command/egg_info.py�translate_pattern&s\

��-�r8c@sfeZdZdZdZedd��Zdd�Zdd�Zde	d	e
fd
d�Zd	e	fdd
�Zd	e	fdd�Z
ee
�ZdS)�
InfoCommonNcCst�|j���S�N)r�	safe_name�distribution�get_name��selfr6r6r7�name}szInfoCommon.namecCs|�|j���}t�|�Sr:)�
_maybe_tagr<�get_versionr�safe_version)r?�taggedr6r6r7�tagged_version�s
zInfoCommon.tagged_versioncCs|jr
|�|�r
|S||jS)z�
        egg_info may be called more than once for a distribution,
        in which case the version string already contains all tags.
        )�vtags�_already_tagged�r?�versionr6r6r7rA�s����zInfoCommon._maybe_tagrI�returncCs|�|j�p|�|���Sr:)�endswithrF�
_safe_tagsrHr6r6r7rG�szInfoCommon._already_taggedc	CsHzt�d|j���dd�WStjjy#t�|j�dd��YSw)N�0r� r)rrCrF�	packagingrI�InvalidVersionr;�replacer>r6r6r7rL�s
�zInfoCommon._safe_tagscCs,d}|jr
||j7}|jr|t�d�7}|S)Nrz%Y%m%d)�	tag_build�tag_date�time�strftimerHr6r6r7�tags�s
zInfoCommon.tags)�__name__�
__module__�__qualname__rRrS�propertyr@rErA�str�boolrGrLrVrFr6r6r6r7r9ys
r9c@s�eZdZdZgd�ZdgZddiZdd�Zedd	d
��Z	e	j
dd
��Z	ddd
�Zddd�Ze
dfdd�Zddeddfdd�Zddd�Zddd�Zddd�Zddd�ZdS) �egg_infoz+create a distribution's .egg-info directory))z	egg-base=�ezLdirectory containing .egg-info directories [default: top of the source tree])�tag-date�dz0Add date stamp (e.g. 20050528) to version number)z
tag-build=�bz-Specify explicit tag to add to version number)�no-date�Dz"Don't include date stamp [default]r_rbcCs"d|_d|_d|_d|_d|_dS)NF)�egg_base�egg_namer]�egg_version�ignore_egg_info_in_manifestr>r6r6r7�initialize_options��

zegg_info.initialize_optionsrJNcC�dSr:r6r>r6r6r7�tag_svn_revision��zegg_info.tag_svn_revisioncCrjr:r6)r?�valuer6r6r7rk�rlcCs$t|��dd�}t|t|d��dS)z�
        Materialize the value of date into the
        build tag. Install build keys in a deterministic order
        to avoid arbitrary reordering on subsequent builds.
        r)rRrS)r]N)�dictrVr)r?�filenamer]r6r6r7�save_version_info�szegg_info.save_version_infoc
Cs|j|_|��|_tj�|j�}zt|tjj�}|rdnd}tj�	||j|jf�Wnt
yF}ztj�
d|j�d|j���|�d}~ww|jdurZ|jj}|pSi�dtj�|_|�d�t�|j�d|_|jtjkrxtj�|j|j�|_|j|jj_dS)Nz%s==%sz%s===%sz-Invalid distribution name or version syntax: �-rrd�	.egg-info)r@rerErfrOrI�Version�
isinstance�requirements�Requirement�
ValueError�	distutils�errors�DistutilsOptionErrorrdr<�package_dir�getr �curdir�ensure_dirnamer�filename_componentr]r!�joinr)r?�parsed_version�
is_version�specr^�dirsr6r6r7�finalize_options�s.
����

zegg_info.finalize_optionscCst|j|j||�S)�0Compute filename of the output egg. Private API.)�
_egg_basenamererf)r?�
py_version�platformr6r6r7�_get_egg_basename�szegg_info._get_egg_basenameF�forcecCsR|r|�|||�dStj�|�r'|dur |s t�d||�dS|�|�dSdS)a�Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        Nz$%s not set in setup(), but %s exists)�
write_filer r!�existsr�warn�delete_file)r?�whatro�datar�r6r6r7�write_or_delete_file�s	�zegg_info.write_or_delete_filecCsBt�d||�|�d�}|jst|d�}|�|�|��dSdS)z�Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        zwriting %s to %s�utf-8�wbN)r�info�encode�dry_run�open�write�close)r?r�ror��fr6r6r7r�s


�zegg_info.write_filecCs$t�d|�|jst�|�dSdS)z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)rr�r�r �unlink)r?ror6r6r7r�s�zegg_info.delete_filec
Cs�ttjdd��}|�|j�z	t�|jd�Wnty1}zd|j�d�}tj	�
|�|�d}~ww|D]}|��}|||jtj
�|j|j��q4tj
�|jd�}tj
�|�r\|�|�|��dS)Nzegg_info.writers)�groupz'Cannot update time stamp of directory '�'znative_libs.txt)�listr�entry_points�mkpathr]r �utime�OSErrorrxry�DistutilsFileError�loadr@r!r�r�r��find_sources)r?�writersr^�msg�ep�writer�nlr6r6r7�run$s ��
zegg_info.runcCs<tj�|jd�}t|j�}|j|_||_|�	�|j
|_
dS)z"Generate SOURCES.txt manifest filezSOURCES.txtN)r r!r�r]�manifest_makerr<rg�ignore_egg_info_dir�manifestr��filelist)r?�manifest_filename�mmr6r6r7r�:s
zegg_info.find_sources�rJN�F)rWrXrY�description�user_options�boolean_options�negative_optrhrZrk�setterrpr��PY_MAJORr�r\r�r�r�r�r�r6r6r6r7r]�s&�



 


r]cs�eZdZ	d#deddf�fdd�
Zd$dd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zd$dd�Zd$dd�Zdd �Zd!d"�Z�ZS)%rNFr�rJcst��||�||_dSr:)�super�__init__r�)r?r��debug_printr���	__class__r6r7r�Gs
zFileList.__init__c	Cs|�|�\}}}}|j|j|j|jt�|j|�t�|j|�|j	|j
d�}dddddddd	d�}z||}WntyId
|�d|��}	t|	�d�w|�
d�}
|d
vrV|g}|
r[|fnd}||}|�d�|g|
rl|gng|��|D]}
||
�s�tj||
g|�R�qudS)N)�include�excludezglobal-includezglobal-excludezrecursive-includezrecursive-exclude�graft�prunez%warning: no files found matching '%s'z9warning: no previously-included files found matching '%s'z>warning: no files found matching '%s' anywhere in distributionzRwarning: no previously-included files matching '%s' found anywhere in distributionz:warning: no files found matching '%s' under directory '%s'zNwarning: no previously-included files matching '%s' found under directory '%s'z+warning: no directories found matching '%s'z6no previously-included directories found matching '%s'z$Invalid MANIFEST.in: unknown action z in z
recursive->r�r�r6rN)�_parse_template_liner�r��global_include�global_exclude�	functools�partial�recursive_include�recursive_excluder�r��KeyErrorr�
startswithr�r�rr�)r?�line�action�patterns�dir�dir_pattern�
action_map�log_map�process_actionr��action_is_recursive�extra_log_args�log_tmpl�patternr6r6r7�process_template_lineMs\����
�
����zFileList.process_template_linecCsRd}tt|j�ddd�D]}||j|�r&|�d|j|�|j|=d}q
|S)z�
        Remove all files from the file list that match the predicate.
        Return True if any matching files were removed
        Fr���z
 removing T)�ranger&�filesr�)r?�	predicate�foundr0r6r6r7�
_remove_files�s�zFileList._remove_filescC�$dd�t|�D�}|�|�t|�S)z#Include files that match 'pattern'.cS�g|]
}tj�|�s|�qSr6�r r!�isdir��.0r�r6r6r7�
<listcomp>��z$FileList.include.<locals>.<listcomp>�r�extendr\�r?r�r�r6r6r7r��s
zFileList.includecCst|�}|�|j�S)z#Exclude files that match 'pattern'.)r8r��match�r?r�r�r6r6r7r��szFileList.excludecCs8tj�|d|�}dd�t|dd�D�}|�|�t|�S)zN
        Include all files anywhere in 'dir/' that match the pattern.
        rcSr�r6r�r�r6r6r7r��r�z.FileList.recursive_include.<locals>.<listcomp>T)�	recursive)r r!r�rr�r\)r?r�r��full_patternr�r6r6r7r��s
zFileList.recursive_includecCs ttj�|d|��}|�|j�S)zM
        Exclude any file anywhere in 'dir/' that match the pattern.
        r�r8r r!r�r�r�)r?r�r�r�r6r6r7r��szFileList.recursive_excludecCr�)zInclude all files from 'dir/'.cSs"g|]
}tj�|�D]}|�q
qSr6)rxr��findall)r��	match_dir�itemr6r6r7r��s
���z"FileList.graft.<locals>.<listcomp>r�)r?r�r�r6r6r7r��s
�
zFileList.graftcCsttj�|d��}|�|j�S)zFilter out files from 'dir/'.rr�)r?r�r�r6r6r7r��szFileList.prunecsJ|jdur	|��ttj�d|����fdd�|jD�}|�|�t|�S)z�
        Include all files anywhere in the current directory that match the
        pattern. This is very inefficient on large file trees.
        Nrcsg|]	}��|�r|�qSr6�r�r�r�r6r7r��sz+FileList.global_include.<locals>.<listcomp>)�allfilesr�r8r r!r�r�r\r�r6r�r7r��s

zFileList.global_includecCsttj�d|��}|�|j�S)zD
        Exclude all files anywhere that match the pattern.
        rr�r�r6r6r7r��szFileList.global_excludecCs<|�d�r|dd�}t|�}|�|�r|j�|�dSdS)N�
r�)rKr�
_safe_pathr��append)r?r�r!r6r6r7r��s

�zFileList.appendcCs|j�t|j|��dSr:)r�r��filterr�)r?�pathsr6r6r7r��szFileList.extendcCstt|j|j��|_dS)z�
        Replace self.files with only safe paths

        Because some owners of FileList manipulate the underlying
        ``files`` attribute directly, this method must be called to
        repair those paths.
        N)r�r�r�r�r>r6r6r7�_repair�szFileList._repairc	Cs�d}t�|�}|durt�d|�d��dSt�|d�}|dur)t�||d�dSz"d|vp1d|v}|jr:|r:WdStj�|�sFtj�|�rIWdSWdSt	y^t�||t
���YdSw)	Nz!'%s' not %s encodable -- skippingr�z$' in unexpected encoding -- skippingFr�rrs	.egg-infoT)�
unicode_utils�filesys_decoderr��
try_encoder�r r!r��UnicodeEncodeError�sys�getfilesystemencoding)r?r!�enc_warn�u_path�	utf8_path�is_egg_infor6r6r7r��s&

��zFileList._safe_path)NNFr�)rWrXrYr\r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__r6r6r�r7rDs*���
F
	



rc@szeZdZdZddd�Zddd�Zddd	�Zd
d�Zddd
�Zddd�Z	e
dd��Zddd�Zddd�Z
dd�Zdd�ZdS)r�zMANIFEST.inrJNcCs"d|_d|_d|_d|_d|_dS)NTF)�use_defaultsr��
manifest_only�force_manifestr�r>r6r6r7rhriz!manifest_maker.initialize_optionscCrjr:r6r>r6r6r7r�szmanifest_maker.finalize_optionscCszt|jd�|_tj�|j�s|��|��tj�|j	�r!|�
�|��|��|�
�|j��|j��|��dS)N)r�)rr�r�r r!r�r��write_manifest�add_defaults�template�
read_template�add_license_files�_add_referenced_files�prune_file_list�sort�remove_duplicatesr>r6r6r7r�s

zmanifest_maker.runcCst�|�}|�tjd�S)N�/)r�r�rQr r")r?r!r6r6r7�_manifest_normalize)s
z"manifest_maker._manifest_normalizecsF�j���fdd��jjD�}d�j�d�}��t�j|f|�dS)zo
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        csg|]}��|��qSr6)rr�r>r6r7r�5sz1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file 'r�N)r�r�r�r��executer�)r?r�r�r6r>r7r	-s
zmanifest_maker.write_manifestcCs|�|�s
t�||�dSdSr:)�_should_suppress_warningrr�)r?r�r6r6r7r�9s
�zmanifest_maker.warncCst�d|�S)z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r#r�)r�r6r6r7r=sz'manifest_maker._should_suppress_warningcCs�t�|�|j�|j�|j�|j�tt��}|r!|j�|�nt	j
�|j�r,|��t	j
�d�r8|j�d�|�
d�}|j�|j�dS)Nzsetup.pyr])rr
r�r�rr�r�rr�r r!r��
read_manifest�get_finalized_commandr�r])r?�rcfiles�ei_cmdr6r6r7r
Ds


zmanifest_maker.add_defaultscCs4|jjjpg}|D]}t�d|�q	|j�|�dS)Nzadding license file '%s')r<r�
license_filesrr�r�r�)r?r�lfr6r6r7r
Vsz manifest_maker.add_license_filescCs4t|jdg�}|D]}t�d|�q	|j�|�dS)zGAdd files referenced by the config (e.g. `file:` directive) to filelist�_referenced_filesz%adding file referenced by config '%s'N)�getattrr<r�debugr�r�)r?�
referenced�rfr6r6r7r\sz$manifest_maker._add_referenced_filescCs*t|d�r	|��Stjdddd�|��S)a0
        The parent class implementation of this method
        (``sdist``) will try to include data files, which
        might cause recursion problems when
        ``include_package_data=True``.

        Therefore, avoid triggering any attempt of
        analyzing/building the manifest again.
        �get_data_files_without_manifestz@`build_py` command does not inherit from setuptools' `build_py`.z�
            Custom 'build_py' does not implement 'get_data_files_without_manifest'.
            Please extend command classes from setuptools instead of distutils.
            z!https://peps.python.org/pep-0632/)�see_url)�hasattrr!r
�emit�get_data_files)r?�build_pyr6r6r7�_safe_data_filesds

�	zmanifest_maker._safe_data_filesr�)rWrXrYrrhr�r�rr	r��staticmethodrr
r
rr'r6r6r6r7r�s







r�rJcCsNd�|�}|�d�}t|d��}|�|�Wd�dS1s wYdS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �
r�r�N)r�r�r�r�)ro�contentsr�r6r6r7r�}s


"�r�c	Cs�t�d|�|jsE|jj}|j|j|_}|j|j|_}z|�	|j
�W|||_|_n|||_|_wt|jdd�}t�
|j
|�dSdS)Nz
writing %s�zip_safe)rr�r�r<rrfrIrer@�write_pkg_infor]rr�write_safety_flag)�cmd�basenameror�oldver�oldname�safer6r6r7r,�s �r,cCsdS)aj
    Unused: left to avoid errors when updating (from source) from <= 67.8.
    Old installations have a .dist-info directory with the entry-point
    ``depends.txt = setuptools.command.egg_info:warn_depends_obsolete``.
    This may trigger errors when running the first egg_info in build_meta.
    TODO: Remove this function in a version sufficiently > 68.
    Nr6�r.r/ror6r6r7�warn_depends_obsolete�sr4cCs:t�dd�|j��D��}|�d|d�t|��d�dS)NcSsg|]
}|�dd�d�qS)rrr)r)r��kr6r6r7r��s�z(write_toplevel_names.<locals>.<listcomp>ztop-level namesr))rn�fromkeysr<�iter_distribution_namesr�r��sorted)r.r/ro�pkgsr6r6r7�write_toplevel_names�s
� r:cCst|||d�dS)NT)�	write_argr3r6r6r7�
overwrite_arg�sr<Fr�cCsHtj�|�d}t|j|d�}|durd�|�d}|�||||�dS)Nrr))r r!�splitextrr<r�r�)r.r/ror��argnamermr6r6r7r;�s
r;cCs,t�|jj�}t�|�}|�d||d�dS)Nzentry pointsT)r
r�r<r��renderr�)r.r/ro�eps�defnr6r6r7�
write_entries�s
rBcCsBt�|�}t�|�}|�d|�d|pt��}|r|d|��7}|S)r�rqz-py)rrr�)rerfr�r�r@rI�eggr6r6r7r��s

r�c@seZdZdZdS)�EggInfoDeprecationWarningz?Deprecated behavior warning for EggInfo, bypassing suppression.N)rWrXrY�__doc__r6r6r6r7rD�srDr�r�)NN)=rEr�r r#r�rT�collections.abcrrO�packaging.requirements�packaging.version�setuptools.unicode_utilsr��
setuptoolsr�setuptools.commandr�setuptools.command.sdistrr�setuptools.command.setoptr�setuptools.globrrr
r�
_importlibr�warningsr
r�distutils.errorsrx�distutils.filelistrrr�	_FileList�distutils.utilr�version_info�major�minorr�r8r9r]r�r�r,r4�write_requirements�write_setup_requirementsr:r<r\r;rBr�rDr6r6r6r7�<module>sZS/K
o