o
    Ëý°jf  ã                   @   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 }t|ƒD ]È\}}|t|ƒd k}|dkr8|r/|d7 }n|d||f 7 }qd}t|ƒ}	||	k rÚ|| }
|
dkrQ||d 7 }n�|
d	krZ||7 }nx|
d
krË|d }||	k rp|| dkrp|d }||	k r~|| dkr~|d }||	k r–|| dkr–|d }||	k r–|| dksˆ||	kr¢|t |
¡7 }n0||d |… }d}|d dkrºd}|dd… }|t |¡7 }|d|f 7 }|}n|t |
¡7 }|d7 }||	k sB|sà||7 }q|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
(?:%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   úŽ/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/setuptools/command/egg_info.pyÚtranslate_pattern#   s\   


ÿÖ-€r9   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©Úselfr7   r7   r8   Únamez   s   zInfoCommon.namec                 C   s   t |  | j ¡ ¡ƒS r;   )r   Ú
_maybe_tagr<   Úget_versionr>   r7   r7   r8   Ú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©r?   Úversionr7   r7   r8   rA   �   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ÚstrftimerF   r7   r7   r8   Útags‹   s   
zInfoCommon.tags)Ú__name__Ú
__module__Ú__qualname__rH   rI   Úpropertyr@   rC   rA   rL   rD   r7   r7   r7   r8   r:   v   s    

r:   c                   @   sŠ   e Zd ZdZg d¢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))ú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]rS   rV   c                 C   s"   d | _ d | _d | _d | _d| _d S )NF)Úegg_baseÚegg_namerQ   Úegg_versionÚbroken_egg_infor>   r7   r7   r8   Úinitialize_options¥   s
   
zegg_info.initialize_optionsc                 C   ó   d S r;   r7   r>   r7   r7   r8   Útag_svn_revision¯   ó   zegg_info.tag_svn_revisionc                 C   r]   r;   r7   )r?   Úvaluer7   r7   r8   r^   ³   r_   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.
        rH   r   rI   )rQ   N)ÚcollectionsÚOrderedDictrL   r	   Údict)r?   ÚfilenamerQ   r7   r7   r8   Úsave_version_info¸   s   zegg_info.save_version_infoc              
   C   sL  | j | _|  ¡ | _t| jƒ}zt|tjjƒ}|rdnd}t	t
|| j| jf ƒƒ W n tyB } ztj d| j| jf ¡|‚d }~ww | jd u rV| jj}|pOi  dtj¡| _|  d¡ t| jƒd | _| jtjkrstj | j| j¡| _d| jv r||  ¡  | j| jj_| jj}|d ur¢|j| j ¡ kr¤| j|_t| jƒ|_ d | j_d S d S d S )Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%sr   rX   ú	.egg-infoú-)!r@   rY   rC   rZ   r   Ú
isinstancer   rG   ÚVersionÚlistr   Ú
ValueErrorÚ	distutilsÚerrorsÚDistutilsOptionErrorrX   r<   Úpackage_dirÚgetr!   ÚcurdirÚensure_dirnamer   rQ   r"   ÚjoinÚcheck_broken_egg_infoÚmetadataÚ_patched_distÚkeyÚlowerÚ_versionÚ_parsed_version)r?   Úparsed_versionÚ
is_versionÚspecrR   ÚdirsÚpdr7   r7   r8   Úfinalize_optionsÅ   sH   


ÿÿ
ÿÿý€ÿ


ýzegg_info.finalize_optionsFc                 C   sR   |r|   |||¡ dS tj |¡r'|du r |s t d||¡ dS |  |¡ 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)r?   Úwhatrd   ÚdataÚforcer7   r7   r8   Úwrite_or_delete_fileö   s   	ÿùzegg_info.write_or_delete_filec                 C   sB   t  d||¡ | d¡}| jst|dƒ}| |¡ | ¡  dS dS )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.
        zwriting %s to %súutf-8ÚwbN)r   ÚinfoÚencodeÚdry_runÚopenÚwriteÚclose)r?   r…   rd   r†   Úfr7   r7   r8   r�   
  s   


ýzegg_info.write_filec                 C   s$   t  d|¡ | jst |¡ dS dS )z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)r   r‹   r�   r!   Úunlink)r?   rd   r7   r7   r8   r„     s   ÿzegg_info.delete_filec                 C   s’   |   | j¡ t | jd ¡ | jj}tdƒD ]}|j|d� | ¡ }|| |j	tj
 | j|j	¡ƒ qtj
 | jd¡}tj
 |¡rC|  |¡ |  ¡  d S )Nzegg_info.writers)Ú	installerznative_libs.txt)ÚmkpathrQ   r!   Úutimer<   Úfetch_build_eggr   ÚrequireÚresolver@   r"   rs   r‚   r„   Úfind_sources)r?   r“   ÚepÚwriterÚnlr7   r7   r8   Ú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"   rs   rQ   Úmanifest_makerr<   Úmanifestr�   Úfilelist)r?   Úmanifest_filenameÚmmr7   r7   r8   r™   -  s
   
