HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/osm/venv/lib/python3.10/site-packages/setuptools/command/__pycache__/egg_info.cpython-310.pyc
o

0i�h�@s�dZddlmZddlmZddlmZddlm	Z	ddlZddlZddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddlm-Z-dd�Z.Gdd�d�Z/Gdd�de/e�Z0Gdd�de�ZGdd�de�Z1dd�Z2d d!�Z3d"d#�Z4d$d%�Z5d&d'�Z6d(d)�Z7d*d+�Z8d,d-�Z9d7d/d0�Z:d1d2�Z;d3d4�Z<Gd5d6�d6e-�Z=dS)8zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contents�)�FileList)�DistutilsInternalError)�convert_path)�logN�)�metadata)�
_entry_points)�Command)�sdist)�walk_revctrl)�edit_config)�	bdist_egg)�Requirement�	safe_name�
parse_version�safe_version�to_filename)�glob)�	packaging)�yield_lines)�SetuptoolsDeprecationWarningcCs�d}|�tjj�}t�tj�}d|f}t|�D]�\}}|t|�dk}|dkr8|r/|d7}n|d||f7}qd}t|�}	||	kr�||}
|
dkrQ||d7}n�|
d	krZ||7}nx|
d
kr�|d}||	krp||dkrp|d}||	kr~||dkr~|d}||	kr�||dkr�|d}||	kr�||dks�||	kr�|t�|
�7}n0||d|�}d}
|ddkr�d
}
|dd�}|
t�|�7}
|d|
f7}|}n|t�|
�7}|d7}||	ksB|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[^%s]��**z.*z
(?:%s+%s)*r�*�?�[�!�]�^Nz[%s]z\Z)�flags)�split�os�path�sep�re�escape�	enumerate�len�compile�	MULTILINE�DOTALL)r�pat�chunksr$Z
valid_char�c�chunk�
last_chunk�iZ	chunk_len�charZinner_i�inner�
char_class�r5�I/opt/osm/venv/lib/python3.10/site-packages/setuptools/command/egg_info.py�translate_pattern's\


��-�r7c@sfeZdZdZdZedd��Zdd�Zdd�Zde	d	e
fd
d�Zd	e	fdd
�Zd	e	fdd�Z
ee
�ZdS)�
InfoCommonNcCst|j���S�N)r�distribution�get_name��selfr5r5r6�name~szInfoCommon.namecCst|�|j����Sr9)r�
_maybe_tagr:�get_versionr<r5r5r6�tagged_version�szInfoCommon.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=�versionr5r5r6r?�s��zInfoCommon._maybe_tagrE�returncCs|�|j�p|�|���Sr9)�endswithrB�
_safe_tagsrDr5r5r6rC�szInfoCommon._already_taggedcCstd|j���dd�S)N�0r)rrBr<r5r5r6rH�szInfoCommon._safe_tagscCs,d}|jr
||j7}|jr|t�d�7}|S)Nrz-%Y%m%d)�	tag_build�tag_date�time�strftimerDr5r5r6�tags�s
zInfoCommon.tags)�__name__�
__module__�__qualname__rJrK�propertyr>rAr?�str�boolrCrHrNrBr5r5r5r6r8zs

r8c@s�eZdZdZgd�ZdgZddiZdd�Zedd��Z	e	j
d	d��Z	d
d�Zdd
�Zddd�Z
dd�Zdd�Zdd�Zdd�Zdd�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]rWrZcCs(d|_d|_d|_d|_d|_d|_dS)NF)�egg_base�egg_namerU�egg_version�broken_egg_info�ignore_egg_info_in_manifestr<r5r5r6�initialize_options�s
zegg_info.initialize_optionscC�dSr9r5r<r5r5r6�tag_svn_revision��zegg_info.tag_svn_revisioncCrbr9r5)r=�valuer5r5r6rc�rdcCs0t��}|��|d<d|d<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.
        rJrrK)rUN)�collections�OrderedDictrNr�dict)r=�filenamerUr5r5r6�save_version_info�szegg_info.save_version_infoc
