CasperSecurity

Current Path : /proc/self/root/lib/python3/dist-packages/setuptools/command/__pycache__/
Upload File :
Current File : //proc/self/root/lib/python3/dist-packages/setuptools/command/__pycache__/egg_info.cpython-310.pyc

o

VD7hf�@s�dZddlmZddlmZddlmZddlm	Z	ddlZddlZddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlmZddlmZdd	lmZdd
lmZddlmZddlmZmZmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%dd
l&m'Z'ddl(m)Z)ddlm*Z*dd�Z+Gdd�d�Z,Gdd�de,e�Z-Gdd�de�ZGdd�de�Z.dd�Z/dd�Z0dd�Z1d d!�Z2d"d#�Z3d$d%�Z4d&d'�Z5d(d)�Z6d3d+d,�Z7d-d.�Z8d/d0�Z9Gd1d2�d2e*�Z:dS)4zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contents�)�FileList)�DistutilsInternalError)�convert_path)�logN)�Command)�sdist)�walk_revctrl)�edit_config)�	bdist_egg)�parse_requirements�	safe_name�
parse_version�safe_version�yield_lines�
EntryPoint�iter_entry_points�to_filename)�glob)�	packaging)�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#�
valid_char�c�chunk�
last_chunk�i�	chunk_len�char�inner_i�inner�
char_class�r7�=/usr/lib/python3/dist-packages/setuptools/command/egg_info.py�translate_pattern#s\


��-�r9c@s@eZdZdZdZedd��Zdd�Zdd�Zdd	�Z	ee	�Z
dS)
�
InfoCommonNcCst|j���S�N)r�distribution�get_name��selfr7r7r8�namezszInfoCommon.namecCst|�|j����Sr;)r�
_maybe_tagr<�get_versionr>r7r7r8�tagged_version~szInfoCommon.tagged_versioncCs |jr|�|j�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�endswith�r?�versionr7r7r8rA�s��zInfoCommon._maybe_tagcCs,d}|jr
||j7}|jr|t�d�7}|S)Nrz-%Y%m%d)�	tag_build�tag_date�time�strftimerFr7r7r8�tags�s
zInfoCommon.tags)�__name__�
__module__�__qualname__rHrI�propertyr@rCrArLrDr7r7r7r8r:vs

r:c@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]rSrVcCs"d|_d|_d|_d|_d|_dS)NF)�egg_base�egg_namerQ�egg_version�broken_egg_infor>r7r7r8�initialize_options�s

zegg_info.initialize_optionscC�dSr;r7r>r7r7r8�tag_svn_revision��zegg_info.tag_svn_revisioncCr]r;r7)r?�valuer7r7r8r^�r_cCs0t��}|��|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.
        rHrrI)rQN)�collections�OrderedDictrLr	�dict)r?�filenamerQr7r7r8�save_version_info�szegg_info.save_version_infoc
CsL|j|_|��|_t|j�}zt|tjj�}|rdnd}t	t
||j|jf��WntyB}z
tj
�d|j|jf�|�d}~ww|jdurV|jj}|pOi�dtj�|_|�d�t|j�d|_|jtjkrstj�|j|j�|_d|jvr||��|j|jj_|jj}|dur�|j|j��kr�|j|_t|j�|_ d|j_dSdSdS)Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%srrX�	.egg-info�-)!r@rYrCrZr
�
isinstancerrG�Version�listr�
ValueError�	distutils�errors�DistutilsOptionErrorrXr<�package_dir�getr!�curdir�ensure_dirnamerrQr"�join�check_broken_egg_info�metadata�
_patched_dist�key�lower�_version�_parsed_version)r?�parsed_version�
is_version�specrR�dirs�pdr7r7r8�finalize_options�sH


��
�����


�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?�whatrd�data�forcer7r7r8�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�rdr��fr7r7r8r�
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?rdr7r7r8r�s�zegg_info.delete_filecCs�|�|j�t�|jd�|jj}td�D]}|j|d�|��}|||j	tj
�|j|j	��qtj
�|jd�}tj
�|�rC|�
|�|��dS)Nzegg_info.writers)�	installerznative_libs.txt)�mkpathrQr!�utimer<�fetch_build_eggr�require�resolver@r"rsr�r��find_sources)r?r��ep�writer�nlr7r7r8�runs
zegg_info.runcCs4tj�|jd�}t|j�}||_|��|j|_dS)z"Generate SOURCES.txt manifest filezSOURCES.txtN)	r!r"rsrQ�manifest_makerr<�manifestr��filelist)r?�manifest_filename�mmr7r7r8r�-s

