
    0A7hi                         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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jR                  ejT                   Z+d Z, G d d      Z- G d de-e      Z. G d de      Z G d de      Z/d Z0d Z1d Z2d  Z3d! Z4d" Z5d# Z6d$ Z7d*d%Z8d& Z9d+d'Z: G d( d)e(      Z;y),zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contents    )FileList)DistutilsInternalError)convert_path)logN   )metadata)_entry_points_normalization)Command)sdist)walk_revctrl)edit_config)	bdist_egg)glob)	packaging)yield_lines)SetuptoolsDeprecationWarningz{}.{}c                    d} | j                   t        j                  j                        }t	        j
                  t        j                        }d|d}t        |      D ]6  \  }}|t        |      dz
  k(  }|dk(  r|r|dz  }n|d|d|d	z  }2d
}t        |      }	||	k  r||   }
|
dk(  r	||dz   z  }n|
dk(  r||z  }n|
dk(  r|dz   }||	k  r||   dk(  r|dz   }||	k  r||   dk(  r|dz   }||	k  r||   dk7  r|dz   }||	k  r	||   dk7  r||	k\  r|t	        j
                  |
      z  }nU||dz   | }d}|d
   dk(  rd}|dd }|t	        j
                  |      z  }|d|dz  }|}n|t	        j
                  |
      z  }|dz  }||	k  r|r2||z  }9 |dz  }t	        j                  |t        j                  t        j                  z        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[^]   **z.*z(?:+z)*r   *?[!^Nz\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_classs                 =/usr/lib/python3/dist-packages/setuptools/command/egg_info.pytranslate_patternr8   &   s*    C TZZ$F
))BFF
C!Jf% >5#f+/)
 D=t z377 J	)m8Ds{zC''z!a%Y&5>S+@%kGY&5>S+@%kG 	)eGn.C%kG 	)eGn.C i' 299T?*C "!a%'2E!#J Qx3%(
 %ab	"))E"22JZ11C  Aryy&FAU )mZ 3JC}>@ 5LC::c		!9::    c                   h    e Zd ZdZdZed        Zd Zd Zde	de
fdZde	fdZde	fd	Z ee      Zy)

InfoCommonNc                 \    t        j                  | j                  j                               S N)r
   	safe_namedistributionget_nameselfs    r7   namezInfoCommon.name}   s"    ''(9(9(B(B(DEEr9   c                 ~    | j                  | j                  j                               }t        j                  |      S r=   )
_maybe_tagr?   get_versionr
   best_effort_version)rB   taggeds     r7   tagged_versionzInfoCommon.tagged_version   s0    !2!2!>!>!@A11&99r9   c                 ^    | j                   r| j                  |      r|S || j                   z   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rB   versions     r7   rE   zInfoCommon._maybe_tag   s5     zzd227; 	
 4::%	
r9   rN   returnc                 z    |j                  | j                        xs |j                  | j                               S r=   )endswithrK   
_safe_tagsrM   s     r7   rL   zInfoCommon._already_tagged   s0     

+Rw/?/?@Q/RRr9   c                 L    t        j                  d| j                         dd  S )N0r   )r
   rG   rK   rA   s    r7   rR   zInfoCommon._safe_tags   s'     11Adjj\2BCABGGr9   c                     d}| j                   r|| j                   z  }| j                  r|t        j                  d      z  }|S )Nr   z%Y%m%d)	tag_buildtag_datetimestrftimerM   s     r7   tagszInfoCommon.tags   s;    >>t~~%G==t}}X..Gr9   )__name__