zegg_info.find_sourcesc                 C   sX   | j d }| jtjkrtj | j|¡}tj |¡r*t d|| j	¡ | j	| _
|| _	d S d S )Nrf   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.
------------------------------------------------------------------------------)rY   rX   r!   rq   r"   rs   r‚   r   rƒ   rQ   r[   )r?   Úbeir7   r7   r8   rt   5  s   
û
÷zegg_info.check_broken_egg_infoN©F)rM   rN   rO   ÚdescriptionÚuser_optionsÚboolean_optionsÚnegative_optr\   rP   r^   Úsetterre   r€   rˆ   r�   r„   r�   r™   rt   r7   r7   r7   r8   rQ   •   s&    ÿ



1rQ   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œ}z|| }W n tyD   td
j|d�ƒ‚w | d¡}	|dv rQ|g}|	rV|fnd}
|| }|  d |g|	rg|gng  | ¡¡ |D ]}||ƒs€tj||g|
¢R Ž  qpd 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­   r7   ú )Ú_parse_template_linerª   r«   Úglobal_includeÚglobal_excludeÚ	functoolsÚpartialÚrecursive_includeÚrecursive_excluder¬   r­   ÚKeyErrorr   ÚformatÚ
startswithÚdebug_printrs   r   rƒ   )r?   Úliner®   ÚpatternsÚdirÚdir_patternÚ
action_mapÚlog_mapÚprocess_actionÚaction_is_recursiveÚextra_log_argsÚlog_tmplÚpatternr7   r7   r8   Úprocess_template_lineH  sf   ÿÿôéÿÿÿ

ÿþÿÿ€þzFileList.process_template_linec                 C   sR   d}t t| jƒd ddƒ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Úfoundr1   r7   r7   r8   Ú_remove_files•  s   €zFileList._remove_filesc                 C   ó$   dd„ t |ƒD ƒ}|  |¡ t|ƒS )z#Include files that match 'pattern'.c                 S   ó   g | ]
}t j |¡s|‘qS r7   ©r!   r"   Úisdir©Ú.0r‘   r7   r7   r8   Ú
<listcomp>¤  s    z$FileList.include.<locals>.<listcomp>©r   ÚextendÚbool©r?   rÅ   rË   r7   r7   r8   rª   ¢  s   
zFileList.includec                 C   s   t |ƒ}|  |j¡S )z#Exclude files that match 'pattern'.)r9   rÌ   Úmatch©r?   rÅ   rØ   r7   r7   r8   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.
        r   c                 S   rÎ   r7   rÏ   rÑ   r7   r7   r8   rÓ   ²  s    

ÿz.FileList.recursive_include.<locals>.<listcomp>T)Ú	recursive)r!   r"   rs   r   rÕ   rÖ   )r?   r½   rÅ   Úfull_patternrË   r7   r7   r8   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.
        r   ©r9   r!   r"   rs   rÌ   rØ   )r?   r½   rÅ   rØ   r7   r7   r8   r¶   ·  s   zFileList.recursive_excludec                 C   rÍ   )zInclude all files from 'dir/'.c                 S   s"   g | ]}t j |¡D ]}|‘q
qS r7   )rl   r    Úfindall)rÒ   Ú	match_dirÚitemr7   r7   r8   rÓ   À  s    
ýþÿz"FileList.graft.<locals>.<listcomp>rÔ   )r?   r½   rË   r7   r7   r8   r¬   ¾  s
   þ
zFileList.graftc                 C   s   t tj |d¡ƒ}|  |j¡S )zFilter out files from 'dir/'.r   rÜ   )r?   r½   rØ   r7   r7   r8   r­   È  s   zFileList.prunec                    sJ   | j du 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.
        Nr   c                    s   g | ]	}ˆ   |¡r|‘qS r7   ©rØ   rÑ   rà   r7   r8   rÓ   Õ  s    z+FileList.global_include.<locals>.<listcomp>)ÚallfilesrÝ   r9   r!   r"   rs   rÕ   rÖ   r×   r7   rà   r8   r±   Í  s   

zFileList.global_includec                 C   s   t tj d|¡ƒ}|  |j¡S )zD
        Exclude all files anywhere that match the pattern.
        r   rÜ   rÙ   r7   r7   r8   r²   Ù  s   zFileList.global_excludec                 C   s<   |  d¡r|d d… }t|ƒ}|  |¡r| j |¡ d S d S )NúrÇ   )rE   r   Ú
