a
    ñ»jšg  ã                   @   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mZ dd	l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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& dj'ej(Ž 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$„ Z0ej1Z1ej2Z2d%d&„ Z3d'd(„ Z4d2d*d+„Z5d,d-„ Z6d3d.d/„Z7G d0d1„ d1e&ƒZ8dS )4zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contentsé    )ÚFileList)ÚDistutilsInternalError)Úconvert_path)ÚlogNé   )Úmetadata)Ú_entry_pointsÚ_normalizationé   )Ú_requirestxt)ÚCommand)Úsdist)Úwalk_revctrl)Úedit_config)Ú	bdist_egg)Úglob)Ú	packaging)ÚSetuptoolsDeprecationWarningz{}.{}c                 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]r
   ú**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© r0   úAE:\soccer\ml_env\Lib\site-packages\setuptools/command/egg_info.pyÚtranslate_pattern%   sV    







r2   c                   @   sd   e Zd ZdZdZedd„ ƒZdd„ Zdd„ Ze	e
dœd	d
„Ze	dœdd„Ze	dœdd„ZeeƒZdS )Ú
InfoCommonNc                 C   s   t  | j ¡ ¡S ©N)r	   Ú	safe_nameÚdistributionÚget_name©Úselfr0   r0   r1   Úname|   s    zInfoCommon.namec                 C   s   |   | j ¡ ¡}t |¡S r4   )Ú
_maybe_tagr6   Úget_versionr	   Úsafe_version)r9   Ztaggedr0   r0   r1   Útagged_version€   s    zInfoCommon.tagged_versionc                 C   s   | j r|  |¡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Ú_already_tagged©r9   Úversionr0   r0   r1   r;   „   s    ÿÿýzInfoCommon._maybe_tag)rB   Úreturnc                 C   s   |  | j¡p|  |  ¡ ¡S r4   )Úendswithr?   Ú
_safe_tagsrA   r0   r0   r1   r@   �   s    zInfoCommon._already_tagged)rC   c              	   C   sL   zt  d| j› �¡dd … W S  tjjyF   t  | j dd¡¡ Y S 0 d S )NÚ0r
   ú Ú.)r	   r=   r?   r   rB   ÚInvalidVersionr5   Úreplacer8   r0   r0   r1   rE   ”   s    zInfoCommon._safe_tagsc                 C   s,   d}| j r|| j 7 }| jr(|t d¡7 }|S )Nr   z%Y%m%d)Ú	tag_buildÚtag_dateÚtimeÚstrftimerA   r0   r0   r1   Útagsœ   s    
zInfoCommon.tags)Ú__name__Ú
__module__Ú__qualname__rK   rL   Úpropertyr:   r>   r;   ÚstrÚboolr@   rE   rO   r?   r0   r0   r0   r1   r3   x   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edfdd„Zd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]rX   r[   c                 C   s"   d | _ d | _d | _d | _d| _d S )NF)Úegg_baseÚegg_namerV   Úegg_versionÚignore_egg_info_in_manifestr8   r0   r0   r1   Úinitialize_options»   s
    zegg_info.initialize_optionsc                 C   s   d S r4   r0   r8   r0   r0   r1   Útag_svn_revisionÅ   s    zegg_info.tag_svn_revisionc                 C   s   d S r4   r0   )r9   Úvaluer0   r0   r1   rb   É   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.
        rK   r   rL   )rV   N)ÚcollectionsÚOrderedDictrO   r   Údict)r9   ÚfilenamerV   r0   r0   r1   Úsave_version_infoÏ   s    zegg_info.save_version_infoc              
   C   sd  | j | _|  ¡ | _tj | j¡}z6t|tjjƒ}|r8dnd}tj 	|| 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¡| _| j| jj_| jj}t|dd ƒ�p$t|dd ƒ}|d u�r`|| j ¡ k�r`| j|_tj | j¡|_d | j_d S )	Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%sr   r]   ú	.egg-infoÚkeyr:   ) r:   r^   r>   r_   r   rB   ÚVersionÚ
