£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
B
    Reb                 @   s  d Z ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZmZmZm Z m!Z!m"Z"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) ddlm*Z* dd Z+G dd dZ,G dd de,eZ-G dd deZG dd deZ.dd Z/dd Z0dd Z1d d! Z2d"d# Z3d$d% Z4d&d' Z5d(d) Z6d3d+d,Z7d-d. Z8d/d0 Z9G d1d2 d2e*Z:dS )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)SetuptoolsDeprecationWarningc             C   s  d}|  tjj}ttj}d|f }xt|D ]\}}|t|d k}|dkrv|rd|d7 }q4|d||f 7 }q4d}t|}	x:||	k r|| }
|
dkr||d 7 }n|
d	kr||7 }n|
d
kr|d }||	k r|| dkr|d }||	k r|| dkr|d }x&||	k r6|| dkr6|d }qW ||	krR|t|
7 }nR||d | }d}|d dkrd}|dd }|t|7 }|d|f 7 }|}n|t|
7 }|d7 }qW |s4||7 }q4W |d7 }tj|tj	tj
B d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chunksr"   Z
valid_charcchunk
last_chunkiZ	chunk_lencharZinner_iinner
char_class r3   /builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/command/egg_info.pytranslate_pattern#   sV    




r5   c               @   s@   e Zd ZdZdZedd Zdd Zdd Zdd	 Z	ee	Z
dS )

InfoCommonNc             C   s   t | j S )N)r   distributionget_name)selfr3   r3   r4   namez   s    zInfoCommon.namec             C   s   t | | j S )N)r   
_maybe_tagr7   get_version)r9   r3   r3   r4   tagged_version~   s    zInfoCommon.tagged_versionc             C   s    | j r|| j r|S || j  S )z
        egg_info may be called more than once for a distribution,
        in which case the version string already contains all tags.
        )vtagsendswith)r9   versionr3   r3   r4   r;      s    zInfoCommon._maybe_tagc             C   s,   d}| j r|| j 7 }| jr(|td7 }|S )Nr   z-%Y%m%d)	tag_buildtag_datetimestrftime)r9   r@   r3   r3   r4   tags   s    
zInfoCommon.tags)__name__
__module____qualname__rA   rB   propertyr:   r=   r;   rE   r>   r3   r3   r3   r4   r6   v   s   
r6   c               @   s   e Zd ZdZddddgZdgZddiZdd	 Zed
d Z	e	j
dd Z	dd Zdd ZdddZdd Zdd Zdd Zdd Zdd ZdS ) egg_infoz+create a distribution's .egg-info directory)z	egg-base=ezLdirectory containing .egg-info directories (default: top of the source tree))ztag-datedz0Add date stamp (e.g. 20050528) to version number)z
tag-build=bz-Specify explicit tag to add to version number)zno-dateDz"Don't include date stamp [default]ztag-datezno-datec             C   s"   d | _ d | _d | _d | _d| _d S )NF)egg_baseegg_namerJ   egg_versionbroken_egg_info)r9   r3   r3   r4   initialize_options   s
    zegg_info.initialize_optionsc             C   s   d S )Nr3   )r9   r3   r3   r4   tag_svn_revision   s    zegg_info.tag_svn_revisionc             C   s   d S )Nr3   )r9   valuer3   r3   r4   rT      s    c             C   s0   t  }|  |d< d|d< t|t|d dS )z
        Materialize the value of date into the
        build tag. Install build keys in a deterministic order
        to avoid arbitrary reordering on subsequent builds.
        rA   r   rB   )rJ   N)collectionsOrderedDictrE   r	   dict)r9   filenamerJ   r3   r3   r4   save_version_info   s    zegg_info.save_version_infoc          
   C   sT  | j | _|  | _t| j}y6t|tjj}|r4dnd}t	t
|| j| jf  W n< tk
r } ztjd| j| jf |W d d }~X Y nX | jd kr| jj}|pi dtj| _| d t| jd | _| jtjkrtj| j| j| _d| jkr|   | j| jj_| jj}|d k	rP|j| j krP| j|_t| j|_ d | j_d S )Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%sr   rO   z	.egg-info-)!r:   rP   r=   rQ   r   
isinstancer   r@   Versionlistr   
ValueError	distutilserrorsDistutilsOptionErrorrO   r7   package_dirgetr    curdirensure_dirnamer   rJ   r!   joincheck_broken_egg_infometadataZ_patched_distkeylower_version_parsed_version)r9   parsed_versionZ
is_versionspecrK   dirspdr3   r3   r4   finalize_options   s8    



