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: //usr/local/lib/python3.7/site-packages/setuptools/command/__pycache__/egg_info.cpython-37.pyc
B

N��g�j�@s�dZddlmZddlmZddlmZddlm	Z	ddlZddlZddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlmZdd	lmZmZdd
lmZddlmZddlmZdd
lmZddlmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(dj)e
j*�Z+dd�Z,Gdd�d�Z-Gdd�de-e�Z.Gdd�de�ZGdd�de�Z/dd�Z0d d!�Z1d"d#�Z2d$d%�Z3d&d'�Z4d(d)�Z5d*d+�Z6d,d-�Z7d7d/d0�Z8d1d2�Z9d8d3d4�Z:Gd5d6�d6e(�Z;dS)9zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contents�)�FileList)�DistutilsInternalError)�convert_path)�logN�)�metadata)�
_entry_points�_normalization)�Command)�sdist)�walk_revctrl)�edit_config)�	bdist_egg)�glob)�	packaging)�yield_lines)�SetuptoolsDeprecationWarningz{}.{}cCs�d}|�tjj�}t�tj�}d|f}�x�t|�D�]�\}}|t|�dk}|dkrv|rd|d7}q4|d||f7}q4d}t|�}	�x:||	k�r�||}
|
dkr�||d7}�n|
d	kr�||7}n�|
d
k�r�|d}||	kr�||dkr�|d}||	k�r||dk�r|d}x&||	k�r6||dk�r6|d}�qW||	k�rR|t�|
�7}nR||d|�}d}
|ddk�r�d
}
|dd�}|
t�|�7}
|d|
f7}|}n|t�|
�7}|d7}q�W|s4||7}q4W|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.*z
(?:%s+%s)*r�*�?�[�!�]�^Nz[%s]z\Z)�flags)�split�os�path�sep�re�escape�	enumerate�len�compile�	MULTILINE�DOTALL)r�pat�chunksrZ
valid_char�c�chunk�
last_chunk�iZ	chunk_len�charZinner_i�inner�
char_class�r0�?/tmp/pip-unpacked-wheel-yrlplx0q/setuptools/command/egg_info.py�translate_pattern&sV




r2c@sdeZdZdZdZedd��Zdd�Zdd�Ze	e
d�d	d
�Ze	d�dd
�Ze	d�dd�Z
ee
�ZdS)�
InfoCommonNcCst�|j���S)N)r	�	safe_name�distribution�get_name)�selfr0r0r1�name}szInfoCommon.namecCs|�|j���}t�|�S)N)�
_maybe_tagr5�get_versionr	�best_effort_version)r7Ztaggedr0r0r1�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)r7�versionr0r0r1r9�szInfoCommon._maybe_tag)r?�returncCs|�|j�p|�|���S)N)�endswithr=�
_safe_tags)r7r?r0r0r1r>�szInfoCommon._already_tagged)r@cCst�d|j���dd�S)N�0r)r	r;r=)r7r0r0r1rB�szInfoCommon._safe_tagscCs,d}|jr||j7}|jr(|t�d�7}|S)Nrz%Y%m%d)�	tag_build�tag_date�time�strftime)r7r?r0r0r1�tags�s
zInfoCommon.tags)�__name__�
__module__�__qualname__rDrE�propertyr8r<r9�str�boolr>rBrHr=r0r0r0r1r3ys
r3c@s�eZdZdZddddgZdgZddiZdd	�Zed
d��Z	e	j
dd��Z	d
d�Zdd�Ze
dfdd�Zddd�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))ztag-date�dz0Add date stamp (e.g. 20050528) to version number)z
tag-build=�bz-Specify explicit tag to add to version number)zno-date�Dz"Don't include date stamp [default]ztag-datezno-datecCs"d|_d|_d|_d|_d|_dS)NF)�egg_base�egg_namerO�egg_version�ignore_egg_info_in_manifest)r7r0r0r1�initialize_options�s
zegg_info.initialize_optionscCsdS)Nr0)r7r0r0r1�tag_svn_revision�szegg_info.tag_svn_revisioncCsdS)Nr0)r7�valuer0r0r1rY�scCs0t��}|��|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.
        rDrrE)rON)�collections�OrderedDictrHr