zegg_info.find_sourcescCsX|jd}|jtjkrtj�|j|�}tj�|�r*t�d||j	�|j	|_
||_	dSdS)NrfaB------------------------------------------------------------------------------
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.
------------------------------------------------------------------------------)rYrXr!rqr"rsr�rr�rQr[)r?�beir7r7r8rt5s
�
�zegg_info.check_broken_egg_infoN�F)rMrNrO�description�user_options�boolean_options�negative_optr\rPr^�setterrer�r�r�r�r�r�rtr7r7r7r8rQ�s&�



1
rQc@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)rc
	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�r7� )�_parse_template_liner�r��global_include�global_exclude�	functools�partial�recursive_include�recursive_excluder�r��KeyErrorr�format�
startswith�debug_printrsrr�)
r?�liner��patterns�dir�dir_pattern�
action_map�log_map�process_action�action_is_recursive�extra_log_args�log_tmpl�patternr7r7r8�process_template_lineHsf�������

������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�foundr1r7r7r8�
_remove_files�s�zFileList._remove_filescC�$dd�t|�D�}|�|�t|�S)z#Include files that match 'pattern'.cS�g|]
}tj�|�s|�qSr7�r!r"�isdir��.0r�r7r7r8�
<listcomp>�sz$FileList.include.<locals>.<listcomp>�r�extend�bool�r?r�r�r7r7r8r��s
zFileList.includecCst|�}|�|j�S)z#Exclude files that match 'pattern'.)r9r��match�r?r�r�r7r7r8r��szFileList.excludecCs8tj�|d|�}dd�t|dd�D�}|�|�t|�S)zN
        Include all files anywhere in 'dir/' that match the pattern.
        rcSr�r7r�r�r7r7r8r��s

�z.FileList.recursive_include.<locals>.<listcomp>T)�	recursive)r!r"rsrr�r�)r?r�r��full_patternr�r7r7r8r��s
zFileList.recursive_includecCs ttj�|d|��}|�|j�S)zM
        Exclude any file anywhere in 'dir/' that match the pattern.
        r�r9r!r"rsr�r�)r?r�r�r�r7r7r8r��szFileList.recursive_excludecCr�)zInclude all files from 'dir/'.cSs"g|]
}tj�|�D]}|�q
qSr7)rlr��findall)r��	match_dir�itemr7r7r8r��s
���z"FileList.graft.<locals>.<listcomp>r�)r?r�r�r7r7r8r��s
�
zFileList.graftcCsttj�|d��}|�|j�S)zFilter out files from 'dir/'.rr�)r?r�r�r7r7r8r��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|�qSr7�r�r�r�r7r8r��sz+FileList.global_include.<locals>.<listcomp>)�allfilesr�r9r!r"rsr�r�r�r7r�r8r��s

zFileList.global_includecCsttj�d|��}|�|j�S)zD
        Exclude all files anywhere that match the pattern.
        rr�r�r7r7r8r��szFileList.global_excludecCs<|�d�r|dd�}t|�}|�|�r|j�|�dSdS)N�
r�)rEr�
_safe_pathr��append)r?r�r"r7r7r8r��s

�zFileList.appendcCs|j�t|j|��dSr;)r�r��filterr�)r?�pathsr7r7r8r��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)rjr�r�r�r>r7r7r8�_repair�szFileList._repairc	Cs�d}t�|�}|durt�d|�dSt�|d�}|dur't�||d�dSztj�|�s4tj�|�r7WdSWdStyLt�||t	�
��YdSw)Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFr�T)�
unicode_utils�filesys_decoderr��
try_encoder!r"r��UnicodeEncodeError�sys�getfilesystemencoding)r?r"�enc_warn�u_path�	utf8_pathr7r7r8r��s 
��zFileList._safe_pathN)rMrNrOr�r�r�r�r�r�r�r�r�r�r�r�r�r�r7r7r7r8rEsM



rc@sleZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	e
dd��Zdd�Zdd�Z
dd�Zdd�ZdS)r�zMANIFEST.incCsd|_d|_d|_d|_dS)Nr)�use_defaultsr��
manifest_only�force_manifestr>r7r7r8r\s
z!manifest_maker.initialize_optionscCr]r;r7r>r7r7r8r�szmanifest_maker.finalize_optionscCslt�|_tj�|j�s|��|��tj�|j�r|�	�|�
�|��|j��|j�
�|��dSr;)rr�r!r"r�r��write_manifest�add_defaults�template�
read_template�add_license_files�prune_file_list�sort�remove_duplicatesr>r7r7r8r�s

