a
    iŽ5hÿa  ã                   @   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rr|r`|d7 }q0|d||f 7 }q0d}t|ƒ}	||	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 }||	k r,|| dkr,|d }q||	krF|t |
¡7 }nR||d |… }d}|d dkrxd}|dd… }|t |¡7 }|d|f 7 }|}n|t |
¡7 }|d7 }q~|s0||7 }q0|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   ZpatZchunksr#   Z
valid_charÚcÚchunkZ
last_chunkÚiZ	chunk_lenÚcharZinner_iÚinnerZ
char_class© r0   ú=/usr/lib/python3/dist-packages/setuptools/command/egg_info.pyÚtranslate_pattern#   sV    







r2   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   ÚdistributionZget_name©Úselfr0   r0   r1   Únamez   s    zInfoCommon.namec                 C   s   t |  | j ¡ ¡ƒS r4   )r   Ú
_maybe_tagr5   Zget_versionr6   r0   r0   r1   Ú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©r7   Úversionr0   r0   r1   r9      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Ústrftimer=   r0   r0   r1   Útags‹   s    
zInfoCommon.tags)Ú__name__Ú
__module__Ú__qualname__r?   r@   Úpropertyr8   r:   r9   rC   r;   r0   r0   r0   r1   r3   v   s   

r3   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]rJ   rM   c                 C   s"   d | _ d | _d | _d | _d| _d S )NF)Úegg_baseÚegg_namerH   Úegg_versionÚbroken_egg_infor6   r0   r0   r1   Úinitialize_options¥   s
    zegg_info.initialize_optionsc                 C   s   d S r4   r0   r6   r0   r0   r1   Útag_svn_revision¯   s    zegg_info.tag_svn_revisionc                 C   s   d S r4   r0   )r7   Úvaluer0   r0   r1   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.
        r?   r   r@   )rH   N)ÚcollectionsÚOrderedDictrC   r	   Údict)r7   ÚfilenamerH   r0   r0   r1   Úsave_version_info¸   s    zegg_info.save_version_infoc              
   C   sV  | j | _|  ¡ | _t| jƒ}z6t|tjjƒ}|r4dnd}t	t
|| j| jf ƒƒ W n> ty } z&tj d| j| jf ¡|‚W Y d }~n
d }~0 0 | jd u r¸| jj}|pªi  dtj¡| _|  d¡ t| jƒd | _| jtjkròtj | j| j¡| _d| jv r|  ¡  | j| jj_| jj}|d urR|j| j ¡ krR| j|_t| jƒ|_ d | j_d S )Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%sr   rO   ú	.egg-infoú-)!r8   rP   r:   rQ   r   Ú
isinstancer   r>   ZVersionÚlistr   Ú
ValueErrorÚ	distutilsÚerrorsZDistutilsOptionErrorrO   r5   Zpackage_dirÚgetr!   ÚcurdirZensure_dirnamer   rH   r"   ÚjoinÚcheck_broken_egg_infoÚmetadataZ_patched_distÚkeyÚlowerZ_versionZ_parsed_version)r7   Zparsed_versionZ
is_versionÚspecrI   ÚdirsZpdr0   r0   r1   Úfinalize_optionsÅ   sB    


ÿÿ
ÿÿý

zegg_info.finalize_optionsFc                 C   sL   |r|   |||¡ n4tj |¡rH|du 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)r7   ÚwhatrY   ÚdataÚforcer0   r0   r1   Úwrite_or_delete_fileö   s    	ÿzegg_info.write_or_delete_filec                 C   s>   t  d||¡ | d¡}| js:t|dƒ}| |¡ | ¡  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)r7   rp   rY   rq   Úfr0   r0   r1   rl   
  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   rv   rx   r!   Úunlink)r7   rY   r0   r0   r1   ro     s    zegg_info.delete_filec                 C   s’   |   | j¡ t | jd ¡ | jj}tdƒD ]4}|j|d | ¡ }|| |j	tj
 | j|j	¡ƒ q*tj
 | jd¡}tj
 |¡r†|  |¡ |  ¡  d S )Nzegg_info.writers)Ú	installerznative_libs.txt)ZmkpathrH   r!   Úutimer5   Zfetch_build_eggr   ZrequireZresolver8   r"   rd   rm   ro   Úfind_sources)r7   r~   ÚepÚwriterÚnlr0   r0   r1   Ú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"   rd   rH   Úmanifest_makerr5   Úmanifestr„   Úfilelist)r7   Zmanifest_filenameZmmr0   r0   r1   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 )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.
------------------------------------------------------------------------------)rP   rO   r!   rc   r"   rd   rm   r   rn   rH   rR   )r7   Zbeir0   r0   r1   re   5  s    
ûzegg_info.check_broken_egg_infoN)F)rD   rE   rF   ZdescriptionZuser_optionsZboolean_optionsZnegative_optrS   rG   rT   ÚsetterrZ   rk   rs   rl   ro   r„   r€   re   r0   r0   r0   r1   rH   •   s$   ÿ


1
rH   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yŒ   td
j|dƒ‚Y n0 | d¡}	|dv r¦|g}|	r°|fnd}
|| }|  d |g|	rÒ|gng  | ¡¡ |D ] }||ƒsätj||g|
¢R Ž  qä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‹   r0   ú )Z_parse_template_liner‰   rŠ   Úglobal_includeÚglobal_excludeÚ	functoolsÚpartialÚrecursive_includeÚrecursive_excluder‹   rŒ   ÚKeyErrorr   ÚformatÚ
startswithÚdebug_printrd   r   rn   )r7   Úliner   ZpatternsÚdirZdir_patternZ
action_mapZlog_mapZprocess_actionZaction_is_recursiveZextra_log_argsZlog_tmplÚpatternr0   r0   r1   Úprocess_template_lineH  s`    ÿÿôéÿÿ
	
