Jdh dZddlmZddlmZddlmZddlm Z ddlZddlZddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddlm-Z-dZ.GddZ/Gdde/eZ0GddeZGddeZ1dZ2dZ3dZ4d Z5d!Z6d"Z7d#Z8d$Z9d+d&Z:d'Z;d(Z<Gd)d*e-Z=dS),zUsetuptools.command.egg_info Create a distribution's .egg-info directory and contents)FileList)DistutilsInternalError) convert_path)logN)metadata) _entry_points)Command)sdist) walk_revctrl) edit_config) bdist_egg) Requirement safe_name parse_version safe_version to_filename)glob) packaging) yield_lines)SetuptoolsDeprecationWarningcd}|jtjj}t jtj}d|d}t |D]f\}}|t|dz k}|dkr|r|dz }n |d|d|d z }7d }t|} || kr||} | d kr ||d zz }n| d kr||z }n| d kr|dz} | | kr|| dkr| dz} | | kr|| dkr| dz} | | kr#|| dkr| dz} | | kr || dk| | kr|t j| z }na||dz| } d} | d dkr d} | dd} | t j| z } |d | dz }| }n|t j| z }|dz }|| k|s||z }h|dz }t j|tj tj zS)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) splitospathsepreescape enumeratelencompile MULTILINEDOTALL)rpatchunksr' valid_charcchunk last_chunki chunk_lencharinner_iinner char_classs N/opt/alt/python311/lib/python3.11/site-packages/setuptools/command/egg_info.pytranslate_patternr<'s CTZ $ $F )BF  CCCC!Jf%%>>5#f++/)  D== 8t zzz33377  JJ )mm8Ds{{zC''z!a%Y&&5>S+@+@%kGY&&5>S+@+@%kG ))eGn.C.C%kG ))eGn.C.Ci''29T??*CC"!a%-0E!#JQx3%( %abb ")E"2"22JCZZZ11C AAry& FAU)mmZ  3JC5LC :c !9 : : ::cveZdZdZdZedZdZdZde de fdZ de fdZ de fd Z ee ZdS) InfoCommonNcNt|jSN)r distributionget_nameselfs r;namezInfoCommon.name~s*3355666r=ctt||jSrA)r _maybe_tagrB get_versionrDs r;tagged_versionzInfoCommon.tagged_versions+DOOD,=,I,I,K,KLLMMMr=cR|jr||r|n ||jzS)z egg_info may be called more than once for a distribution, in which case the version string already contains all tags. )vtags_already_taggedrEversions r;rHzInfoCommon._maybe_tags6 z &d&:&:7&C&C &GG4:% r=rOreturnc||jp&||SrA)endswithrL _safe_tagsrNs r;rMzInfoCommon._already_taggeds7 ++Rw/?/?@Q@Q/R/RRr=c@td|jddS)N0r)rrLrDs r;rSzInfoCommon._safe_tagss&, ,,--abb11r=chd}|jr ||jz }|jr|tjdz }|S)Nrz-%Y%m%d) tag_buildtag_datetimestrftimerNs r;tagszInfoCommon.tagss@ > & t~ %G = 0 t}Y// /Gr=)__name__ __module__ __qualname__rWrXpropertyrFrJrHstrboolrMrSr[rLr=r;r?r?zsIH 77X7NNN   SsStSSSS 2C2222 c HTNNEEEr=r?ceZdZdZgdZdgZddiZdZedZ e j dZ dZ d Z dd Z d Zd ZdZdZdZdS)egg_infoz+create a distribution's .egg-info directory))z egg-base=ezLdirectory containing .egg-info directories (default: top of the source tree))tag-datedz0Add date stamp (e.g. 20050528) to version number)z tag-build=bz-Specify explicit tag to add to version number)no-dateDz"Don't include date stamp [default]rfricZd|_d|_d|_d|_d|_d|_dS)NF)egg_baseegg_namerd egg_versionbroken_egg_infoignore_egg_info_in_manifestrDs r;initialize_optionszegg_info.initialize_optionss5   $+0(((r=cdSrArbrDs r;tag_svn_revisionzegg_info.tag_svn_revision r=cdSrArb)rEvalues r;rszegg_info.tag_svn_revisionrtr=ctj}||d<d|d<t|t |dS)z Materialize the value of date into the build tag. Install build keys in a deterministic order to avoid arbitrary reordering on subsequent builds. rWrrX)rdN) collections OrderedDictr[r dict)rEfilenamerds r;save_version_infozegg_info.save_version_infosQ *,,!%  HdH55566666r=c|j|_||_t |j} t |t jj}|rdnd}t||j|jfznB#t$r5}tj d|jd|j|d}~wwxYw|j3|jj}|pidt$j|_|dt+|jdz|_|jt$jkr/t$j|j|j|_d|jvr||j|jj_|jj}|U|j|jkr5|j|_t |j|_d|j_dSdSdS)Nz%s==%sz%s===%sz-Invalid distribution name or version syntax: -rrl .egg-info) rFrmrJrnr isinstancerrOVersionr ValueError distutilserrorsDistutilsOptionErrorrlrB package_dirgetr%curdirensure_dirnamerrdr&joincheck_broken_egg_infor _patched_distkeylower_version_parsed_version)rEparsed_version is_versionspecredirspds r;finalize_optionszegg_info.finalize_optionss   ..00&t'788 #NI4E4MNNJ)888yD  t/?@@ A A A A   "777 0 02   = $0D!ZR,,R;;DM J'''#DM22[@ =BI % %GLL FFDM $-    & & ( ( ( .2-="*   , >bf (;(;(=(===*BK!.t/?!@!@B .2D  + + + >==sAA?? B> 0B99B>Fc|r||||dStj|r3||st jd||dS||dSdS)aWrite `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&existsrwarn delete_file)rEwhatr{dataforces r;write_or_delete_filezegg_info.write_or_delete_files  + OOD(D 1 1 1 1 1 W^^H % % +|E|:D(  ***** + +r=ctjd|||d}|js;t |d}|||dSdS)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. zwriting %s to %sutf-8wbN)rinfoencodedry_runopenwriteclose)rErr{rfs r;rzegg_info.write_filesm #T8444{{7##| Xt$$A GGDMMM GGIIIII  r=cjtjd||jstj|dSdS)z8Delete `filename` (if not a dry run) after announcing itz deleting %sN)rrrr%unlink)rEr{s r;rzegg_info.delete_file"s> )))| Ih       r=c ||jtj|jdt jdD]P}|}|||jtj |j|jQtj |jd}tj |r| || dS)Nzegg_info.writers)groupznative_libs.txt) mkpathrdr%utimer entry_pointsloadrFr&rrr find_sources)rEepwriternls r;runz egg_info.run(s DM""" %%%'.@AAA H HBWWYYF F4"',,t}bg"F"F G G G GW\\$-): ; ; 7>>"   !   R  r=ctj|jd}t |j}|j|_||_| |j |_ dS)z"Generate SOURCES.txt manifest filez SOURCES.txtN) r%r&rrdmanifest_makerrBrpignore_egg_info_dirmanifestrfilelist)rEmanifest_filenamemms r;rzegg_info.find_sources6sVGLL FF D- . .!%!A'    r=c,|jdz}|jtjkr%tj|j|}tj|r0tjd||j |j |_ ||_ dSdS)NraB------------------------------------------------------------------------------ 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. ------------------------------------------------------------------------------) rmrlr%rr&rrrrrdro)rEbeis r;rzegg_info.check_broken_egg_info?smk) =BI % %',,t}c22C 7>>#   HOT]    $(=D DMMM r=NF)r\r]r^ description user_optionsboolean_options negative_optrqr_rssetterr|rrrrrrrrbr=r;rdrds?KL"lO:L111  X     7 7 7+3+3+3Z++++(        $$$      r=rdcteZdZdfd ZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZxZS)rNFcZt||||_dSrA)super__init__r)rEr debug_printr __class__s r;rzFileList.__init__Rs+ {+++#6   r=c |||\}}}}|j|j|j|jt j|j|t j|j||j |j d}dddddddd d} ||}n1#t$r$td | wxYw|d } |d vr|g}| r|fnd} ||} |d|g| r|gngz|z|D] } || st#j| | g| R!dS)N)includeexcludezglobal-includezglobal-excludezrecursive-includezrecursive-excludegraftprunez%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->rrrb )_parse_template_linerrglobal_includeglobal_exclude functoolspartialrecursive_includerecursive_excluderrKeyErrorrformat startswithrrrr) rElinerpatternsdir dir_pattern action_maplog_mapprocess_actionaction_is_recursiveextra_log_argslog_tmplpatterns r;process_template_linezFileList.process_template_lineVs 04/H/H/N/N,3 ||"1"1!*!2&"""+!2&""ZZ   ? +6'2CM/  4 '/NN   (Af%%  %// == ' ' '#}H$7?#R6?  HH-5#27       = =G!>'** =7<^<<<< = =s B .B7cd}tt|jdz ddD]E}||j|r-|d|j|z|j|=d}F|S)z Remove all files from the file list that match the predicate. Return True if any matching files were removed Frz removing T)ranger+filesr)rE predicatefoundr5s r; _remove_fileszFileList._remove_filess| s4:*B33  AyA''    1 !=>>>JqM r=c|dt|D}||t|S)z#Include files that match 'pattern'.cPg|]#}tj|!|$Srbr%r&isdir.0rs r; z$FileList.include..s+BBBqq1A1ABBBBr=rextendra)rErrs r;rzFileList.includes9BBDMMBBB EE{{r=cTt|}||jS)z#Exclude files that match 'pattern'.)r<rmatchrErrs r;rzFileList.excludes%!'**!!%+...r=ctj|d|}dt|dD}||t |S)zN Include all files anywhere in 'dir/' that match the pattern. rcPg|]#}tj|!|$Srbrrs r;rz.FileList.recursive_include..s:***q a((****r=T) recursive)r%r&rrrra)rErr full_patternrs r;rzFileList.recursive_includescw||Cw77 **D>>>*** EE{{r=cttj|d|}||jS)zM Exclude any file anywhere in 'dir/' that match the pattern. rr<r%r&rrr)rErrrs r;rzFileList.recursive_excludes9""',,sD'"B"BCC!!%+...r=c|dt|D}||t|S)zInclude all files from 'dir/'.cVg|]&}tj|D]}|'Srb)rrfindall)r match_diritems r;rz"FileList.graft..sP   !*229==       r=r)rErrs r;rzFileList.graftsF  !#YY    EE{{r=cttj|d}||jS)zFilter out files from 'dir/'.rr)rErrs r;rzFileList.prunes5!"',,sD"9"9::!!%+...r=c|j|ttjd|fd|jD}||t|S)z Include all files anywhere in the current directory that match the pattern. This is very inefficient on large file trees. Nrc>g|]}||Srb)r)rrrs r;rz+FileList.global_include..s(<<%@%@ A A A A A A Bs"B75>B771C,+C,)NNF)r\r]r^rrrrrrrrrrrrrrr __classcell__)rs@r;rrOs777777K=K=K=Z    /// //////   ///$$$:::???BBBBBBBr=rcdeZdZdZdZdZdZdZdZdZ e dZ d Z d Z d Zd Zd S)rz MANIFEST.incLd|_d|_d|_d|_d|_dS)NrF) use_defaultsr manifest_onlyforce_manifestrrDs r;rqz!manifest_maker.initialize_options"s/ #(   r=cdSrArbrDs r;rzmanifest_maker.finalize_options)s r=ct|j|_tj|js||tj|j r| | | |j |j|dS)N)r)rrrr%r&rrwrite_manifest add_defaultstemplate read_templateadd_license_filesprune_file_listsortremove_duplicatesrDs r;rzmanifest_maker.run,s T5MNNN w~~dm,, "    ! ! !  7>>$- ( ( !           ''))) r=cjtj|}|tjdS)N/)rrreplacer%r')rEr&s r;_manifest_normalizez"manifest_maker._manifest_normalize9s(+D11||BFC(((r=cjfdjjD}djz}t j|f|dS)zo Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. c:g|]}|Srb)r4)rrrEs r;rz1manifest_maker.write_manifest..Es'JJJ))!,,JJJr=zwriting manifest file '%s'N)rrrrexecuter)rErmsgs` r;r)zmanifest_maker.write_manifest=si KJJJdm6IJJJ*T]: Z$-!7=====r=c^||stj||dSdSrA)_should_suppress_warningr r)rEr8s r;rzmanifest_maker.warnIs:,,S11 " JtS ! ! ! ! ! " "r=c,tjd|S)z; suppress missing-file warnings from sdist zstandard file .*not found)r(r)r8s r;r:z'manifest_maker._should_suppress_warningMs x4c:::r=cdtj||j|j|j|jt t}|r|j|n8tj |jr| tj dr|jd| d}|j|jdS)Nzsetup.pyrd)r r*rrr+rrr rr%r&r read_manifestget_finalized_commandrrd)rErcfilesei_cmds r;r*zmanifest_maker.add_defaultsTs 4    T]+++ T]+++|~~&&  ! M  ) ) ) ) W^^DM * * !    7>>* % % - M  , , ,++J77 FO,,,,,r=c|jjjpg}|D]}tjd||j|dS)Nzadding license file '%s')rBr license_filesrrrr)rErBlfs r;r-z manifest_maker.add_license_filesfsV)2@FB   B H/ 4 4 4  ]+++++r=cZ|d}|j}|j|j|j|t jtj }|j d|zdz|zddS)Nbuildz(^|z)(RCS|CVS|\.svn)r)is_regex) r>rB get_fullnamerr build_baser(r)r%r'exclude_pattern)rErEbase_dirr's r;r.zmanifest_maker.prune_file_listms**733$1133 E,--- H%%%i %%fsl5H&H3&N/0 & 2 2 2 2 2r=ct|dr|Stjdt|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_manifestzCustom 'build_py' does not implement 'get_data_files_without_manifest'. Please extend command classes from setuptools instead of distutils.)hasattrrLwarningsrrget_data_files)rEbuild_pys r;_safe_data_fileszmanifest_maker._safe_data_filesvs[ 8> ? ? >;;== =  5 )    &&(((r=N)r\r]r^r+rqrrr4r)r staticmethodr:r*r-r.rQrbr=r;rrsH)))      ))) > > >""";;\; ---$,,,222)))))r=rcd|}|d}t|d5}||ddddS#1swxYwYdS)z{Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it.  rrN)rrrr)r{contentsrs r;rrsyy""Hw''H h   sAA"%A"c~tjd||js|jj}|j|jc|_}|j|jc|_} |j |j ||c|_|_n#||c|_|_wxYwt|jdd}tj |j |dSdS)Nz writing %szip_safe)rrrrBrrnrOrmrFwrite_pkg_infordgetattrrwrite_safety_flag)cmdbasenamer{roldveroldnamesafes r;rXrXsH\8$$$ ;8#,#&?H4D &!$x} w > $H #CL 1 1 1.5v +HM8++gv +HM8+ = = = =s'T::#CL$7777788s A77Bcptj|rtjddSdS)NzsWARNING: 'depends.txt' is not used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)r%r&rrrr[r\r{s r;warn_depends_obsoleterbsF w~~h   L       r=cxt|pd}d}t||}||dS)Nrbc |dzS)NrTrb)rs r; append_crz&_write_requirements..append_crs d{r=)rmap writelines)streamreqslinesres r;_write_requirementsrksK   # #E  5 ! !E er=c p|j}tj}t||j|jpi}t |D]D}|djditt|||E| d|| dS)Nz [{extra}] requirementsrb) rBioStringIOrkinstall_requiresextras_requiresortedrrvarsrgetvalue)r[r\r{distrrqextras r;write_requirementsrws  D ;==Dd3444(.BN''99 )?)33DFF33444D."78888^Xt}}GGGGGr=ctj}t||jj|d||dS)Nzsetup-requirements)rnrorkrBsetup_requiresrrt)r[r\r{rs r;write_setup_requirementsrzsJ ;==Dc.=>>>18T]]__MMMMMr=c td|jD}|d|dt |dzdS)NcFg|]}|dddS).rr)r$)rks r;rz(write_toplevel_names..s9    GGCOOA    r=ztop-level namesrT)rzfromkeysrBiter_distribution_namesrrrr)r[r\r{pkgss r;write_toplevel_namesrsv ==  %==??     D NN$h &,,0G0G$0NOOOOOr=c*t|||ddS)NT) write_argras r; overwrite_argrs c8Xt,,,,,r=Fctj|d}t|j|d}|d|dz}|||||dS)NrrT)r%r&splitextrYrBrr)r[r\r{rargnamervs r;rrslgx((+G C$gt 4 4E  %  4'Whu=====r=ctj|jj}tj|}|d||ddS)Nz entry pointsT)r rrBrrenderr)r[r\r{epsdefns r; write_entriesrsH  S-: ; ;C   $ $D^XtTBBBBBr=cjtjdttjdryt jd5}|D]I}tj d|}|r0t| dccdddSJ dddn #1swxYwYdS)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.zPKG-INFOzVersion:.*-r(\d+)\s*$rNr) rNrEggInfoDeprecationWarningr%r&rrnrr(rintr)rrrs r;get_pkg_info_revisionrs  M.0IKKK w~~j!!/ WZ  /A / /!94@@/u{{1~~....  / / / / / / / // / / / / / / / / / / / / / / / / 1s?B(B((B,/B,ceZdZdZdS)rz?Deprecated behavior warning for EggInfo, bypassing suppression.N)r\r]r^__doc__rbr=r;rrsIIIIr=rr)>rdistutils.filelistr _FileListdistutils.errorsrdistutils.utilrrrrr%r(rrnrNrYrx _importlibrrr setuptoolsr setuptools.command.sdistr r setuptools.command.setoptr setuptools.commandr pkg_resourcesrrrrrsetuptools.unicode_utilsrsetuptools.globrsetuptools.externrsetuptools.extern.jaraco.textrrr<r?rdrrrXrbrkrwrzrrrrrrrbr=r;rs<<544444333333''''''  !!!!!!******111111111111((((((100000 ''''''555555333333P;P;P;f&&&&&&&&Ri i i i i z7i i i XMBMBMBMBMByMBMBMB`j)j)j)j)j)Uj)j)j)Z   888&   HHHNNN PPP--->>>>CCC    JJJJJ <JJJJJr=