CsH|j|_|��|_t|j�}zt|tjj�}|rdnd}t	||j|jf�Wnt
y@}z
tj�
d|j|jf�|�d}~ww|jdurT|jj}|pMi�dtj�|_|�d�t|j�d|_|jtjkrqtj�|j|j�|_d|jvrz|��|j|jj_|jj}|dur�|j|j��kr�|j|_t|j�|_d|j_dSdSdS)Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%srr\�	.egg-info�-) r>r]rAr^r�
isinstancerrE�Versionr�
ValueError�	distutils�errorsZDistutilsOptionErrorr\r:Zpackage_dir�getr"�curdirZensure_dirnamerrUr#�join�check_broken_egg_inforZ
_patched_dist�key�lower�_version�_parsed_version)r=�parsed_versionZ
is_version�specrV�dirs�pdr5r5r6�finalize_options�sB


�����


�zegg_info.finalize_optionsFcCsR|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=�whatri�data�forcer5r5r6�write_or_delete_files	��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�rir��fr5r5r6rs


�zegg_info.write_filecCs$t�d|�|jst�|�dSdS)z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)rr�r�r"�unlink)r=rir5r5r6r�"s�zegg_info.delete_filecCs�|�|j�t�|jd�tjdd�D]}|��}|||jtj�	|j|j��qtj�	|jd�}tj�
|�r;|�|�|��dS)Nzegg_info.writers)�groupznative_libs.txt)
ZmkpathrUr"�utimer�entry_points�loadr>r#rtr�r��find_sources)r=�ep�writer�nlr5r5r6�run(s
zegg_info.runcCs<tj�|jd�}t|j�}|j|_||_|�	�|j
|_
dS)z"Generate SOURCES.txt manifest filezSOURCES.txtN)r"r#rtrU�manifest_makerr:r`�ignore_egg_info_dir�manifestr��filelist)r=Zmanifest_filename�mmr5r5r6r�6s
zegg_info.find_sourcescCsX|jd}|jtjkrtj�|j|�}tj�|�r*t�d||j	�|j	|_
||_	dSdS)NrkaB------------------------------------------------------------------------------
Note: Your current .egg-info directory has a '-' in its name;
this will not work correctly with "setup.py develop".

Please rename %s to %s to correct this problem.
------------------------------------------------------------------------------)r]r\r"rsr#rtr�rr�rUr_)r=Zbeir5r5r6ru?s
�
�zegg_info.check_broken_egg_infoN�F)rOrPrQ�descriptionZuser_optionsZboolean_optionsZnegative_optrarRrc�setterrjr~r�rr�r�r�rur5r5r5r6rU�s&�


-
	rUcs�eZdZd!�fdd�	Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Z�ZS)"rNFcst��||�||_dSr9)�super�__init__r�)r=r��debug_printr���	__class__r5r6r�Rs
zFileList.__init__c
	Cs|�|�\}}}}|j|j|j|jt�|j|�t�|j|�|j	|j
d�}dddddddd	d�}z||}WntyDtd
j
|d���w|�d�}	|d
vrQ|g}|	rV|fnd}
||}|�d�|g|	rg|gng|��|D]}||�s�tj||g|
�R�qpdS)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/this cannot happen: invalid action '{action!s}')�actionz
recursive->r�r�r5� )Z_parse_template_liner�r��global_include�global_exclude�	functools�partial�recursive_include�recursive_excluder�r��KeyErrorr�format�
startswithr�rtrr�)
r=�liner��patterns�dirZdir_patternZ
action_mapZlog_mapZprocess_actionZaction_is_recursiveZextra_log_argsZlog_tmpl�patternr5r5r6�process_template_lineVsf�������

������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�foundr1r5r5r6�
_remove_files�s�zFileList._remove_filescC�$dd�t|�D�}|�|�t|�S)z#Include files that match 'pattern'.cS�g|]
}tj�|�s|�qSr5�r"r#�isdir��.0r�r5r5r6�
<listcomp>�sz$FileList.include.<locals>.<listcomp>�r�extendrT�r=r�r�r5r5r6r��s
zFileList.includecCst|�}|�|j�S)z#Exclude files that match 'pattern'.)r7r��match�r=r�r�r5r5r6r��szFileList.excludecCs8tj�|d|�}dd�t|dd�D�}|�|�t|�S)zN
        Include all files anywhere in 'dir/' that match the pattern.
        rcSr�r5r�r�r5r5r6r��s