ÿþÿÿzFileList.process_template_linec                 C   sR   d}t t| jƒd ddƒ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˜   )r7   Z	predicateÚfoundr-   r0   r0   r1   Ú_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 r0   ©r!   r"   Úisdir©Ú.0r|   r0   r0   r1   Ú
<listcomp>¤  ó    z$FileList.include.<locals>.<listcomp>©r   ÚextendÚbool©r7   r›   r    r0   r0   r1   r‰   ¢  s    
zFileList.includec                 C   s   t |ƒ}|  |j¡S )z#Exclude files that match 'pattern'.)r2   r¡   Úmatch©r7   r›   r¬   r0   r0   r1   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   s   g | ]}t j |¡s|‘qS r0   r¢   r¤   r0   r0   r1   r¦   ²  s   ÿz.FileList.recursive_include.<locals>.<listcomp>T)Ú	recursive)r!   r"   rd   r   r©   rª   )r7   rš   r›   Zfull_patternr    r0   r0   r1   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   ©r2   r!   r"   rd   r¡   r¬   )r7   rš   r›   r¬   r0   r0   r1   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 r0   )r`   r‡   Úfindall)r¥   Z	match_dirÚitemr0   r0   r1   r¦   À  s   þz"FileList.graft.<locals>.<listcomp>r¨   )r7   rš   r    r0   r0   r1   r‹   ¾  s
    þ
zFileList.graftc                 C   s   t tj |d¡ƒ}|  |j¡S )zFilter out files from 'dir/'.r   r¯   )r7   rš   r¬   r0   r0   r1   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 r0   ©r¬   r¤   r²   r0   r1   r¦   Õ  r§   z+FileList.global_include.<locals>.<listcomp>)Zallfilesr°   r2   r!   r"   rd   r©   rª   r«   r0   r²   r1   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­   r0   r0   r1   r   Ù  s    zFileList.global_excludec                 C   s8   |  d¡r|d d… }t|ƒ}|  |¡r4| j |¡ d S )Núr   )r<   r   Ú
_safe_pathrŸ   Úappend)r7   r±   r"   r0   r0   r1   rµ   à  s
    

zFileList.appendc                 C   s   | j  t| j|ƒ¡ d S r4   )rŸ   r©   Úfilterr´   )r7   Úpathsr0   r0   r1   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Ÿ   r6   r0   r0   r1   Ú_repairë  s    zFileList._repairc              	   C   sš   d}t  |¡}|d u r(t d| ¡ dS t  |d¡}|d u rNt ||d¡ dS z"tj |¡shtj |¡rnW dS W n$ ty”   t ||t	 
¡ ¡ Y n0 d S )Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFrt   T)Úunicode_utilsÚfilesys_decoder   rn   Z
try_encoder!   r"   rm   ÚUnicodeEncodeErrorÚsysÚgetfilesystemencoding)r7   r"   Zenc_warnZu_pathZ	utf8_pathr0   r0   r1   r´   õ  s    

zFileList._safe_pathN)rD   rE   rF   rœ   r¡   r‰   rŠ   r“   r”   r‹   rŒ   r   r   rµ   r©   r¸   r´   r0   r0   r0   r1   r   E  s   M


r   c                   @   s\   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S )r…   zMANIFEST.inc                 C   s   d| _ d| _d| _d| _d S )Nr   )Zuse_defaultsrŒ   Zmanifest_onlyZforce_manifestr6   r0   r0   r1   rS     s    z!manifest_maker.initialize_optionsc                 C   s   d S r4   r0   r6   r0   r0   r1   rk     s    zmanifest_maker.finalize_optionsc                 C   sd   t ƒ | _tj | j¡s|  ¡  |  ¡  tj | j¡r<|  	¡  |  
¡  | j ¡  | j ¡  |  ¡  d S r4   )r   r‡   r!   r"   rm   r†   Úwrite_manifestÚadd_defaultsÚtemplateZread_templateÚprune_file_listÚsortZremove_duplicatesr6   r0   r0   r1   r„     s    

zmanifest_maker.runc                 C   s   t  |¡}| tjd¡S )Nú/)r¹   rº   Úreplacer!   r#   )r7   r"   r0   r0   r1   Ú_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 r0   )rÅ   r¤   r6   r0   r1   r¦   1  r§   z1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r‡   r¸   rŸ   r†   Zexecuterl   )r7   rŸ   Úmsgr0   r6   r1   r¾   )  s    

zmanifest_maker.write_manifestc                 C   s   |   |¡st | |¡ d S r4   )Ú_should_suppress_warningr   rn   )r7   rÆ   r0   r0   r1   rn   5  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Æ   r0   r0   r1   rÇ   9  s    z'manifest_maker._should_suppress_warningc                 C   s”   t  | ¡ |  ¡  | j | j¡ | j | j¡ ttƒ ƒ}|rJ| j 	|¡ nt
j | j¡r`|  ¡  t
j d¡rx| j d¡ |  d¡}| j |j¡ d S )Nzsetup.pyrH   )r   r¿   Zcheck_licenser‡   rµ   rÀ   r†   r^   r   r©   r!   r"   rm   Zread_manifestÚget_finalized_commandr‹   rH   )r7   ZrcfilesZei_cmdr0   r0   r1   r¿   @  s    


zmanifest_maker.add_defaultsc                 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È   r5   Zget_fullnamer‡   rŒ   Z
build_baser$   r%   r!   r#   Zexclude_pattern)r7   rÉ   Zbase_dirr#   r0   r0   r1   rÁ   S  s    

ÿzmanifest_maker.prune_file_listN)rD   rE   rF   rÀ   rS   rk   r„   rÅ   r¾   rn   ÚstaticmethodrÇ   r¿   rÁ   r0   r0   r0   r1   r…     s   
r…   c                 C   sL   d  |¡}| d¡}t| dƒ}| |¡ W d  ƒ n1 s>0    Y  dS )z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    Ú
rt   ru   N)rd   rw   ry   rz   )rY   Úcontentsr|   r0   r0   r1   rl   ]  s    

rl   c              	   C   sŠ   t  d|¡ | js†| jj}| j|j |_}| j|j |_}z| 	| j
¡ W || |_|_n|| |_|_0 t| jdd ƒ}t | j
|¡ d S )Nz
writing %sZzip_safe)r   rv   rx   r5   rf   rQ   r>   rP   r8   Úwrite_pkg_inforH   Úgetattrr
   Zwrite_safety_flag)ÚcmdÚbasenamerY   rf   ZoldverZoldnameZsafer0   r0   r1   rÍ   j  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"   rm   r   rn   ©rÏ   rÐ   rY   r0   r0   r1   Úwarn_depends_obsolete}  s    ÿrÒ   c                 C   s0   t |pdƒ}dd„ }t|t|ƒƒ}|  |¡ d S )Nr0   c                 S   s   | d S )NrË   r0   )r™   r0   r0   r1   Ú	append_crˆ  s    z&_write_requirements.<locals>.append_cr)r   ÚmapÚsortedÚ
writelines)ÚstreamZreqsÚlinesrÓ   r0   r0   r1   Ú_write_requirements…  s    rÙ   c                 C   sn   | j }t ¡ }t||jƒ |jp"i }t|ƒD ]*}| djf i t	ƒ ¤Ž¡ t||| ƒ q,|  
d|| ¡ ¡ d S )Nz
[{extra}]
Zrequirements)r5   ÚioÚStringIOrÙ   Zinstall_requiresÚextras_requirerÕ   rz   r–   Úvarsrs   Úgetvalue)rÏ   rÐ   rY   Zdistrq   rÜ   Zextrar0   r0   r1   Úwrite_requirementsŽ  s    
rß   c                 C   s,   t  ¡ }t|| jjƒ |  d|| ¡ ¡ d S )Nzsetup-requirements)rÚ   rÛ   rÙ   r5   Zsetup_requiresrs   rÞ   )rÏ   rÐ   rY   rq   r0   r0   r1   Ú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¥   Úkr0   r0   r1   r¦   ¡  s   ÿz(write_toplevel_names.<locals>.<listcomp>ztop-level namesrË   )rX   Úfromkeysr5   Ziter_distribution_namesrl   rd   rÕ   )rÏ   rÐ   rY   Zpkgsr0   r0   r1   Úwrite_toplevel_namesŸ  s    þÿrä   c                 C   s   t | ||dƒ d S )NT)Ú	write_argrÑ   r0   r0   r1   Úoverwrite_arg©  s    ræ   Fc                 C   sH   t j |¡d }t| j|d ƒ}|d ur4d |¡d }|  ||||¡ d S )Nr   rË   )r!   r"   ÚsplitextrÎ   r5   rd   rs   )rÏ   rÐ   rY   rr   ÚargnamerU   r0   r0   r1   rå   ­  s
    rå   c                 C   s    | j j}t|tƒs|d u r |}nl|d urŒg }t| ¡ ƒD ]H\}}t|tƒsnt ||¡}d tt	t| 
¡ ƒƒ¡}| d||f ¡ q8d |¡}|  d||d¡ d S )NrË   z	[%s]
%s

r   zentry pointsT)r5   Zentry_pointsr]   ÚstrrÕ   Úitemsr   Zparse_grouprd   rÔ   Úvaluesrµ   rs   )rÏ   rÐ   rY   r   rq   ZsectionrÌ   r0   r0   r1   Úwrite_entriesµ  s    

rì   c                  C   s€   t  dt¡ tj d¡r|t d¡J} | D ]4}t 	d|¡}|r(t
| d¡ƒ  W  d  ƒ S q(W d  ƒ n1 sr0    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   )Úwarningsrn   ÚEggInfoDeprecationWarningr!   r"   rm   rÚ   ry   r$   r¬   ÚintÚgroup)r|   r™   r¬   r0   r0   r1   Ú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)rD   rE   rF   Ú__doc__r0   r0   r0   r1   rî   Ö  s   rî   )F);rò   Zdistutils.filelistr   Z	_FileListZdistutils.errorsr   Zdistutils.utilr   r`   r   r‘   r!   r$   r¼   rÚ   rí   rA   rV   Z
setuptoolsr   Zsetuptools.command.sdistr   r   Zsetuptools.command.setoptr	   Zsetuptools.commandr
   Zpkg_resourcesr   r   r   r   r   r   r   r   Zsetuptools.unicode_utilsr¹   Zsetuptools.globr   Zsetuptools.externr   r   r2   r3   rH   r…   rl   rÍ   rÒ   rÙ   rß   rà   rä   ræ   rå   rì   rñ   rî   r0   r0   r0   r1   Ú<module>   sV   (S 1 IP	