zegg_info.finalize_optionsFc             C   sL   |r|  ||| n4tj|rH|dkr>|s>td|| dS | | dS )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)r9   whatrY   dataforcer3   r3   r4   write_or_delete_file   s    	
zegg_info.write_or_delete_filec             C   s>   t d|| |d}| js:t|d}|| |  dS )zWrite `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.
        zwriting %s to %szutf-8wbN)r   infoencodedry_runopenwriteclose)r9   rw   rY   rx   fr3   r3   r4   rs   
  s    


zegg_info.write_filec             C   s    t d| | jst| dS )z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)r   r|   r~   r    unlink)r9   rY   r3   r3   r4   rv     s    zegg_info.delete_filec             C   s   |  | j t| jd  | jj}x@tdD ]4}|j|d | }|| |j	tj
| j|j	 q,W tj
| jd}tj
|r| | |   d S )Nzegg_info.writers)	installerznative_libs.txt)mkpathrJ   r    utimer7   Zfetch_build_eggr   requireresolver:   r!   rg   rt   rv   find_sources)r9   r   epwriternlr3   r3   r4   run  s     
zegg_info.runc             C   s4   t j| jd}t| j}||_|  |j| _dS )z"Generate SOURCES.txt manifest filezSOURCES.txtN)	r    r!   rg   rJ   manifest_makerr7   manifestr   filelist)r9   Zmanifest_filenamemmr3   r3   r4   r   -  s
    
zegg_info.find_sourcesc             C   sT   | j d }| jtjkr&tj| j|}tj|rPtd|| j	 | j	| _
|| _	d S )Nz	.egg-infoaB  ------------------------------------------------------------------------------
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.
------------------------------------------------------------------------------)rP   rO   r    re   r!   rg   rt   r   ru   rJ   rR   )r9   Zbeir3   r3   r4   rh   5  s    

zegg_info.check_broken_egg_infoN)F)rF   rG   rH   descriptionuser_optionsboolean_optionsnegative_optrS   rI   rT   setterrZ   rr   rz   rs   rv   r   r   rh   r3   r3   r3   r4   rJ      s$   
1
rJ   c               @   s|   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd ZdS )r   c          	   C   s  |  |\}}}}| j| j| j| jt| j|t| j|| j	| j
d}dddddddd	d}y|| }W n$ tk
r   td
j|dY nX |d}	|dkr|g}|	r|fnd}
|| }| d|g|	r|gng  |  x&|D ]}||stj||f|
  qW d S )N)includeexcludezglobal-includezglobal-excludezrecursive-includezrecursive-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   r3    )Z_parse_template_liner   r   global_includeglobal_exclude	functoolspartialrecursive_includerecursive_excluder   r   KeyErrorr   format
startswithdebug_printrg   r   ru   )r9   liner   patternsdirZdir_patternZ
action_mapZlog_mapZprocess_actionZaction_is_recursiveZextra_log_argsZlog_tmplpatternr3   r3   r4   process_template_lineH  sJ    



zFileList.process_template_linec             C   sV   d}xLt t| jd ddD ]2}|| j| r| d| j|   | j|= d}qW |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   )r9   	predicatefoundr/   r3   r3   r4   _remove_files  s    zFileList._remove_filesc             C   s$   dd t |D }| | t|S )z#Include files that match 'pattern'.c             S   s   g | ]}t j|s|qS r3   )r    r!   isdir).0r   r3   r3   r4   
<listcomp>  s    z$FileList.include.<locals>.<listcomp>)r   extendbool)r9   r   r   r3   r3   r4   r     s    
zFileList.includec             C   s   t |}| |jS )z#Exclude files that match 'pattern'.)r5   r   match)r9   r   r   r3   r3   r4   r     s    zFileList.excludec             C   s8   t j|d|}dd t|ddD }| | t|S )zN
        Include all files anywhere in 'dir/' that match the pattern.
        z**c             S   s   g | ]}t j|s|qS r3   )r    r!   r   )r   r   r3   r3   r4   r     s    z.FileList.recursive_include.<locals>.<listcomp>T)	recursive)r    r!   rg   r   r   r   )r9   r   r   Zfull_patternr   r3   r3   r4   r     s    
zFileList.recursive_includec             C   s    t tj|d|}| |jS )zM
        Exclude any file anywhere in 'dir/' that match the pattern.
        z**)r5   r    r!   rg   r   r   )r9   r   r   r   r3   r3   r4   r     s    zFileList.recursive_excludec             C   s$   dd t |D }| | t|S )zInclude all files from 'dir/'.c             S   s"   g | ]}t j|D ]}|qqS r3   )r`   r   findall)r   Z	match_diritemr3   r3   r4   r     s   z"FileList.graft.<locals>.<listcomp>)r   r   r   )r9   r   r   r3   r3   r4   r     s    