__module____qualname__rV   rW   propertyrC   rI   rE   strboolrL   rR   rZ   rK    r9   r7   r;   r;   y   se    IHF F:	
Ss St S
HC H
c  TNEr9   r;   c                       e Zd ZdZg dZdgZddiZd Zed        Z	e	j                  d        Z	d Zd	 Zed
fdZddZd Zd Zd Zd Zy
)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]re   rh   c                 J    d | _         d | _        d | _        d | _        d| _        y )NF)egg_baseegg_namerc   egg_versionignore_egg_info_in_manifestrA   s    r7   initialize_optionszegg_info.initialize_options   s'    +0(r9   c                      y r=   ra   rA   s    r7   tag_svn_revisionzegg_info.tag_svn_revision       r9   c                      y r=   ra   )rB   values     r7   rq   zegg_info.tag_svn_revision   rr   r9   c                     t        j                         }| j                         |d<   d|d<   t        |t	        |             y)z
        Materialize the value of date into the
        build tag. Install build keys in a deterministic order
        to avoid arbitrary reordering on subsequent builds.
        rV   r   rW   )rc   N)collectionsOrderedDictrZ   r   dict)rB   filenamerc   s      r7   save_version_infozegg_info.save_version_info   s=     **, !%		 HdH56r9   c                 @   | j                   | _        | j                         | _        t        j
                  j                  | j                        }	 t        |t        j
                  j                        }|rdnd}t        j                  j                  || j                  | j                  fz         | j                  ?| j                  j                   }|xs i j#                  dt$        j&                        | _        | j)                  d       t+        j,                  | j                        dz   | _        | j                  t$        j&                  k7  r9t$        j0                  j3                  | j                  | j.                        | _        | j                  | j                  j4                  _        | j                  j6                  }t9        |dd       xs t9        |d	d       }|o|| j                  j;                         k(  rQ| j                  |_        t        j
                  j                  | j                        |_        d | j                  _        y y y # t        $ r?}t        j                  j                  d| j                  d| j                        |d }~ww xY w)
Nz%s==%sz%s===%sz-Invalid distribution name or version syntax: -r   rk   	.egg-infokeyrC   ) rC   rl   rI   rm   r   rN   Version
isinstancerequirementsRequirement
ValueError	distutilserrorsDistutilsOptionErrorrk   r?   package_dirgetr!   curdirensure_dirnamer
   filename_componentrc   r"   joinr   _patched_distgetattrlower_version_parsed_version)rB   parsed_version
is_versionspecrd   dirspdr~   s           r7   finalize_optionszegg_info.finalize_options   s   
 		..0"**2243C3CD	#NI4E4E4M4MNJ)8yD""..tt}}dFVFV6W/WX == $$00D!ZR,,R;DMJ'&99$--H;V==BII%GGLLFDM
 .2-=-=""* ,,b%&C'"fd*C>cT]]%8%8%::**BK!*!2!2!:!:4;K;K!LB.2D+ ;>5  	""77==$"2"24 	s   A"I 	J:JJNc                 F    t        | j                  | j                  ||      S )0Compute filename of the output egg. Private API.)_egg_basenamerl   rm   )rB   
py_versionplatforms      r7   _get_egg_basenamezegg_info._get_egg_basename  s    T]]D,<,<j(SSr9   c                     |r| j                  |||       yt        j                  j                  |      r.||st	        j
                  d||       y| j                  |       yy)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)rB   whatry   dataforces        r7   write_or_delete_filezegg_info.write_or_delete_file
  sU     OOD(D1WW^^H%|E?xP  * &r9   c                     t        j                  d||       |j                  d      }| j                  s.t	        |d      }|j                  |       |j                          yy)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 %sutf-8wbN)r   infoencodedry_runopenwriteclose)rB   r   ry   r   fs        r7   r   zegg_info.write_file  sO     	#T84{{7#||Xt$AGGDMGGI r9   c                 t    t        j                  d|       | j                  st        j                  |       yy)z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)r   r   r   r!   unlink)rB   ry   s     r7   r   zegg_info.delete_file)  s(    )||IIh r9   c           	         | j                  | j                         	 t        j                  | j                  d        t        j                  d      D ]X  }|j                         } || |j                  t        j                  j                  | j                  |j                               Z t        j                  j                  | j                  d      }t        j                  j                  |      r| j                  |       | j!                          y # t        $ r5}d| j                   d}t
        j                  j                  |      |d }~ww xY w)Nz'Cannot update time stamp of directory ''zegg_info.writers)groupznative_libs.txt)mkpathrc   r!   utimeOSErrorr   r   DistutilsFileErrorr   entry_pointsloadrC   r"   r   r   r   find_sources)rB   rd   msgepwriternls         r7   runzegg_info.run/  s    DMM"	BHHT]]D) ''.@A 	HBWWYF4"'',,t}}bgg"FG	H
 WW\\$--):;77>>"R   	B;DMM?!LC""55c:A	Bs    D 	E"0EEc                     t         j                  j                  | j                  d      }t	        | j
                        }| j                  |_        ||_        |j                          |j                  | _
        y)z"Generate SOURCES.txt manifest filezSOURCES.txtN)r!   r"   r   rc   manifest_makerr?   rn   ignore_egg_info_dirmanifestr   filelist)rB   manifest_filenamemms      r7   r   zegg_info.find_sourcesA  sT    GGLLFD--.!%!A!A'