�dict)r7�filenamerOr0r0r1�save_version_info�szegg_info.save_version_infoc
Csb|j|_|��|_tj�|j�}y6t|tjj�}|r8dnd}tj�	||j|jf�Wn<t
k
r�}ztj�
d|j|jf�|�Wdd}~XYnX|jdkr�|jj}|p�i�dtj�|_|�d�t�|j�d|_|jtjkr�tj�|j|j�|_|j|jj_|jj}t|dd��p"t|dd�}|dk	�r^||j��k�r^|j|_tj�|j�|_d|j_dS)	Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%srrTz	.egg-info�keyr8) r8rUr<rVrr?�Version�
isinstance�requirements�Requirement�
ValueError�	distutils�errors�DistutilsOptionErrorrTr5�package_dir�getr�curdir�ensure_dirnamer	�filename_componentrOr�joinrZ
_patched_dist�getattr�lower�_version�_parsed_version)r7�parsed_versionZ
is_version�specrP�dirs�pdr`r0r0r1�finalize_options�s4


zegg_info.finalize_optionsNcCst|j|j||�S)z0Compute filename of the output egg. Private API.)�
_egg_basenamerUrV)r7�
py_version�platformr0r0r1�_get_egg_basename�szegg_info._get_egg_basenameFcCsL|r|�|||�n4tj�|�rH|dkr>|s>t�d||�dS|�|�dS)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_filerr�existsr�warn�delete_file)r7�whatr^�data�forcer0r0r1�write_or_delete_files	
zegg_info.write_or_delete_filecCs>t�d||�|�d�}|js:t|d�}|�|�|��dS)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 %szutf-8�wbN)r�info�encode�dry_run�open�write�close)r7r�r^r��fr0r0r1r|s


zegg_info.write_filecCs t�d|�|jst�|�dS)z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)rr�r�r�unlink)r7r^r0r0r1r$szegg_info.delete_filec
Cs�|�|j�yt�|jd�Wn>tk
r\}z d|j�d�}tj�|�|�Wdd}~XYnXx8tj	dd�D](}|�
�}|||jtj�
|j|j��qlWtj�
|jd�}tj�|�r�|�|�|��dS)Nz'Cannot update time stamp of directory '�'zegg_info.writers)�groupznative_libs.txt)�mkpathrOr�utime�OSErrorrfrg�DistutilsFileErrorr�entry_points�loadr8rrnr}r�find_sources)r7rP�msg�ep�writer�nlr0r0r1�run*s  
zegg_info.runcCs<tj�|jd�}t|j�}|j|_||_|�	�|j
|_
dS)z"Generate SOURCES.txt manifest filezSOURCES.txtN)rrrnrO�manifest_makerr5rW�ignore_egg_info_dir�manifestr��filelist)r7Zmanifest_filename�mmr0r0r1r�<s
zegg_info.find_sources)F)rIrJrK�description�user_options�boolean_options�negative_optrXrLrY�setterr_rw�PY_MAJORr{r�r|rr�r�r0r0r0r1rO�s$

,

rOcs�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��||�||_dS)N)�super�__init__r�)r7r~�debug_printr�)�	__class__r0r1r�IszFileList.__init__c
	Cs|�|�\}}}}|j|j|j|jt�|j|�t�|j|�|j	|j
d�}dddddddd	d�}y||}Wn$tk
r�td
j
|d���YnX|�d�}	|d
kr�|g}|	r�|fnd}
||}|�d�|g|	r�|gng|��x&|D]}||�s�tj||f|
��q�WdS)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�r0� )Z_parse_template_liner�r��global_include�global_exclude�	functools�partial�recursive_include�recursive_excluder�r��KeyErrorr�format�
startswithr�rnrr~)
r7�liner��patterns�dirZdir_patternZ
action_mapZlog_mapZprocess_actionZaction_is_recursiveZextra_log_argsZlog_tmpl�patternr0r0r1�process_template_lineMsJ



zFileList.process_template_linecCsVd}xLtt|j�ddd�D]2}||j|�r|�d|j|�|j|=d}qW|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�)r7�	predicate�foundr,r0r0r1�
_remove_files�szFileList._remove_filescCs$dd�t|�D�}|�|�t|�S)z#Include files that match 'pattern'.cSsg|]}tj�|�s|�qSr0)rr�isdir)�.0r�r0r0r1�
<listcomp>�sz$FileList.include.<locals>.<listcomp>)r�extendrN)r7r�r�r0r0r1r��s
zFileList.includecCst|�}|�|j�S)z#Exclude files that match 'pattern'.)r2r��match)r7r�r�r0r0r1r��szFileList.excludecCs8tj�|d|�}dd�t|dd�D�}|�|�t|�S)zN
        Include all files anywhere in 'dir/' that match the pattern.
        z**cSsg|]}tj�|�s|�qSr0)rrr�)r�r�r0r0r1r��sz.FileList.recursive_include.<locals>.<listcomp>T)�	recursive)rrrnrr�rN)r7r�r�Zfull_patternr�r0r0r1r��s
zFileList.recursive_includecCs ttj�|d|��}|�|j�S)zM
        Exclude any file anywhere in 'dir/' that match the pattern.
        z**)r2rrrnr�r�)r7r�r�r�r0r0r1r��szFileList.recursive_excludecCs$dd�t|�D�}|�|�t|�S)zInclude all files from 'dir/'.cSs"g|]}tj�|�D]}|�qqSr0)rfr��findall)r�Z	match_dir�itemr0r0r1r��sz"FileList.graft.<locals>.<listcomp>)rr�rN)r7r�r�r0r0r1r��s
zFileList.graftcCsttj�|d��}|�|j�S)zFilter out files from 'dir/'.z**)r2rrrnr�r�)r7r�r�r0r0r1r��szFileList.prunecsJ|jdkr|��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.
        Nz**csg|]}��|�r|�qSr0)r�)r�r�)r�r0r1r��sz+FileList.global_include.<locals>.<listcomp>)�allfilesr�r2rrrnr�rN)r7r�r�r0)r�r1r��s

zFileList.global_includecCsttj�d|��}|�|j�S)zD
        Exclude all files anywhere that match the pattern.
        z**)r2rrrnr�r�)r7r�r�r0r0r1r��szFileList.global_excludecCs8|�d�r|dd�}t|�}|�|�r4|j�|�dS)N�
r�)rAr�
_safe_pathr��append)r7r�rr0r0r1r��s


zFileList.appendcCs|j�t|j|��dS)N)r�r��filterr�)r7�pathsr0r0r1r��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�)r7r0r0r1�_repair�szFileList._repairc	Cs�d}t�|�}|dkr(t�d|�dSt�|d�}|dkrNt�||d�dSy>d|kp^d|k}|jrn|rndStj�|�s�tj�|�r�dSWn&t	k
r�t�||t
���YnXdS)Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFzutf-8z	.egg-infos	.egg-infoT)�
unicode_utils�filesys_decoderr~Z
try_encoder�rrr}�UnicodeEncodeError�sys�getfilesystemencoding)r7rZenc_warnZu_pathZ	utf8_pathZis_egg_infor0r0r1r��s"

zFileList._safe_path)NNF)rIrJrKr�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__r0r0)r�r1rFsM



rc@steZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	e
dd��Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)r�zMANIFEST.incCs"d|_d|_d|_d|_d|_dS)NrF)Zuse_defaultsr�Z
manifest_onlyZforce_manifestr�)r7r0r0r1rXs
z!manifest_maker.initialize_optionscCsdS)Nr0)r7r0r0r1rw szmanifest_maker.finalize_optionscCszt|jd�|_tj�|j�s$|��|��tj�|j	�rB|�
�|��|��|�
�|j��|j��|��dS)N)r�)rr�r�rrr}r��write_manifest�add_defaults�templateZ
read_template�add_license_files�_add_referenced_files�prune_file_list�sortZremove_duplicates)r7r0r0r1r�#s

zmanifest_maker.runcCst�|�}|�tjd�S)N�/)r�r��replacerr)r7rr0r0r1�_manifest_normalize1s
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|]}��|��qSr0)r�)r�r�)r7r0r1r�=sz1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r�r�r�r��executer|)r7r�r�r0)r7r1r�5s

zmanifest_maker.write_manifestcCs|�|�st�||�dS)N)�_should_suppress_warningrr~)r7r�r0r0r1r~As
zmanifest_maker.warncCst�d|�S)z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r r�)r�r0r0r1r�Esz'manifest_maker._should_suppress_warningcCs�t�|�|j�|j�|j�|j�tt��}|rB|j�|�nt	j
�|j�rX|��t	j
�d�rp|j�d�|�
d�}|j�|j�dS)Nzsetup.pyrO)rr�r�r�r�r�r�rr�rrr}Z
read_manifest�get_finalized_commandr�rO)r7ZrcfilesZei_cmdr0r0r1r�Ls


zmanifest_maker.add_defaultscCs8|jjjpg}x|D]}t�d|�qW|j�|�dS)Nzadding license file '%s')r5r�
license_filesrr�r�r�)r7r��lfr0r0r1r�^s
z manifest_maker.add_license_filescCs8t|jdg�}x|D]}t�d|�qW|j�|�dS)zGAdd files referenced by the config (e.g. `file:` directive) to filelistZ_referenced_filesz%adding file referenced by config '%s'N)ror5r�debugr�r�)r7Z
referenced�rfr0r0r1r�ds
z$manifest_maker._add_referenced_filescCsZ|�d�}|j��}|j�|j�|j�|�t�tj	�}|jj
d|d|dd�dS)N�buildz(^|z)(RCS|CVS|\.svn)r)Zis_regex)r�r5�get_fullnamer�r��
build_baser r!rrZexclude_pattern)r7r��base_dirrr0r0r1r�ls

zmanifest_maker.prune_file_listcCs*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/)Zsee_url)�hasattrr�r�emitZget_data_files)r7�build_pyr0r0r1�_safe_data_filesus

zmanifest_maker._safe_data_filesN)rIrJrKr�rXrwr�r�r�r~�staticmethodr�r�r�r�r�r�r0r0r0r1r�s	r�c	Cs8d�|�}|�d�}t|d��}|�|�WdQRXdS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �
zutf-8r�N)rnr�r�r�)r^�contentsr�r0r0r1r|�s

r|c	Cs|t�d|�|jsx|jj}|j|j|_}|j|j|_}z|�	|j
�Wd|||_|_Xt|jdd�}t�
|j
|�dS)Nz
writing %sZzip_safe)rr�r�r5rrVr?rUr8�write_pkg_inforOrorZwrite_safety_flag)�cmd�basenamer^rZoldverZoldname�safer0r0r1r��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.
    Nr0)r�r�r^r0r0r1�warn_depends_obsolete�sr�cCs,t|pd�}dd�}t||�}|�|�dS)Nr0cSs|dS)Nr�r0)r�r0r0r1�	append_cr�sz&_write_requirements.<locals>.append_cr)r�map�
writelines)�stream�reqs�linesr�r0r0r1�_write_requirements�s
rcCsn|j}t��}t||j�|jp"i}x2t|�D]&}|�djft	���t|||�q.W|�
d||���dS)Nz
[{extra}]
rc)r5�io�StringIOrZinstall_requires�extras_require�sortedr�r��varsr��getvalue)r�r�r^�distr�r�extrar0r0r1�write_requirements�s
rcCs,t��}t||jj�|�d||���dS)Nzsetup-requirements)rrrr5Zsetup_requiresr�r)r�r�r^r�r0r0r1�write_setup_requirements�srcCs:t�dd�|j��D��}|�d|d�t|��d�dS)NcSsg|]}|�dd�d�qS)�.rr)r)r��kr0r0r1r��sz(write_toplevel_names.<locals>.<listcomp>ztop-level namesr�)r]�fromkeysr5Ziter_distribution_namesr|rnr)r�r�r^�pkgsr0r0r1�write_toplevel_names�srcCst|||d�dS)NT)�	write_arg)r�r�r^r0r0r1�
overwrite_arg�srFcCsHtj�|�d}t|j|d�}|dk	r4d�|�d}|�||||�dS)Nrr�)rr�splitextror5rnr�)r�r�r^r��argnamerZr0r0r1r�s
rcCs,t�|jj�}t�|�}|�d||d�dS)Nzentry pointsT)rr�r5r��renderr�)r�r�r^ZepsZdefnr0r0r1�
write_entries�s
rcCsBt�|�}t�|�}|�d|�d|p&t��}|r>|d|��7}|S)z0Compute filename of the output egg. Private API.�-z-py)r	rmr�)rUrVryrzr8r?Zeggr0r0r1rx�s

rxc@seZdZdZdS)�EggInfoDeprecationWarningz?Deprecated behavior warning for EggInfo, bypassing suppression.N)rIrJrK�__doc__r0r0r0r1r�sr)F)NN)<r�distutils.filelistrZ	_FileList�distutils.errorsr�distutils.utilrrfrr�rr r�rrFr[Z
_importlibrrrr	�
setuptoolsr
Zsetuptools.command.sdistrrZsetuptools.command.setoptr
Zsetuptools.commandrZsetuptools.unicode_utilsr�Zsetuptools.globrZsetuptools.externrZsetuptools.extern.jaraco.textr�warningsrr��version_infor�r2r3rOr�r|r�r�rrrrrrrrxrr0r0r0r1�<module>sZS*$Qx