zFileList.graftc             C   s   t tj|d}| |jS )zFilter out files from 'dir/'.z**)r5   r    r!   rg   r   r   )r9   r   r   r3   r3   r4   r     s    zFileList.prunec                sJ   | j dkr|   ttjd|  fdd| j D }| | t|S )z
        Include all files anywhere in the current directory that match the
        pattern. This is very inefficient on large file trees.
        Nz**c                s   g | ]}  |r|qS r3   )r   )r   r   )r   r3   r4   r     s    z+FileList.global_include.<locals>.<listcomp>)allfilesr   r5   r    r!   rg   r   r   )r9   r   r   r3   )r   r4   r     s    

zFileList.global_includec             C   s   t tjd|}| |jS )zD
        Exclude all files anywhere that match the pattern.
        z**)r5   r    r!   rg   r   r   )r9   r   r   r3   r3   r4   r     s    zFileList.global_excludec             C   s8   | dr|d d }t|}| |r4| j| d S )Nr   )r?   r   
_safe_pathr   append)r9   r   r!   r3   r3   r4   r     s
    

zFileList.appendc             C   s   | j t| j| d S )N)r   r   filterr   )r9   pathsr3   r3   r4   r     s    zFileList.extendc             C   s   t t| j| j| _dS )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   )r9   r3   r3   r4   _repair  s    zFileList._repairc          	   C   s   d}t |}|d kr(td|  dS t |d}|d krNt||d dS y tj|shtj|rldS W n& tk
r   t||t	
  Y nX d S )Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFzutf-8T)unicode_utilsfilesys_decoder   ru   Z
try_encoder    r!   rt   UnicodeEncodeErrorsysgetfilesystemencoding)r9   r!   Zenc_warnZu_pathZ	utf8_pathr3   r3   r4   r     s    
zFileList._safe_pathN)rF   rG   rH   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r3   r3   r3   r4   r   E  s   M


r   c               @   sd   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	e
dd Zdd Zdd Zdd ZdS )r   zMANIFEST.inc             C   s   d| _ d| _d| _d| _d S )Nr   )Zuse_defaultsr   Zmanifest_onlyZforce_manifest)r9   r3   r3   r4   rS     s    z!manifest_maker.initialize_optionsc             C   s   d S )Nr3   )r9   r3   r3   r4   rr     s    zmanifest_maker.finalize_optionsc             C   sl   t  | _tj| js|   |   tj| jr<| 	  | 
  |   | j  | j  |   d S )N)r   r   r    r!   rt   r   write_manifestadd_defaultstemplateZread_templateadd_license_filesprune_file_listsortZremove_duplicates)r9   r3   r3   r4   r     s    

zmanifest_maker.runc             C   s   t |}|tjdS )N/)r   r   replacer    r"   )r9   r!   r3   r3   r4   _manifest_normalize&  s    
z"manifest_maker._manifest_normalizec                sB    j    fdd j jD }d j } t j|f| dS )zo
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        c                s   g | ]}  |qS r3   )r   )r   r   )r9   r3   r4   r   2  s    z1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r   r   r   r   executers   )r9   r   msgr3   )r9   r4   r   *  s    

zmanifest_maker.write_manifestc             C   s   |  |st| | d S )N)_should_suppress_warningr   ru   )r9   r   r3   r3   r4   ru   6  s    
zmanifest_maker.warnc             C   s   t d| S )z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r#   r   )r   r3   r3   r4   r   :  s    z'manifest_maker._should_suppress_warningc             C   s   t |  | j| j | j| j tt }|rB| j| nt	j
| jrX|   t	j
drp| jd | d}| j|j d S )Nzsetup.pyrJ   )r   r   r   r   r   r   r^   r   r   r    r!   rt   Zread_manifestget_finalized_commandr   rJ   )r9   ZrcfilesZei_cmdr3   r3   r4   r   A  s    


zmanifest_maker.add_defaultsc             C   s8   | j jjpg }x|D ]}td| qW | j| d S )Nzadding license file '%s')r7   ri   license_filesr   r|   r   r   )r9   r   lfr3   r3   r4   r   S  s
    