isinstanceÚrequirementsÚRequirementÚ
ValueErrorÚ	distutilsÚerrorsÚDistutilsOptionErrorr]   r6   Úpackage_dirÚgetr   ÚcurdirÚensure_dirnamer	   Úfilename_componentrV   r   Újoinr   Z_patched_distÚgetattrÚlowerÚ_versionÚ_parsed_version)r9   Úparsed_versionZ
is_versionÚspecrW   ÚdirsÚpdrj   r0   r0   r1   Úfinalize_optionsÜ   s:    

ÿÿý

zegg_info.finalize_optionsNc                 C   s   t | j| j||ƒS )ú0Compute filename of the output egg. Private API.)Ú_egg_basenamer^   r_   )r9   Ú
py_versionÚplatformr0   r0   r1   Ú_get_egg_basename  s    zegg_info._get_egg_basenameFc                 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)r9   Úwhatrg   Ú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)r9   r‹   rg   rŒ   Úfr0   r0   r1   r‡     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   rg   r0   r0   r1   rŠ   +  s    zegg_info.delete_filec              
   C   sÈ   |   | j¡ zt | jd ¡ W n@ ty^ } z(d| j› d�}tj |¡|‚W Y d }~n
d }~0 0 tj	dd�D ](}| 
¡ }|| |jtj | j|j¡ƒ qltj | jd¡}tj |¡r¼|  |¡ |  ¡  d S )Nz'Cannot update time stamp of directory 'ú'zegg_info.writers)Úgroupznative_libs.txt)ÚmkpathrV   r   ÚutimeÚOSErrorrp   rq   ÚDistutilsFileErrorr   Úentry_pointsÚloadr:   r   rx   rˆ   rŠ   Úfind_sources)r9   rW   ÚmsgÚepÚwriterÚnlr0   r0   r1   Úrun1  s    $
zegg_info.runc                 C   s<   t j | jd¡}t| jƒ}| j|_||_| 	¡  |j
| _
dS )z"Generate SOURCES.txt manifest filezSOURCES.txtN)r   r   rx   rV   Úmanifest_makerr6   r`   Úignore_egg_info_dirÚmanifestr¦   Úfilelist)r9   Zmanifest_filenameÚmmr0   r0   r1   r¡   C  s    
zegg_info.find_sources)F)rP   rQ   rR   ÚdescriptionÚuser_optionsÚboolean_optionsÚnegative_optra   rS   rb   Úsetterrh   r�   ÚPY_MAJORr†   rŽ   r‡   rŠ   r¦   r¡   r0   r0   r0   r1   rV   §   s$   ÿ


,
rV   c                       sŽ   e Zd Zd!‡ f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d „ Z‡  ZS )"r   NFc                    s   t ƒ  ||¡ || _d S r4   )ÚsuperÚ__init__r¨   )r9   r‰   Údebug_printr¨   ©Ú	__class__r0   r1   r³   P  s    zFileList.__init__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–   d
|›d|›�}	t|	ƒ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$Invalid MANIFEST.in: unknown action z in z
recursive->   r¹   rº   r0   rG   )Z_parse_template_liner·   r¸   Úglobal_includeÚglobal_excludeÚ	functoolsÚpartialÚrecursive_includeÚrecursive_excluder¹   rº   ÚKeyErrorr   Ú
startswithr´   rx   r   r‰   )r9   ÚlineÚactionÚpatternsÚdirZdir_patternZ
action_mapZlog_mapZprocess_actionr¢   Zaction_is_recursiveZextra_log_argsZlog_tmplÚpatternr0   r0   r1   Úprocess_template_lineT  sV    þþòî
ÿÿ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´   )r9   Ú	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   ÚextendrU   ©r9   rÇ   rÍ   r0   r0   r1   r·   §  s    
zFileList.includec                 C   s   t |ƒ}|  |j¡S )z#Exclude files that match 'pattern'.)r2   rÎ   Úmatch©r9   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Ó   ·  rÔ   z.FileList.recursive_include.<locals>.<listcomp>T)Ú	recursive)r   r   rx   r   rÖ   rU   )r9   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   rx   rÎ   rØ   )r9   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   )rp   rª   Úfindall)rÒ   Z	match_dirÚitemr0   r0   r1   rÓ   Ä  s   þz"FileList.graft.<locals>.<listcomp>rÕ   )r9   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Û   )r9   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>)ÚallfilesrÜ   r2   r   r   rx   rÖ   rU   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É   )rD   r   Ú
_safe_pathrË   Úappend)r9   rÝ   r   r0   r0   r1   râ   ä  s
    

