HEX
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: ws67385642 (67385642)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/setuptools/command/__pycache__/egg_info.cpython-39.pyc
a

i�5h�a�@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}|dkrr|r`|d7}q0|d||f7}q0d}t|�}	||	k�r�||}
|
dkr�||d7}�n|
d	kr�||7}n�|
d
k�r�|d}||	kr�||dkr�|d}||	k�r||dk�r|d}||	k�r,||dk�r,|d}�q||	k�rF|t�|
�7}nR||d|�}d}
|ddk�rxd
}
|dd�}|
t�|�7}
|d|
f7}|}n|t�|
�7}|d7}q~|s0||7}q0|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)rZpatZchunksr#Z
valid_char�c�chunkZ
last_chunk�iZ	chunk_len�charZinner_i�innerZ
char_class�r0�=/usr/lib/python3/dist-packages/setuptools/command/egg_info.py�translate_pattern#sV







r2c@s@eZdZdZdZedd��Zdd�Zdd�Zdd	�Z	ee	�Z
dS)
�
InfoCommonNcCst|j���S�N)r�distributionZget_name��selfr0r0r1�namezszInfoCommon.namecCst|�|j����Sr4)r�
_maybe_tagr5Zget_versionr6r0r0r1�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�r7�versionr0r0r1r9�s�zInfoCommon._maybe_tagcCs,d}|jr||j7}|jr(|t�d�7}|S)Nrz-%Y%m%d)�	tag_build�tag_date�time�strftimer=r0r0r1�tags�s
zInfoCommon.tags)�__name__�
__module__�__qualname__r?r@�propertyr8r:r9rCr;r0r0r0r1r3vs

r3c@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]rJrMcCs"d|_d|_d|_d|_d|_dS)NF)�egg_base�egg_namerH�egg_version�broken_egg_infor6r0r0r1�initialize_options�s
zegg_info.initialize_optionscCsdSr4r0r6r0r0r1�tag_svn_revision�szegg_info.tag_svn_revisioncCsdSr4r0)r7�valuer0r0r1rT�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.
        r?rr@)rHN)�collections�OrderedDictrCr	�dict)r7�filenamerHr0r0r1�save_version_info�szegg_info.save_version_infoc
CsV|j|_|��|_t|j�}z6t|tjj�}|r4dnd}t	t
||j|jf��Wn>ty�}z&tj
�d|j|jf�|�WYd}~n
d}~00|jdur�|jj}|p�i�dtj�|_|�d�t|j�d|_|jtjkr�tj�|j|j�|_d|jv�r|��|j|jj_|jj}|du�rR|j|j��k�rR|j|_t|j�|_ d|j_dS)Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%srrO�	.egg-info�-)!r8rPr:rQr
�
isinstancerr>ZVersion�listr�
ValueError�	distutils�errorsZDistutilsOptionErrorrOr5Zpackage_dir�getr!�curdirZensure_dirnamerrHr"�join�check_broken_egg_info�metadataZ
_patched_dist�key�lowerZ_versionZ_parsed_version)r7Zparsed_versionZ
is_version�specrI�dirsZpdr0r0r1�finalize_options�sB


��
���

zegg_info.finalize_optionsFcCsL|r|�|||�n4tj�|�rH|dur>|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_filer!r"�existsr�warn�delete_file)r7�whatrY�data�forcer0r0r1�write_or_delete_file�s	�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 %s�utf-8�wbN)r�info�encode�dry_run�open�write�close)r7rprYrq�fr0r0r1rl
s


zegg_info.write_filecCs t�d|�|jst�|�dS)z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)rrvrxr!�unlink)r7rYr0r0r1roszegg_info.delete_filecCs�|�|j�t�|jd�|jj}td�D]4}|j|d�|��}|||j	tj
�|j|j	��q*tj
�|jd�}tj
�|�r�|�
|�|��dS)Nzegg_info.writers)�	installerznative_libs.txt)ZmkpathrHr!�utimer5Zfetch_build_eggrZrequireZresolver8r"rdrmro�find_sources)r7r~�ep�writer�nlr0r0r1�runs
zegg_info.runcCs4tj�|jd�}t|j�}||_|��|j|_dS)z"Generate SOURCES.txt manifest filezSOURCES.txtN)	r!r"rdrH�manifest_makerr5�manifestr��filelist)r7Zmanifest_filenameZmmr0r0r1r�-s

zegg_info.find_sourcescCsT|jd}|jtjkr&tj�|j|�}tj�|�rPt�d||j	�|j	|_
||_	dS)Nr[aB------------------------------------------------------------------------------
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.
------------------------------------------------------------------------------)rPrOr!rcr"rdrmrrnrHrR)r7Zbeir0r0r1re5s
�zegg_info.check_broken_egg_infoN)F)rDrErFZdescriptionZuser_optionsZboolean_optionsZnegative_optrSrGrT�setterrZrkrsrlror�r�rer0r0r0r1rH�s$�



1

rHc@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||}Wn"ty�td
j
|d���Yn0|�d�}	|d
vr�|g}|	r�|fnd}
||}|�d�|g|	r�|gng|��|D] }||�s�tj||g|
�R�q�dS)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�
startswith�debug_printrdrrn)
r7�liner�Zpatterns�dirZdir_patternZ
action_mapZlog_mapZprocess_actionZaction_is_recursiveZextra_log_argsZlog_tmpl�patternr0r0r1�process_template_lineHs`������
	
����zFileList.process_template_linecCsRd}tt|j�ddd�D]2}||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�)r7Z	predicate�foundr-r0r0r1�
_remove_files�szFileList._remove_filescCs$dd�t|�D�}|�|�t|�S)z#Include files that match 'pattern'.cSsg|]}tj�|�s|�qSr0�r!r"�isdir��.0r|r0r0r1�
<listcomp>��z$FileList.include.<locals>.<listcomp>�r�extend�bool�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.
        rcSsg|]}tj�|�s|�qSr0r�r�r0r0r1r��s�z.FileList.recursive_include.<locals>.<listcomp>T)�	recursive)r!r"rdrr�r�)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.
        r�r2r!r"rdr�r�)r7r�r�r�r0r0r1r��szFileList.recursive_excludecCs$dd�t|�D�}|�|�t|�S)zInclude all files from 'dir/'.cSs"g|]}tj�|�D]}|�qqSr0)r`r��findall)r�Z	match_dir�itemr0r0r1r��s�z"FileList.graft.<locals>.<listcomp>r�)r7r�r�r0r0r1r��s
�
zFileList.graftcCsttj�|d��}|�|j�S)zFilter out files from 'dir/'.rr�)r7r�r�r0r0r1r��szFileList.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|�qSr0�r�r�r�r0r1r��r�z+FileList.global_include.<locals>.<listcomp>)Zallfilesr�r2r!r"rdr�r�r�r0r�r1r��s

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


zFileList.appendcCs|j�t|j|��dSr4)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)r^r�r�r�r6r0r0r1�_repair�szFileList._repairc	Cs�d}t�|�}|dur(t�d|�dSt�|d�}|durNt�||d�dSz"tj�|�shtj�|�rnWdSWn$ty�t�||t	�
��Yn0dS)Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFrtT)�
unicode_utils�filesys_decoderrnZ
try_encoder!r"rm�UnicodeEncodeError�sys�getfilesystemencoding)r7r"Zenc_warnZu_pathZ	utf8_pathr0r0r1r��s

zFileList._safe_pathN)rDrErFr�r�r�r�r�r�r�r�r�r�r�r�r�r�r0r0r0r1rEsM



rc@s\eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	e
dd��Zdd�Zdd�Z
dS)r�zMANIFEST.incCsd|_d|_d|_d|_dS)Nr)Zuse_defaultsr�Z
manifest_onlyZforce_manifestr6r0r0r1rSsz!manifest_maker.initialize_optionscCsdSr4r0r6r0r0r1rkszmanifest_maker.finalize_optionscCsdt�|_tj�|j�s|��|��tj�|j�r<|�	�|�
�|j��|j��|��dSr4)
rr�r!r"rmr��write_manifest�add_defaults�templateZ
read_template�prune_file_list�sortZremove_duplicatesr6r0r0r1r�s

zmanifest_maker.runcCst�|�}|�tjd�S)N�/)r�r��replacer!r#)r7r"r0r0r1�_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|]}��|��qSr0)r�r�r6r0r1r�1r�z1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r�r�r�r�Zexecuterl)r7r��msgr0r6r1r�)s

zmanifest_maker.write_manifestcCs|�|�st�||�dSr4)�_should_suppress_warningrrn)r7r�r0r0r1rn5s
zmanifest_maker.warncCst�d|�S)z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r$r�)r�r0r0r1r�9sz'manifest_maker._should_suppress_warningcCs�t�|�|��|j�|j�|j�|j�tt��}|rJ|j�	|�nt
j�|j�r`|�
�t
j�d�rx|j�d�|�d�}|j�|j�dS)Nzsetup.pyrH)rr�Z
check_licenser�r�r�r�r^rr�r!r"rmZ
read_manifest�get_finalized_commandr�rH)r7ZrcfilesZei_cmdr0r0r1r�@s


zmanifest_maker.add_defaultscCsZ|�d�}|j��}|j�|j�|j�|�t�tj	�}|jj
d|d|dd�dS)N�buildz(^|z)(RCS|CVS|\.svn)r)Zis_regex)r�r5Zget_fullnamer�r�Z
build_baser$r%r!r#Zexclude_pattern)r7r�Zbase_dirr#r0r0r1r�Ss

�zmanifest_maker.prune_file_listN)rDrErFr�rSrkr�r�r�rn�staticmethodr�r�r�r0r0r0r1r�
s
r�cCsLd�|�}|�d�}t|d��}|�|�Wd�n1s>0YdS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �
rtruN)rdrwryrz)rY�contentsr|r0r0r1rl]s

rlc	Cs�t�d|�|js�|jj}|j|j|_}|j|j|_}z|�	|j
�W|||_|_n|||_|_0t|jdd�}t�
|j
|�dS)Nz
writing %sZzip_safe)rrvrxr5rfrQr>rPr8�write_pkg_inforH�getattrr
Zwrite_safety_flag)�cmd�basenamerYrfZoldverZoldnameZsafer0r0r1r�js r�cCstj�|�rt�d�dS)NzsWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.)r!r"rmrrn�r�r�rYr0r0r1�warn_depends_obsolete}s�r�cCs0t|pd�}dd�}t|t|��}|�|�dS)Nr0cSs|dS)Nr�r0)r�r0r0r1�	append_cr�sz&_write_requirements.<locals>.append_cr)r�map�sorted�
writelines)�streamZreqs�linesr�r0r0r1�_write_requirements�sr�cCsn|j}t��}t||j�|jp"i}t|�D]*}|�djfit	����t|||�q,|�
d||���dS)Nz
[{extra}]
Zrequirements)r5�io�StringIOr�Zinstall_requires�extras_requirer�rzr��varsrs�getvalue)r�r�rYZdistrqr�Zextrar0r0r1�write_requirements�s
r�cCs,t��}t||jj�|�d||���dS)Nzsetup-requirements)r�r�r�r5Zsetup_requiresrsr�)r�r�rYrqr0r0r1�write_setup_requirements�sr�cCs:t�dd�|j��D��}|�d|d�t|��d�dS)NcSsg|]}|�dd�d�qS)�.rr)r )r��kr0r0r1r��s�z(write_toplevel_names.<locals>.<listcomp>ztop-level namesr�)rX�fromkeysr5Ziter_distribution_namesrlrdr�)r�r�rYZpkgsr0r0r1�write_toplevel_names�s��r�cCst|||d�dS)NT)�	write_argr�r0r0r1�
overwrite_arg�sr�FcCsHtj�|�d}t|j|d�}|dur4d�|�d}|�||||�dS)Nrr�)r!r"�splitextr�r5rdrs)r�r�rYrr�argnamerUr0r0r1r��s
r�cCs�|jj}t|t�s|dur |}nl|dur�g}t|���D]H\}}t|t�snt�||�}d�tt	t|�
����}|�d||f�q8d�|�}|�d||d�dS)Nr�z	[%s]
%s

rzentry pointsT)
r5Zentry_pointsr]�strr��itemsrZparse_grouprdr��valuesr�rs)r�r�rYr�rqZsectionr�r0r0r1�
write_entries�s

r�cCs�t�dt�tj�d�r|t�d��J}|D]4}t�	d|�}|r(t
|�d��Wd�Sq(Wd�n1sr0YdS)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)�warningsrn�EggInfoDeprecationWarningr!r"rmr�ryr$r��int�group)r|r�r�r0r0r1�get_pkg_info_revision�s�@r�c@seZdZdZdS)r�z?Deprecated behavior warning for EggInfo, bypassing suppression.N)rDrErF�__doc__r0r0r0r1r��sr�)F);r�Zdistutils.filelistrZ	_FileListZdistutils.errorsrZdistutils.utilrr`rr�r!r$r�r�r�rArVZ
setuptoolsrZsetuptools.command.sdistrrZsetuptools.command.setoptr	Zsetuptools.commandr
Z
pkg_resourcesrrr
rrrrrZsetuptools.unicode_utilsr�Zsetuptools.globrZsetuptools.externrrr2r3rHr�rlr�r�r�r�r�r�r�r�r�r�r�r0r0r0r1�<module>sV(S1IP