z manifest_maker.add_license_filesc             C   sZ   |  d}| j }| j|j | j| ttj	}| jj
d| d | dd d S )Nbuildz(^|z)(RCS|CVS|\.svn)r   )Zis_regex)r   r7   get_fullnamer   r   
build_baser#   r$   r    r"   Zexclude_pattern)r9   r   base_dirr"   r3   r3   r4   r   Z  s    

zmanifest_maker.prune_file_listN)rF   rG   rH   r   rS   rr   r   r   r   ru   staticmethodr   r   r   r   r3   r3   r3   r4   r     s   r   c          	   C   s8   d |}|d}t| d}|| W dQ R X dS )z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    
zutf-8r{   N)rg   r}   r   r   )rY   contentsr   r3   r3   r4   rs   d  s    

rs   c          	   C   s|   t d| | jsx| jj}| j|j |_}| j|j |_}z|	| j
 W d || |_|_X t| jdd }t| j
| d S )Nz
writing %sZzip_safe)r   r|   r~   r7   ri   rQ   r@   rP   r:   write_pkg_inforJ   getattrr
   Zwrite_safety_flag)cmdbasenamerY   ri   ZoldverZoldnamesafer3   r3   r4   r   q  s    r   c             C   s   t j|rtd d S )NzsWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.)r    r!   rt   r   ru   )r   r   rY   r3   r3   r4   warn_depends_obsolete  s    r   c             C   s,   t |pd}dd }t||}| | d S )Nr3   c             S   s   | d S )Nr   r3   )r   r3   r3   r4   	append_cr  s    z&_write_requirements.<locals>.append_cr)r   map
writelines)streamreqslinesr   r3   r3   r4   _write_requirements  s    
r   c             C   sn   | j }t }t||j |jp"i }x2t|D ]&}|djf t	  t|||  q.W | 
d||  d S )Nz
[{extra}]
requirements)r7   ioStringIOr   Zinstall_requiresextras_requiresortedr   r   varsrz   getvalue)r   r   rY   distrx   r   extrar3   r3   r4   write_requirements  s    
r   c             C   s,   t  }t|| jj | d||  d S )Nzsetup-requirements)r   r   r   r7   Zsetup_requiresrz   r   )r   r   rY   rx   r3   r3   r4   write_setup_requirements  s    r   c             C   s:   t dd | j D }| d|dt|d  d S )Nc             S   s   g | ]}| d dd qS ).r   r   )r   )r   kr3   r3   r4   r     s   z(write_toplevel_names.<locals>.<listcomp>ztop-level namesr   )rX   fromkeysr7   Ziter_distribution_namesrs   rg   r   )r   r   rY   pkgsr3   r3   r4   write_toplevel_names  s    r   c             C   s   t | ||d d S )NT)	write_arg)r   r   rY   r3   r3   r4   overwrite_arg  s    r   Fc             C   sH   t j|d }t| j|d }|d k	r4d|d }| |||| d S )Nr   r   )r    r!   splitextr   r7   rg   rz   )r   r   rY   ry   argnamerU   r3   r3   r4   r     s
    r   c             C   s   | j j}t|ts|d kr |}np|d k	rg }xXt| D ]H\}}t|tspt||}dtt	t|
 }|d||f  q:W d|}| d||d d S )Nr   z	[%s]
%s

r   zentry pointsT)r7   Zentry_pointsr\   strr   itemsr   parse_grouprg   r   valuesr   rz   )r   r   rY   r   rx   sectionr   r3   r3   r4   write_entries  s    

r  c           	   C   s^   t dt tjdrZtd2} x*| D ]"}t	d|}|r*t
|dS q*W W dQ R X dS )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.zPKG-INFOzVersion:.*-r(\d+)\s*$r   Nr   )warningsru   EggInfoDeprecationWarningr    r!   rt   r   r   r#   r   intgroup)r   r   r   r3   r3   r4   get_pkg_info_revision  s    
r  c               @   s   e Zd ZdZdS )r  z?Deprecated behavior warning for EggInfo, bypassing suppression.N)rF   rG   rH   __doc__r3   r3   r3   r4   r    s   r  )F);r	  distutils.filelistr   Z	_FileListdistutils.errorsr   distutils.utilr   r`   r   r   r    r#   r   r   r  rC   rV   
setuptoolsr   Zsetuptools.command.sdistr   r   Zsetuptools.command.setoptr	   Zsetuptools.commandr
   pkg_resourcesr   r   r   r   r   r   r   r   Zsetuptools.unicode_utilsr   Zsetuptools.globr   Zsetuptools.externr   r   r5   r6   rJ   r   rs   r   r   r   r   r   r   r   r   r  r  r  r3   r3   r3   r4   <module>   sV   (S 1 IW	