r9   F)r[   r\   r]   descriptionuser_optionsboolean_optionsnegative_optro   r^   rq   setterrz   r   PY_MAJORr   r   r   r   r   r   ra   r9   r7   rc   rc      s    ?K
L "lO:L1    
7*3X ,4d T+$ $$r9   rc   c                   t     e Zd Zd fd	Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Z xZS )r   c                 4    t         |   ||       || _        y r=   )super__init__r   )rB   r   debug_printr   	__class__s       r7   r   zFileList.__init__N  s    {+#6 r9   c           	         | j                  |      \  }}}}| j                  | j                  | j                  | j                  t        j                  | j                  |      t        j                  | j                  |      | j                  | j                  d}dddddddd	d}	 ||   }|j                  d      }	|dv r|g}|	r|fnd}
||   }| j                  dj!                  |g|	r|gng z   |z                |D ]"  } ||      rt#        j$                  ||g|
  $ y # t        $ r t        d
j                  |            w xY w)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   ra    )_parse_template_liner   r   global_includeglobal_exclude	functoolspartialrecursive_includerecursive_excluder   r   KeyErrorr   format
startswithr   r   r   r   )rB   liner   patternsdirdir_pattern
action_maplog_mapprocess_actionaction_is_recursiveextra_log_argslog_tmplpatterns                r7   process_template_linezFileList.process_template_lineR  s    04/H/H/N,3 ||||"11"11!*!2!2&&" "+!2!2&&" ZZZZ

" ?VS6 P2 CM%
*	'/N %//=''#}H#6#B6?HH%8SEbAHL	

   	=G!'*7<^<	=)  	(AHHPVHW 	s   &D# #%Ec                     d}t        t        | j                        dz
  dd      D ]H  } || j                  |         s| j                  d| j                  |   z          | j                  |= d}J |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   )rB   	predicatefoundr1   s       r7   _remove_fileszFileList._remove_files  sp    
 s4::*B3 	AA'  