zmanifest_maker.runcCst�|�}|�tjd�S)N�/)r�r��replacer!r#)r?r"r7r7r8�_manifest_normalize&s
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|]}��|��qSr7)r�r�r>r7r8r�2sz1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r�r�r�r��executer�)r?r��msgr7r>r8r�*s

zmanifest_maker.write_manifestcCs|�|�s
t�||�dSdSr;)�_should_suppress_warningrr�)r?rr7r7r8r�6s
�zmanifest_maker.warncCst�d|�S)z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r$r�)rr7r7r8r: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.pyrQ)rr�r�r�r�r�rjrr�r!r"r��
read_manifest�get_finalized_commandr�rQ)r?�rcfiles�ei_cmdr7r7r8r�As


zmanifest_maker.add_defaultscCs4|jjjpg}|D]}t�d|�q	|j�|�dS)Nzadding license file '%s')r<ru�
license_filesrr�r�r�)r?r�lfr7r7r8r�Ss
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)�is_regex)rr<�get_fullnamer�r��
build_baser$r%r!r#�exclude_pattern)r?r�base_dirr#r7r7r8r�Zs


�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�r�get_data_files)r?�build_pyr7r7r8�_safe_data_filescs

�zmanifest_maker._safe_data_filesN)rMrNrOr�r\r�r�r�r�r��staticmethodrr�r�r�rr7r7r7r8r�
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)rsr�r�r�)rd�contentsr�r7r7r8r�ys


"�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<rurZrGrYr@�write_pkg_inforQ�getattrr
�write_safety_flag)�cmd�basenamerdru�oldver�oldname�safer7r7r8r�s �rcCstj�|�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��rrrdr7r7r8�warn_depends_obsolete�s
��r!cCs0t|pd�}dd�}t|t|��}|�|�dS)Nr7cSs|dS)Nrr7)r�r7r7r8�	append_cr�sz&_write_requirements.<locals>.append_cr)r�map�sorted�
writelines)�stream�reqs�linesr"r7r7r8�_write_requirements�sr)cCsn|j}t��}t||j�|jpi}t|�D]}|�djdit	����t|||�q|�
d||���dS)Nz
[{extra}]
�requirementsr7)r<�io�StringIOr)�install_requires�extras_requirer$r�r��varsr��getvalue)rrrd�distr�r.�extrar7r7r8�write_requirements�s
r3cCs,t��}t||jj�|�d||���dS)Nzsetup-requirements)r+r,r)r<�setup_requiresr�r0)rrrdr�r7r7r8�write_setup_requirements�sr5cCs:t�dd�|j��D��}|�d|d�t|��d�dS)NcSsg|]
}|�dd�d�qS)�.rr)r )r��kr7r7r8r��s��z(write_toplevel_names.<locals>.<listcomp>ztop-level namesr)rc�fromkeysr<�iter_distribution_namesr�rsr$)rrrd�pkgsr7r7r8�write_toplevel_names�s�� r;cCst|||d�dS)NT)�	write_argr r7r7r8�
overwrite_arg�sr=FcCsHtj�|�d}t|j|d�}|durd�|�d}|�||||�dS)Nrr)r!r"�splitextrr<rsr�)rrrdr��argnamer`r7r7r8r<�s
r<cCs�|jj}t|t�s
|dur|}n6|durFg}t|���D]$\}}t|t�s7t�||�}d�tt	t|�
����}|�d||f�qd�|�}|�d||d�dS)Nrz	[%s]
%s

rzentry pointsT)
r<�entry_pointsrh�strr$�itemsr�parse_grouprsr#�valuesr�r�)rrrdr�r��sectionrr7r7r8�
write_entries�s

rFcCs�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)rr��EggInfoDeprecationWarningr!r"r�r+r�r$r��int�group)r�r�r�r7r7r8�get_pkg_info_revision�s ���
��rJc@seZdZdZdS)rGz?Deprecated behavior warning for EggInfo, bypassing suppression.N)rMrNrO�__doc__r7r7r7r8rG�srGr�);rK�distutils.filelistr�	_FileList�distutils.errorsr�distutils.utilrrlrr�r!r$r�r+rrJra�
setuptoolsr�setuptools.command.sdistrr�setuptools.command.setoptr	�setuptools.commandr
�
pkg_resourcesrrr
rrrrr�setuptools.unicode_utilsr��setuptools.globr�setuptools.externrrr9r:rQr�r�rr!r)r3r5r;r=r<rFrJrGr7r7r7r8�<module>sX(S1Il
	


Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY