B
    `‹_—c  ã               @   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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„ Z/dd„ Z0d d!„ Z1d"d#„ Z2d$d%„ Z3d&d'„ Z4d(d)„ Z5d3d+d,„Z6d-d.„ Z7d/d0„ Z8G d1d2„ d2e)ƒZ9d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 }x¤t|ƒ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r„d}|dd… }|t |¡7 }|d|f 7 }|}n|t |
¡7 }|d7 }q†W |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ÚinnerZ
char_class© r2   ú6/home/setuptools-50.3.2/setuptools/command/egg_info.pyÚtranslate_pattern"   sV    




r4   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)Úselfr2   r2   r3   Únamey   s    zInfoCommon.namec             C   s   t |  | j ¡ ¡ƒS )N)r   Ú
_maybe_tagr6   Úget_version)r8   r2   r2   r3   Ú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)r8   Úversionr2   r2   r3   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)r8   r?   r2   r2   r3   ÚtagsŠ   s    
zInfoCommon.tags)Ú__name__Ú
__module__Ú__qualname__r@   rA   Úpropertyr9   r<   r:   rD   r=   r2   r2   r2   r3   r5   u   s   
r5   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_namerI   Úegg_versionÚbroken_egg_info)r8   r2   r2   r3   Úinitialize_options¤   s
    zegg_info.initialize_optionsc             C   s   d S )Nr2   )r8   r2   r2   r3   Útag_svn_revision®   s    zegg_info.tag_svn_revisionc             C   s   d S )Nr2   )r8   Úvaluer2   r2   r3   rS   ²   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   rA   )rI   N)ÚcollectionsÚOrderedDictrD   r	   Údict)r8   ÚfilenamerI   r2   r2   r3   Ú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}|p¨i  dtj¡| _|  d¡ t| jƒd | _| jtjkrðt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   rN   z	.egg-infoú-)!r9   rO   r<   rP   r   Ú
isinstancer   r?   ÚVersionÚlistr   Ú
ValueErrorÚ	distutilsÚerrorsÚDistutilsOptionErrorrN   r6   Úpackage_dirÚgetr    ÚcurdirÚensure_dirnamer   rI   r!   ÚjoinÚcheck_broken_egg_infoÚmetadataÚ_patched_distÚkeyÚlowerÚ_versionÚ_parsed_version)r8   Úparsed_versionZ
is_versionÚspecrJ   ÚdirsÚpdr2   r2   r3   Ú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)r8   ÚwhatrX   ÚdataÚforcer2   r2   r3   Ú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 %szutf-8ÚwbN)r   ÚinfoÚencodeÚdry_runÚopenÚwriteÚclose)r8   rw   rX   rx   Úfr2   r2   r3   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)r8   rX   r2   r2   r3   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)ÚmkpathrI   r    Úutimer6   Úfetch_build_eggr   ÚrequireÚresolver9   r!   rf   rt   rv   Úfind_sources)r8   r„   ÚepÚwriterÚnlr2   r2   r3   Ú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!   rf   rI   Úmanifest_makerr6   ÚmanifestrŽ   Úfilelist)r8   Zmanifest_filenameÚmmr2   r2   r3   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.
------------------------------------------------------------------------------)rO   rN   r    rd   r!   rf   rt   r   ru   rI   rQ   )r8   Zbeir2   r2   r3   rg   4  s    

zegg_info.check_broken_egg_infoN)F)rE   rF   rG   ÚdescriptionÚuser_optionsÚboolean_optionsÚnegative_optrR   rH   rS   ÚsetterrY   rr   rz   rs   rv   rŽ   rŠ   rg   r2   r2   r2   r3   rI   ”   s$   
1
rI   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<  |   |¡\}}}}|dkrV|  dd |¡ ¡ x"|D ]}|  |¡s4t d|¡ q4W nâ|dkrš|  dd |¡ ¡ x"|D ]}|  |¡sxt d|¡ qxW nž|dkrÞ|  d	d |¡ ¡ x"|D ]}|  |¡s¼t d
|¡ q¼W nZ|dkr(|  dd |¡ ¡ x&|D ]}|  |¡st d|¡ qW n|dkrx|  d|d |¡f ¡ xì|D ]"}|  	||¡sPt d||¡ qPW nÀ|dkrÈ|  d|d |¡f ¡ xœ|D ]"}|  
||¡s t d||¡ q W np|dkrú|  d| ¡ |  |¡s8t d|¡ n>|dkr,|  d| ¡ |  |¡s8t d|¡ ntd| ƒ‚d S )NÚincludezinclude ú z%warning: no files found matching '%s'Úexcludezexclude z9warning: no previously-included files found matching '%s'zglobal-includezglobal-include z>warning: no files found matching '%s' anywhere in distributionzglobal-excludezglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionzrecursive-includezrecursive-include %s %sz:warning: no files found matching '%s' under directory '%s'zrecursive-excludezrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'Úgraftzgraft z+warning: no directories found matching '%s'Úprunezprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')Ú_parse_template_lineÚdebug_printrf   r˜   r   ru   rš   Úglobal_includeÚglobal_excludeÚrecursive_includeÚrecursive_excluder›   rœ   r   )r8   ÚlineÚactionÚpatternsÚdirÚdir_patternÚpatternr2   r2   r3   Úprocess_template_lineG  sd    













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ž   )r8   Ú	predicateÚfoundr/   r2   r2   r3   Ú_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 r2   )r    r!   Úisdir)Ú.0r‚   r2   r2   r3   ú
<listcomp>Ÿ  s    z$FileList.include.<locals>.<listcomp>)r   ÚextendÚbool)r8   r¨   r®   r2   r2   r3   r˜     s    
zFileList.includec             C   s   t |ƒ}|  |j¡S )z#Exclude files that match 'pattern'.)r4   r¯   Úmatch)r8   r¨   rµ   r2   r2   r3   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 r2   )r    r!   r°   )r±   r‚   r2   r2   r3   r²   ­  s    z.FileList.recursive_include.<locals>.<listcomp>T)Ú	recursive)r    r!   rf   r   r³   r´   )r8   r¦   r¨   Zfull_patternr®   r2   r2   r3   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**)r4   r    r!   rf   r¯   rµ   )r8   r¦   r¨   rµ   r2   r2   r3   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 r2   )r_   r‘   Úfindall)r±   Z	match_dirÚitemr2   r2   r3   r²   ¼  s   z"FileList.graft.<locals>.<listcomp>)r   r³   r´   )r8   r¦   r®   r2   r2   r3   r›   ¹  s    
zFileList.graftc             C   s   t tj |d¡ƒ}|  |j¡S )zFilter out files from 'dir/'.z**)r4   r    r!   rf   r¯   rµ   )r8   r¦   rµ   r2   r2   r3   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 r2   )rµ   )r±   r‚   )rµ   r2   r3   r²   Ð  s    z+FileList.global_include.<locals>.<listcomp>)Úallfilesr·   r4   r    r!   rf   r³   r´   )r8   r¨   r®   r2   )rµ   r3   rŸ   È  s    

zFileList.global_includec             C   s   t tj d|¡ƒ}|  |j¡S )zD
        Exclude all files anywhere that match the pattern.
        z**)r4   r    r!   rf   r¯   rµ   )r8   r¨   rµ   r2   r2   r3   r    Ô  s    zFileList.global_excludec             C   s8   |  d¡r|d d… }t|ƒ}|  |¡r4| j |¡ d S )Núrª   )r>   r   Ú
_safe_pathr¬   Úappend)r8   r¸   r!   r2   r2   r3   r¼   Û  s
    

zFileList.appendc             C   s   | j  t| j|ƒ¡ d S )N)r¬   r³   Úfilterr»   )r8   Úpathsr2   r2   r3   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¬   )r8   r2   r2   r3   Ú_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)r8   r!   Zenc_warnZu_pathZ	utf8_pathr2   r2   r3   r»   ð  s    
zFileList._safe_pathN)rE   rF   rG   r©   r¯   r˜   rš   r¡   r¢   r›   rœ   rŸ   r    r¼   r³   r¿   r»   r2   r2   r2   r3   r   D  s   I


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_manifest)r8   r2   r2   r3   rR     s    z!manifest_maker.initialize_optionsc             C   s   d S )Nr2   )r8   r2   r2   r3   rr     s    zmanifest_maker.finalize_optionsc             C   sd   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Úprune_file_listÚsortÚremove_duplicates)r8   r2   r2   r3   rŽ     s    

zmanifest_maker.runc             C   s   t  |¡}| tjd¡S )Nú/)rÀ   rÁ   Úreplacer    r"   )r8   r!   r2   r2   r3   Ú_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 r2   )rÍ   )r±   r‚   )r8   r2   r3   r²   ,  s    z1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)r‘   r¿   r¬   r   Úexecuters   )r8   r¬   Úmsgr2   )r8   r3   rÅ   $  s    

zmanifest_maker.write_manifestc             C   s   |   |¡st | |¡ d S )N)Ú_should_suppress_warningr   ru   )r8   rÏ   r2   r2   r3   ru   0  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Ï   r2   r2   r3   rÐ   4  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.pyrI   )r   rÆ   Zcheck_licenser‘   r¼   rÇ   r   r]   r   r³   r    r!   rt   Zread_manifestÚget_finalized_commandr›   rI   )r8   ZrcfilesÚei_cmdr2   r2   r3   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   )Úis_regex)rÑ   r6   Úget_fullnamer‘   rœ   Ú
build_baser#   r$   r    r"   Úexclude_pattern)r8   rÓ   Úbase_dirr"   r2   r2   r3   rÈ   N  s    

zmanifest_maker.prune_file_listN)rE   rF   rG   rÇ   rR   rr   rŽ   rÍ   rÅ   ru   ÚstaticmethodrÐ   rÆ   rÈ   r2   r2   r2   r3   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)rf   r}   r   r€   )rX   Úcontentsr‚   r2   r2   r3   rs   X  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 %sÚzip_safe)r   r|   r~   r6   rh   rP   r?   rO   r9   Úwrite_pkg_inforI   Úgetattrr
   Úwrite_safety_flag)ÚcmdÚbasenamerX   rh   ZoldverZoldnameÚsafer2   r2   r3   rÝ   e  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á   rX   r2   r2   r3   Úwarn_depends_obsoletex  s    rã   c             C   s,   t |pdƒ}dd„ }t||ƒ}|  |¡ d S )Nr2   c             S   s   | d S )NrÚ   r2   )r£   r2   r2   r3   Ú	append_crƒ  s    z&_write_requirements.<locals>.append_cr)r   ÚmapÚ
writelines)ÚstreamÚreqsÚlinesrä   r2   r2   r3   Ú_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)r6   ÚioÚStringIOrê   Úinstall_requiresÚextras_requireÚsortedr€   ÚformatÚvarsrz   Úgetvalue)rà   rá   rX   Údistrx   rï   Úextrar2   r2   r3   Úwrite_requirements‰  s    
rö   c             C   s,   t  ¡ }t|| jjƒ |  d|| ¡ ¡ d S )Nzsetup-requirements)rì   rí   rê   r6   Úsetup_requiresrz   ró   )rà   rá   rX   rx   r2   r2   r3   Ú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±   Úkr2   r2   r3   r²     s   z(write_toplevel_names.<locals>.<listcomp>ztop-level namesrÚ   )rW   Úfromkeysr6   Úiter_distribution_namesrs   rf   rð   )rà   rá   rX   Úpkgsr2   r2   r3   Úwrite_toplevel_namesš  s    rþ   c             C   s   t | ||dƒ d S )NT)Ú	write_arg)rà   rá   rX   r2   r2   r3   Úoverwrite_arg¤  s    r   Fc             C   sH   t j |¡d }t| j|d ƒ}|d k	r4d |¡d }|  ||||¡ d S )Nr   rÚ   )r    r!   ÚsplitextrÞ   r6   rf   rz   )rà   rá   rX   ry   ÚargnamerT   r2   r2   r3   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)r6   Úentry_pointsr[   Ústrrð   Úitemsr   Úparse_grouprf   rå   Úvaluesr¼   rz   )rà   rá   rX   r‹   rx   ÚsectionrÛ   r2   r2   r3   Ú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µ   r2   r2   r3   Ú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)rE   rF   rG   Ú__doc__r2   r2   r2   r3   r  Ñ  s   r  )F):r  Údistutils.filelistr   Z	_FileListÚdistutils.errorsr   Údistutils.utilr   r_   r   r    r#   rÃ   rì   r
  rB   rU   Ú
setuptoolsr   Zsetuptools.command.sdistr   r   Zsetuptools.command.setoptr	   Úsetuptools.commandr
   Úpkg_resourcesr   r   r   r   r   r   r   r   Zsetuptools.unicode_utilsrÀ   Zsetuptools.globr   Úsetuptools.externr   r   r4   r5   rI   r   rs   rÝ   rã   rê   rö   rø   rþ   r   rÿ   r	  r  r  r2   r2   r2   r3   Ú<module>   sT   (S 1 EP	