1!=>JJqM		
 r9   c                     t        |      D cg c]$  }t        j                  j                  |      r#|& }}| j	                  |       t        |      S c c}w )z#Include files that match 'pattern'.)r   r!   r"   isdirextendr`   )rB   r   r   r   s       r7   r   zFileList.include  sD     MBqq1ABBEE{ Cs
   $AAc                 N    t        |      }| j                  |j                        S )z#Exclude files that match 'pattern'.)r8   r   matchrB   r   r   s      r7   r   zFileList.exclude  s!    !'*!!%++..r9   c                     t         j                  j                  |d|      }t        |d      D cg c]$  }t         j                  j	                  |      r#|& }}| j                  |       t        |      S c c}w )zN
        Include all files anywhere in 'dir/' that match the pattern.
        r   T)	recursive)r!   r"   r   r   r   r   r`   )rB   r   r   full_patternr   r   s         r7   r   zFileList.recursive_include  s`     ww||Cw7 >WqbggmmTUFVWWEE{ Xs   $A8A8c                     t        t        j                  j                  |d|            }| j	                  |j
                        S )zM
        Exclude any file anywhere in 'dir/' that match the pattern.
        r   r8   r!   r"   r   r   r   )rB   r   r   r   s       r7   r   zFileList.recursive_exclude  s4     ""'',,sD'"BC!!%++..r9   c                     t        |      D cg c](  }t        j                  j                  |      D ]  }| * }}}| j	                  |       t        |      S c c}}w )zInclude all files from 'dir/'.)r   r   r   findallr   r`   )rB   r   	match_diritemr   s        r7   r   zFileList.graft  sh     "#Y
!**229=
  

 

 	EE{
s   -Ac                     t        t        j                  j                  |d            }| j	                  |j
                        S )zFilter out files from 'dir/'.r   r  )rB   r   r   s      r7   r   zFileList.prune  s0    !"'',,sD"9:!!%++..r9   c                 $   | j                   | j                          t        t        j                  j                  d|            }| j                   D cg c]  }|j                  |      s| }}| j                  |       t        |      S c c}w )z
        Include all files anywhere in the current directory that match the
        pattern. This is very inefficient on large file trees.
        r   )	allfilesr  r8   r!   r"   r   r   r   r`   )rB   r   r   r   r   s        r7   r   zFileList.global_include  sl    
 == LLN!"'',,tW"=> MM<qU[[^<<EE{ =s   B+Bc                     t        t        j                  j                  d|            }| j	                  |j
                        S )zD
        Exclude all files anywhere that match the pattern.
        r   r  r   s      r7   r   zFileList.global_exclude  s2     ""'',,tW"=>!!%++..r9   c                     |j                  d      r|d d }t        |      }| j                  |      r| j                  j	                  |       y y )Nr   )rQ   r   
_safe_pathr   append)rB   r  r"   s      r7   r  zFileList.append  sF    ==9DD!??4 JJd# !r9   c                 b    | j                   j                  t        | j                  |             y r=   )r   r   filterr  )rB   pathss     r7   r   zFileList.extend  s    