�z.FileList.recursive_include.<locals>.<listcomp>T)�	recursive)r"r#rtrr�rT)r=r�r�Zfull_patternr�r5r5r6r��s
zFileList.recursive_includecCs ttj�|d|��}|�|j�S)zM
        Exclude any file anywhere in 'dir/' that match the pattern.
        r�r7r"r#rtr�r�)r=r�r�r�r5r5r6r��szFileList.recursive_excludecCr�)zInclude all files from 'dir/'.cSs"g|]
}tj�|�D]}|�q
qSr5)rpr��findall)r�Z	match_dir�itemr5r5r6r��s
���z"FileList.graft.<locals>.<listcomp>r�)r=r�r�r5r5r6r��s
�
zFileList.graftcCsttj�|d��}|�|j�S)zFilter out files from 'dir/'.rr�)r=r�r�r5r5r6r��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|�qSr5�r�r�r�r5r6r��sz+FileList.global_include.<locals>.<listcomp>)Zallfilesr�r7r"r#rtr�rTr�r5r�r6r��s

zFileList.global_includecCsttj�d|��}|�|j�S)zD
        Exclude all files anywhere that match the pattern.
        rr�r�r5r5r6r��szFileList.global_excludecCs<|�d�r|dd�}t|�}|�|�r|j�|�dSdS)N�
r�)rGr�
_safe_pathr��append)r=r�r#r5r5r6r��s

�zFileList.appendcCs|j�t|j|��dSr9)r�r��filterr�)r=�pathsr5r5r6r��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)�listr�r�r�r<r5r5r6�_repair�szFileList._repairc	Cs�d}t�|�}|durt�d|�dSt�|d�}|dur't�||d�dSz"d|vp/d|v}|jr8|r8WdStj�|�sDtj�|�rGWdSWdSt	y\t�||t
���YdSw)Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFr�rks	.egg-infoT)�
unicode_utils�filesys_decoderr�Z
try_encoder�r"r#r��UnicodeEncodeError�sys�getfilesystemencoding)r=r#Zenc_warnZu_pathZ	utf8_pathZis_egg_infor5r5r6r�s&

��zFileList._safe_path)NNF)rOrPrQr�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__r5r5r�r6rOs M



rc@sleZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	e
dd��Zdd�Zdd�Z
dd�Zdd�ZdS)r�zMANIFEST.incCs"d|_d|_d|_d|_d|_dS)NrF)Zuse_defaultsr�Z
manifest_onlyZforce_manifestr�r<r5r5r6ra"s

z!manifest_maker.initialize_optionscCrbr9r5r<r5r5r6r~)szmanifest_maker.finalize_optionscCsrt|jd�|_tj�|j�s|��|��tj�|j	�r!|�
�|��|��|j�
�|j��|��dS)N)r�)rr�r�r"r#r�r��write_manifest�add_defaults�templateZ
read_template�add_license_files�prune_file_list�sort�remove_duplicatesr<r5r5r6r�,s

zmanifest_maker.runcCst�|�}|�tjd�S)N�/)r�r��replacer"r$)r=r#r5r5r6�_manifest_normalize9s
z"manifest_maker._manifest_normalizecsB�j���fdd��jjD�}d�j}��t�j|f|�dS)zo
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        csg|]}��|��qSr5)r�r�r<r5r6r�Esz1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r�r�r�r��executer)r=r��msgr5r<r6r�=s

zmanifest_maker.write_manifestcCs|�|�s
t�||�dSdSr9)�_should_suppress_warningr
r�)r=r�r5r5r6r�Is
�zmanifest_maker.warncCst�d|�S)z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r%r�)r�r5r5r6r�Ms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.pyrU)r
r�r�r�r�r�r�rr�r"r#r�Z
read_manifest�get_finalized_commandr�rU)r=ZrcfilesZei_cmdr5r5r6r�Ts


zmanifest_maker.add_defaultscCs4|jjjpg}|D]}t�d|�q	|j�|�dS)Nzadding license file '%s')r:r�
license_filesrr�r�r�)r=r��lfr5r5r6r�fs
z manifest_maker.add_license_filescCsZ|�d�}|j��}|j�|j�|j�|�t�tj	�}|jj
d|d|dd�dS)N�buildz(^|z)(RCS|CVS|\.svn)r)Zis_regex)r�r:Zget_fullnamer�r�Z
build_baser%r&r"r$Zexclude_pattern)r=r��base_dirr$r5r5r6r�ms