zFileList.appendc                 C   s   | j  t| j|ƒ¡ d S r4   )rË   rÖ   Úfilterrá   )r9   Ú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)Úlistrã   rá   rË   r8   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 zBd|v p^d|v }| jrp|rpW dS tj |¡sˆtj |¡rŽW dS W n$ t	y´   t ||t
 ¡ ¡ Y n0 d S )Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFr�   ri   s	   .egg-infoT)Úunicode_utilsÚfilesys_decoder   r‰   Z
try_encoder¨   r   r   rˆ   ÚUnicodeEncodeErrorÚsysÚgetfilesystemencoding)r9   r   Zenc_warnZu_pathZ	utf8_pathÚis_egg_infor0   r0   r1   rá   ù  s"    


zFileList._safe_path)NNF)rP   rQ   rR   r³   rÈ   rÎ   r·   r¸   r¿   rÀ   r¹   rº   r»   r¼   râ   rÖ   ræ   rá   Ú__classcell__r0   r0   rµ   r1   r   M  s   F	

r   c                   @   st   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d„ ZdS )r§   zMANIFEST.inc                 C   s"   d| _ d| _d| _d| _d| _d S )NTF)Zuse_defaultsrº   Zmanifest_onlyZforce_manifestr¨   r8   r0   r0   r1   ra     s
    z!manifest_maker.initialize_optionsc                 C   s   d S r4   r0   r8   r0   r0   r1   r�     s    zmanifest_maker.finalize_optionsc                 C   sz   t | jd�| _tj | j¡s$|  ¡  |  ¡  tj | j	¡rB|  
¡  |  ¡  |  ¡  |  ¡  | j ¡  | j ¡  |  ¡  d S )N)r¨   )r   r¨   rª   r   r   rˆ   r©   Úwrite_manifestÚadd_defaultsÚtemplateZread_templateÚadd_license_filesÚ_add_referenced_filesÚprune_file_listÚsortZremove_duplicatesr8   r0   r0   r1   r¦   "  s    

zmanifest_maker.runc                 C   s   t  |¡}| tjd¡S )Nú/)rç   rè   rJ   r   r    )r9   r   r0   r0   r1   Ú_manifest_normalize0  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Ñ   r8   r0   r1   rÓ   <  rÔ   z1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)rª   ræ   rË   r©   Úexecuter‡   )r9   rË   r¢   r0   r8   r1   rî   4  s    

zmanifest_maker.write_manifestc                 C   s   |   |¡st | |¡ d S r4   )Ú_should_suppress_warningr   r‰   )r9   r¢   r0   r0   r1   r‰   @  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ø   D  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.pyrV   )r   rï   rª   râ   rð   r©   rå   r   rÖ   r   r   rˆ   Zread_manifestÚget_finalized_commandr¹   rV   )r9   ZrcfilesZei_cmdr0   r0   r1   rï   K  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')r6   r   Úlicense_filesr   r‘   rª   rÖ   )r9   rú   Úlfr0   r0   r1   rñ   ]  s    z manifest_maker.add_license_filesc                 C   s4   t | jdg ƒ}|D ]}t d|¡ q| j |¡ dS )zGAdd files referenced by the config (e.g. `file:` directive) to filelistZ_referenced_filesz%adding file referenced by config '%s'N)ry   r6   r   Údebugrª   rÖ   )r9   Z
referencedÚrfr0   r0   r1   rò   c  s    z$manifest_maker._add_referenced_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)T)Zis_regex)rù   r6   Úget_fullnamerª   rº   Ú
build_baser!   r"   r   r    Zexclude_pattern)r9   rþ   Úbase_dirr    r0   r0   r1   ró   k  s    

ÿzmanifest_maker.prune_file_listc                 C   s*   t |dƒr| ¡ S tjdddd� | ¡ 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@`build_py` command does not inherit from setuptools' `build_py`.z±
            Custom 'build_py' does not implement 'get_data_files_without_manifest'.
            Please extend command classes from setuptools instead of distutils.
            z!https://peps.python.org/pep-0632/)Zsee_url)Úhasattrr  r   ÚemitZget_data_files)r9   Úbuild_pyr0   r0   r1   Ú_safe_data_filesu  s    

ú	zmanifest_maker._safe_data_filesN)rP   rQ   rR   rð   ra   r�   r¦   rö   rî   r‰   Ústaticmethodrø   rï   rñ   rò   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.
    Ú
r�   r�   N)rx   r’   r”   r•   )rg   Úcontentsr—   r0   r0   r1   r‡   Ž  s    

r‡   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   r‘   r“   r6   r   r_   rB   r^   r:   Úwrite_pkg_inforV   ry   r   Zwrite_safety_flag)ÚcmdÚbasenamerg   r   ZoldverZoldnameÚsafer0   r0   r1   r
  ›  s     r
  c                 C   s   dS )aj  
    Unused: left to avoid errors when updating (from source) from <= 67.8.
    Old installations have a .dist-info directory with the entry-point
    ``depends.txt = setuptools.command.egg_info:warn_depends_obsolete``.
    This may trigger errors when running the first egg_info in build_meta.
    TODO: Remove this function in a version sufficiently > 68.
    Nr0   ©r  r  rg   r0   r0   r1   Úwarn_depends_obsolete®  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 )rH   r
   r   )r   )rÒ   Úkr0   r0   r1   rÓ   ¾  s   z(write_toplevel_names.<locals>.<listcomp>ztop-level namesr  )rf   Úfromkeysr6   Ziter_distribution_namesr‡   rx   Úsorted)r  r  rg   Ú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   Úsplitextry   r6   rx   rŽ   )r  r  rg   r�   Úargnamerc   r0   r0   r1   r  È  s
    r  c                 C   s,   t  | jj¡}t  |¡}|  d||d¡ d S )Nzentry pointsT)r   r    r6   rŸ   ÚrenderrŽ   )r  r  rg   ÚepsZdefnr0   r0   r1   Úwrite_entriesÐ  s    
r  c                 C   sB   t  | ¡}t  |¡}|› d|› d|p&t› �}|r>|d|› �7 }|S )r‚   ú-z-py)r	   rw   r±   )r^   r_   r„   r…   r:   rB   Úeggr0   r0   r1   rƒ   Ö  s    

rƒ   c                   @   s   e Zd ZdZdS )ÚEggInfoDeprecationWarningz?Deprecated behavior warning for EggInfo, bypassing suppression.N)rP   rQ   rR   Ú__doc__r0   r0   r0   r1   r  à  s   r  )F)NN)9r  Údistutils.filelistr   Z	_FileListÚdistutils.errorsr   Údistutils.utilr   rp   r   r½   r   r!   rê   rM   rd   Z
_importlibr   r   r   r	   r   Ú
setuptoolsr   Zsetuptools.command.sdistr   r   Zsetuptools.command.setoptr   Zsetuptools.commandr   Zsetuptools.unicode_utilsrç   Zsetuptools.globr   Zsetuptools.externr   Úwarningsr   ÚformatÚversion_infor±   r2   r3   rV   r§   r‡   r
  r  Zwrite_requirementsZwrite_setup_requirementsr  r  r  r  rƒ   r  r0   r0   r0   r1   Ú<module>   sV   S/ ' Iy