&%89r9   c                 `    t        t        | j                  | j                              | _        y)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   rA   s    r7   _repairzFileList._repair  s     &$**=>
r9   c                    d}t        j                  |      }|t        j                  d|z         yt        j                  |d      }|t        j                  ||d       y	 d|v xs d|v }| j
                  r|ryt        j                  j                  |      st        j                  j                  |      ryy # t        $ r, t        j                  ||t        j                                Y y w xY w)Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFr   r}   s	   .egg-infoT)unicode_utilsfilesys_decoder   r   
try_encoder   r!   r"   r   UnicodeEncodeErrorsysgetfilesystemencoding)rB   r"   enc_warnu_path	utf8_pathis_egg_infos         r7   r  zFileList._safe_path  s    6 --d3>HH>EF ",,VW=	HHXtW-
	B%/L<93LK''Kww~~f%	)B *C " 	BHHXtS%>%>%@A	Bs   $B= =>B= =2C21C2)NNF)r[   r\   r]   r   r   r   r   r   r   r   r   r   r   r   r  r   r  r  __classcell__)r   s   @r7   r   r   K  sQ    7E=N/
//

/$:?Br9   r   c                   b    e Zd ZdZd Zd Zd Zd Zd Zd Z	e
d        Zd	 Zd
 Zd Zd Zd Zy)r   zMANIFEST.inc                 J    d| _         d| _        d| _        d| _        d| _        y )Nr   F)use_defaultsr   manifest_onlyforce_manifestr   rA   s    r7   ro   z!manifest_maker.initialize_options  s)    
#( r9   c                      y r=   ra   rA   s    r7   r   zmanifest_maker.finalize_options  s    r9   c                 &   t        | j                        | _        t        j                  j                  | j                        s| j                          | j                          t        j                  j                  | j                        r| j                          | j                          | j                          | j                          | j                  j                          | j                  j                          | j                          y )N)r   )r   r   r   r!   r"   r   r   write_manifestadd_defaultstemplateread_templateadd_license_files_add_referenced_filesprune_file_listsortremove_duplicatesrA   s    r7   r   zmanifest_maker.run!  s     T5M5MNww~~dmm,!77>>$--(  ""$'')r9   c                 l    t        j                  |      }|j                  t        j                  d      S )N/)r  r  replacer!   r#   )rB   r"   s     r7   _manifest_normalizez"manifest_maker._manifest_normalize/  s'    ++D1||BFFC((r9   c                 
   | j                   j                          | j                   j                  D cg c]  }| j                  |       }}d| j                  z  }| j                  t        | j                  |f|       yc c}w )zo
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        zwriting manifest file '%s'N)r   r  r   r6  r   executer   )rB   r   r   r   s       r7   r*  zmanifest_maker.write_manifest3  sk    
 	 7;mm6I6IJ))!,JJ*T]]:Z$--!7= Ks   B c                 T    | j                  |      st        j                  | |       y y r=   )_should_suppress_warningr   r   )rB   r   s     r7   r   zmanifest_maker.warn?  s#    ,,S1JJtS! 2r9   c                 .    t        j                  d|       S )z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r$   r   )r   s    r7   r:  z'manifest_maker._should_suppress_warningC  s    
 xx4c::r9   c                 v   t        j                  |        | j                  j                  | j                         | j                  j                  | j
                         t        t                     }|r| j                  j                  |       n9t        j                  j                  | j
                        r| j                          t        j                  j                  d      r| j                  j                  d       | j                  d      }| j                  j                  |j                         y )Nzsetup.pyrc   )r   r+  r   r  r,  r   r  r   r   r!   r"   r   read_manifestget_finalized_commandr   rc   )rB   rcfilesei_cmds      r7   r+  zmanifest_maker.add_defaultsJ  s    4 T]]+T]]+|~&MM  )WW^^DMM* 77>>*% MM  ,++J7FOO,r9   c                     | j                   j                  j                  xs g }|D ]  }t        j                  d|        | j
                  j                  |       y )Nzadding license file '%s')r?   r   license_filesr   r   r   r   )rB   rB  lfs      r7   r.  z manifest_maker.add_license_files\  sN    ))22@@FB 	5BHH/4	5]+r9   c                     t        | j                  dg       }|D ]  }t        j                  d|        | j                  j                  |       y)zGAdd files referenced by the config (e.g. `file:` directive) to filelist_referenced_filesz%adding file referenced by config '%s'N)r   r?   r   debugr   r   )rB   
referencedrfs      r7   r/  z$manifest_maker._add_referenced_filesb  sI    T..0CRH
 	CBII=rB	CZ(r9   c                 l   | j                  d      }| j                  j                         }| j                  j	                  |j
                         | j                  j	                  |       t        j                  t        j                        }| j                  j                  d|z   dz   |z   d       y )Nbuildz(^|z)(RCS|CVS|\.svn)r   )is_regex)r>  r?   get_fullnamer   r   
build_baser$   r%   r!   r#   exclude_pattern)rB   rJ  base_dirr#   s       r7   r0  zmanifest_maker.prune_file_listj  s    **73$$113E,,-H%ii%%SL..4q 	& 	
r9   c                     t        |d      r|j                         S t        j                  ddd       |j	                         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/)see_url)hasattrrQ  r   emitget_data_files)rB   build_pys     r7   _safe_data_fileszmanifest_maker._safe_data_filest  sJ     8>?;;==$))N 8	
 &&((r9   N)r[   r\   r]   r,  ro   r   r   r6  r*  r   staticmethodr:  r+  r.  r/  r0  rW  ra   r9   r7   r   r     sR    H))
>" ; ;-$,)
)r9   r   c                     dj                  |      }|j                  d      }t        | d      5 }|j                  |       ddd       y# 1 sw Y   yxY w)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    
r   r   N)r   r   r   r   )ry   contentsr   s      r7   r   r     sO     yy"H w'H	h	 	  s   A

Ac                    t        j                  d|       | j                  s| j                  j                  }| j
                  |j                  c|_        }| j                  |j                  c|_        }	  |j                  | j                         ||c|_        |_        t        | j                  dd       }t        j                  | j                  |       y y # ||c|_        |_        w xY w)Nz
writing %szip_safe)r   r   r   r?   r   rm   rN   rl   rC   write_pkg_inforc   r   r   write_safety_flag)cmdbasenamery   r   oldveroldnamesafes          r7   r^  r^    s    HH\8$;;##,,#&??H4D4D &!$x}}w	> $H##CLL1.5v+HM8+s''T:##CLL$7  /6v+HM8+s   6C C+c                      y)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.
    Nra   r`  ra  ry   s      r7   warn_depends_obsoleterg    s    r9   c                 t    t        |xs d      }d }t        |t        |            }| j                  |       y )Nra   c                     | dz   S )NrZ  ra   )r   s    r7   	append_crz&_write_requirements.<locals>.append_cr  s    d{r9   )r   mapsorted