_safe_pathrÉ   Úappend)r?   rß   r"   r7   r7   r8   rä   à  s   

ÿzFileList.appendc                 C   s   | j  t| j|ƒ¡ d S r;   )rÉ   rÕ   Úfilterrã   )r?   Úpathsr7   r7   r8   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)rj   rå   rã   rÉ   r>   r7   r7   r8   Ú_repairë  s   zFileList._repairc              	   C   sš   d}t  |¡}|d u rt d| ¡ dS t  |d¡}|d u r't ||d¡ dS ztj |¡s4tj |¡r7W dS W d S  tyL   t ||t	 
¡ ¡ Y d S w )Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFr‰   T)Úunicode_utilsÚfilesys_decoder   rƒ   Ú
try_encoder!   r"   r‚   ÚUnicodeEncodeErrorÚsysÚgetfilesystemencoding)r?   r"   Úenc_warnÚu_pathÚ	utf8_pathr7   r7   r8   rã   õ  s    
ÿÿzFileList._safe_pathN)rM   rN   rO   rÆ   rÌ   rª   r«   rµ   r¶   r¬   r­   r±   r²   rä   rÕ   rç   rã   r7   r7   r7   r8   r   E  s    M


r   c                   @   sl   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d„ ZdS )rž   zMANIFEST.inc                 C   s   d| _ d| _d| _d| _d S )Nr   )Úuse_defaultsr­   Úmanifest_onlyÚforce_manifestr>   r7   r7   r8   r\     s   
z!manifest_maker.initialize_optionsc                 C   r]   r;   r7   r>   r7   r7   r8   r€     s   zmanifest_maker.finalize_optionsc                 C   sl   t ƒ | _tj | j¡s|  ¡  |  ¡  tj | j¡r|  	¡  |  
¡  |  ¡  | j ¡  | j ¡  |  ¡  d S r;   )r   r    r!   r"   r‚   rŸ   Úwrite_manifestÚadd_defaultsÚtemplateÚread_templateÚadd_license_filesÚprune_file_listÚsortÚremove_duplicatesr>   r7   r7   r8   r�     s   

zmanifest_maker.runc                 C   s   t  |¡}| tjd¡S )Nú/)rè   ré   Úreplacer!   r#   )r?   r"   r7   r7   r8   Ú_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 r7   )rþ   rÑ   r>   r7   r8   rÓ   2  s    z1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r    rç   rÉ   rŸ   Úexecuter�   )r?   rÉ   Úmsgr7   r>   r8   rô   *  s   

zmanifest_maker.write_manifestc                 C   s   |   |¡st | |¡ d S d S r;   )Ú_should_suppress_warningr   rƒ   )r?   r   r7   r7   r8   rƒ   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   r7   r7   r8   r  :  s   z'manifest_maker._should_suppress_warningc                 C   sŒ   t  | ¡ | j | j¡ | j | j¡ ttƒ ƒ}|r!| j |¡ nt	j
 | j¡r,|  ¡  t	j
 d¡r8| j d¡ |  d¡}| j |j¡ d S )Nzsetup.pyrQ   )r   rõ   r    rä   rö   rŸ   rj   r   rÕ   r!   r"   r‚   Úread_manifestÚget_finalized_commandr¬   rQ   )r?   ÚrcfilesÚei_cmdr7   r7   r8   rõ   A  s   


zmanifest_maker.add_defaultsc                 C   s4   | j jjpg }|D ]}t d|¡ q	| j |¡ d S )Nzadding license file '%s')r<   ru   Úlicense_filesr   r‹   r    rÕ   )r?   r  Úlfr7   r7   r8   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   )Úis_regex)r  r<   Úget_fullnamer    r­   Ú
build_baser$   r%   r!   r#   Úexclude_pattern)r?   r  Úbase_dirr#   r7   r7   r8   rù   Z  s   


ÿzmanifest_maker.prune_file_listc                 C   s&   t |dƒr	| ¡ S t dt¡ | ¡ 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_pyr7   r7   r8   Ú_safe_data_filesc  s   

üzmanifest_maker._safe_data_filesN)rM   rN   rO   rö   r\   r€   r�   rþ   rô   rƒ   Ústaticmethodr  rõ   rø   rù   r  r7   r7   r7   r8   rž     s    
	rž   c                 C   sN   d  |¡}| d¡}t| dƒ�}| |¡ W d  ƒ dS 1 s w   Y  dS )z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    Ú
r‰   rŠ   N)rs   rŒ   rŽ   r�   )rd   Úcontentsr‘   r7   r7   r8   r�   y  s
   

"ÿr�   c              	   C   sŽ   t  d|¡ | jsE| jj}| j|j|_}| j|j|_}z| 	| j
¡ W |||_|_n|||_|_w t| jdd ƒ}t | j
|¡ d S d S )Nz
writing %sÚzip_safe)r   r‹   r�   r<   ru   rZ   rG   rY   r@   Úwrite_pkg_inforQ   Úgetattrr
   Úwrite_safety_flag)ÚcmdÚbasenamerd   ru   ÚoldverÚoldnameÚsafer7   r7   r8   r  †  s    òr  c                 C   s   t j |¡rt d¡ d S d S )NzsWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.)r!   r"   r‚   r   rƒ   ©r  r  rd   r7   r7   r8   Úwarn_depends_obsolete™  s
   ÿÿr!  c                 C   s0   t |pdƒ}dd„ }t|t|ƒƒ}|  |¡ d S )Nr7   c                 S   s   | d S )Nr  r7   )r»   r7   r7   r8   Ú	append_cr¤  s   z&_write_requirements.<locals>.append_cr)r   ÚmapÚsortedÚ
writelines)ÚstreamÚreqsÚlinesr"  r7   r7   r8   Ú_write_requirements¡  s   r)  c                 C   sn   | j }t ¡ }t||jƒ |jpi }t|ƒD ]}| djdi t	ƒ ¤Ž¡ t||| ƒ q|  
d|| ¡ ¡ d S )Nz
[{extra}]
Úrequirementsr7   )r<   ÚioÚStringIOr)  Úinstall_requiresÚextras_requirer$  r�   r¸   Úvarsrˆ   Úgetvalue)r  r  rd   Údistr†   r.  Úextrar7   r7   r8   Úwrite_requirementsª  s   
r3  c                 C   s,   t  ¡ }t|| jjƒ |  d|| ¡ ¡ d S )Nzsetup-requirements)r+  r,  r)  r<   Úsetup_requiresrˆ   r0  )r  r  rd   r†   r7   r7   r8   Úwrite_setup_requirementsµ  s   r5  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Ò   Úkr7   r7   r8   rÓ   ½  s    ÿÿz(write_toplevel_names.<locals>.<listcomp>ztop-level namesr  )rc   Úfromkeysr<   Úiter_distribution_namesr�   rs   r$  )r  r  rd   Úpkgsr7   r7   r8   Úwrite_toplevel_names»  s   þÿ r;  c                 C   s   t | ||dƒ d S )NT)Ú	write_argr   r7   r7   r8   Úoverwrite_argÅ  s   r=  Fc                 C   sH   t j |¡d }t| j|d ƒ}|d urd |¡d }|  ||||¡ d S )Nr   r  )r!   r"   Úsplitextr  r<   rs   rˆ   )r  r  rd   r‡   Úargnamer`   r7   r7   r8   r<  É  s
   r<  c                 C   s    | j j}t|tƒs|d u r|}n6|d urFg }t| ¡ ƒD ]$\}}t|tƒs7t ||¡}d tt	t| 
¡ ƒƒ¡}| d||f ¡ qd |¡}|  d||d¡ d S )Nr  z	[%s]
%s

r   zentry pointsT)r<   Úentry_pointsrh   Ústrr$  Úitemsr   Úparse_grouprs   r#  Úvaluesrä   rˆ   )r  r  rd   rš   r†   Úsectionr  r7   r7   r8   Úwrite_entriesÑ  s   

rF  c                  C   s‚   t  dt¡ tj d¡r?t d¡�&} | D ]}t 	d|¡}|r.t
| d¡ƒ  W  d  ƒ S qW d  ƒ dS 1 s:w   Y  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   )r  rƒ   ÚEggInfoDeprecationWarningr!   r"   r‚   r+  rŽ   r$   rØ   ÚintÚgroup)r‘   r»   rØ   r7   r7   r8   Úget_pkg_info_revisionâ  s    ÿüþ
ÿûrJ  c                   @   s   e Zd ZdZdS )rG  z?Deprecated behavior warning for EggInfo, bypassing suppression.N)rM   rN   rO   Ú__doc__r7   r7   r7   r8   rG  ò  s    rG  r¤   );rK  Údistutils.filelistr   Ú	_FileListÚdistutils.errorsr   Údistutils.utilr   rl   r   r³   r!   r$   rì   r+  r  rJ   ra   Ú
setuptoolsr   Úsetuptools.command.sdistr   r   Úsetuptools.command.setoptr	   Úsetuptools.commandr
   Úpkg_resourcesr   r   r   r   r   r   r   r   Úsetuptools.unicode_utilsrè   Úsetuptools.globr   Úsetuptools.externr   r   r9   r:   rQ   rž   r�   r  r!  r)  r3  r5  r;  r=  r<  rF  rJ  rG  r7   r7   r7   r8   Ú<module>   sX    (S 1 Il	