�zmanifest_maker.prune_file_listcCs&t|d�r	|��St�dt�|��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�Custom 'build_py' does not implement 'get_data_files_without_manifest'.
Please extend command classes from setuptools instead of distutils.)�hasattrr��warningsr�rZget_data_files)r=Zbuild_pyr5r5r6�_safe_data_filesvs

�zmanifest_maker._safe_data_filesN)rOrPrQr�rar~r�r�r�r��staticmethodr�r�r�r�r�r5r5r5r6r�s

	r�cCsNd�|�}|�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)rtr�r�r�)ri�contentsr�r5r5r6r�s


"�rc	Cs�t�d|�|jsE|jj}|j|j|_}|j|j|_}z|�	|j
�W|||_|_n|||_|_wt|jdd�}t�
|j
|�dSdS)Nz
writing %sZzip_safe)rr�r�r:rr^rEr]r>�write_pkg_inforU�getattrr
Zwrite_safety_flag)�cmd�basenamerirZoldverZoldname�safer5r5r6r��s �r�cCstj�|�r
t�d�dSdS)NzsWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.)r"r#r�rr��r�r�rir5r5r6�warn_depends_obsolete�s
��r�cCs,t|pd�}dd�}t||�}|�|�dS)Nr5cSs|dS)Nr�r5)r�r5r5r6�	append_cr�sz&_write_requirements.<locals>.append_cr)r�map�
writelines)�stream�reqs�linesr�r5r5r6�_write_requirements�s
rcCsn|j}t��}t||j�|jpi}t|�D]}|�djdit	����t|||�q|�
d||���dS)Nz
[{extra}]
�requirementsr5)r:�io�StringIOrZinstall_requires�extras_require�sortedr�r��varsr��getvalue)r�r�ri�distr�r	�extrar5r5r6�write_requirements�s
rcCs,t��}t||jj�|�d||���dS)Nzsetup-requirements)rrrr:Zsetup_requiresr�r)r�r�rir�r5r5r6�write_setup_requirements�srcCs:t�dd�|j��D��}|�d|d�t|��d�dS)NcSsg|]
}|�dd�d�qS)�.rr)r!)r��kr5r5r6r��s��z(write_toplevel_names.<locals>.<listcomp>ztop-level namesr�)rh�fromkeysr:Ziter_distribution_namesrrtr
)r�r�riZpkgsr5r5r6�write_toplevel_names�s�� rcCst|||d�dS)NT)�	write_argr�r5r5r6�
overwrite_arg�srFcCsHtj�|�d}t|j|d�}|durd�|�d}|�||||�dS)Nrr�)r"r#�splitextr�r:rtr�)r�r�rir��argnamerer5r5r6r�s
rcCs,t�|jj�}t�|�}|�d||d�dS)Nzentry pointsT)rr�r:r��renderr�)r�r�riZepsZdefnr5r5r6�
write_entries�s
rcCs�t�dt�tj�d�r?t�d��&}|D]}t�	d|�}|r.t
|�d��Wd�SqWd�dS1s:wYdS)zd
    Get a -r### off of PKG-INFO Version in case this is an sdist of
    a subversion revision.
    z$get_pkg_info_revision is deprecated.zPKG-INFOzVersion:.*-r(\d+)\s*$rNr)r�r��EggInfoDeprecationWarningr"r#r�rr�r%r��intr�)r�r�r�r5r5r6�get_pkg_info_revision�s ���
��rc@seZdZdZdS)rz?Deprecated behavior warning for EggInfo, bypassing suppression.N)rOrPrQ�__doc__r5r5r5r6r�srr�)>rZdistutils.filelistrZ	_FileListZdistutils.errorsrZdistutils.utilrrprr�r"r%r�rr�rLrfZ
_importlibrrr�
setuptoolsr	Zsetuptools.command.sdistr
rZsetuptools.command.setoptrZsetuptools.commandr
�
pkg_resourcesrrrrrZsetuptools.unicode_utilsr�Zsetuptools.globrZsetuptools.externrZsetuptools.extern.jaraco.textrrr7r8rUr�rr�r�rrrrrrrrrr5r5r5r6�<module>s^S)-Qm