writelines)streamreqslinesrj  s       r7   _write_requirementsrq    s5    
#E 	6%=)E
er9   c           	      b   | j                   }t        j                         }t        ||j                         |j
                  xs i }t        |      D ]:  }|j                   dj                  di t                      t        |||          < | j                  d||j                                y )Nz
[{extra}]
r   ra   )r?   ioStringIOrq  install_requiresextras_requirerl  r   r   varsr   getvalue)r`  ra  ry   distr   rv  extras          r7   write_requirementsr{    s    D;;=Dd334((.BN' 9

)?))3DF34D."789 ^Xt}}Gr9   c                     t        j                         }t        || j                  j                         | j                  d||j                                y )Nzsetup-requirements)rs  rt  rq  r?   setup_requiresr   rx  )r`  ra  ry   r   s       r7   write_setup_requirementsr~    s<    ;;=Dc..==>18T]]_Mr9   c           	         t         j                  | j                  j                         D cg c]  }|j	                  dd      d    c}      }| j                  d|dj                  t        |            dz          y c c}w )N.r   r   ztop-level namesrZ  )rx   fromkeysr?   iter_distribution_namesr    r   r   rl  )r`  ra  ry   kpkgss        r7   write_toplevel_namesr    sg    ==%(%5%5%M%M%OPa	PD NN$h		&,0G$0NO 	Qs   A>c                      t        | ||d       y )NT)	write_argrf  s      r7   overwrite_argr    s    c8Xt,r9   c                     t         j                  j                  |      d   }t        | j                  |d       }|dj                  |      dz   }| j                  ||||       y )Nr   rZ  )r!   r"   splitextr   r?   r   r   )r`  ra  ry   r   argnamert   s         r7   r  r    s\    ggx(+GC$$gt4E		% 4'Whu=r9   c                     t        j                  | j                  j                        }t        j                  |      }| j                  d||d       y )Nzentry pointsT)r	   r   r?   r   renderr   )r`  ra  ry   epsdefns        r7   write_entriesr    sB    


S--::
;C$D^XtTBr9   c                     t        j                  |       }t        j                  |      }| d| d|xs t         }|r|d| z  }|S )r   r|   z-py)r
   r   r   )rl   rm   r   r   rC   rN   eggs          r7   r   r     sV    ,,X6D//<GF!G9C
 6h7
8C8*~Jr9   c                       e Zd ZdZy)EggInfoDeprecationWarningz?Deprecated behavior warning for EggInfo, bypassing suppression.N)r[   r\   r]   __doc__ra   r9   r7   r  r    s    Ir9   r  r   )NN)<r  distutils.filelistr   	_FileListdistutils.errorsr   distutils.utilr   r   r   r   r!   r$   r  rs  rX   rv   
_importlibr   r   r	   r
   
setuptoolsr   setuptools.command.sdistr   r   setuptools.command.setoptr   setuptools.commandr   setuptools.unicode_utilsr  setuptools.globr   setuptools.externr   setuptools.extern.jaraco.textr   warningsr   r   version_infor   r8   r;   rc   r   r   r^  rg  rq  r{  r~  r  r  r  r  r   r  ra   r9   r7   <module>r     s   < 5 3 '     	 	 
 	   ! ,  * 1 1 ( 0   ' 5 3 7>>3++,P;f) )Xc$z7 c$LFBy FBRv)U v)r
8&HNP->CJ < Jr9   