a (šRe÷bã@sÎdZddlmZddlmZddlmZddlm Z ddlZddlZddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlmZddlmZdd lmZdd lmZdd lmZdd lmZmZmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%dd l&m'Z'ddl(m)Z)ddlm*Z*dd„Z+Gdd„dƒZ,Gdd„de,eƒZ-Gdd„deƒZGdd„deƒZ.dd„Z/dd„Z0dd„Z1d d!„Z2d"d#„Z3d$d%„Z4d&d'„Z5d(d)„Z6d3d+d,„Z7d-d.„Z8d/d0„Z9Gd1d2„d2e*ƒZ:dS)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)ÚSetuptoolsDeprecationWarningcCsÞd}| tjj¡}t tj¡}d|f}t|ƒD]Œ\}}|t|ƒdk}|dkrr|r`|d7}q0|d||f7}q0d}t|ƒ} || kr²||} | dkr¨||d7}n| d krº||7}nî| d krš|d} | | krè|| d krè| d} | | kr|| d kr| d} | | kr,|| d kr,| d} q| | krF|t | ¡7}nR||d| …} d} | dd krxd } | dd…} | t | ¡7} |d| f7}| }n|t | ¡7}|d7}q~|s0||7}q0|d7}tj|tj tj BdS)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ÚpatÚchunksr#Z valid_charÚcÚchunkÚ last_chunkÚiZ chunk_lenÚcharZinner_iÚinnerÚ char_class©r4ú‘/builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/setuptools/command/egg_info.pyÚtranslate_pattern#sV           r6c@s@eZdZdZdZedd„ƒZdd„Zdd„Zdd „Z ee ƒZ dS) Ú InfoCommonNcCst|j ¡ƒS©N)r Ú distributionÚget_name©Úselfr4r4r5ÚnamezszInfoCommon.namecCst| |j ¡¡ƒSr8)rÚ _maybe_tagr9Ú get_versionr;r4r4r5Útagged_version~szInfoCommon.tagged_versioncCs |jr| |j¡r|S||jS)z egg_info may be called more than once for a distribution, in which case the version string already contains all tags. )ÚvtagsÚendswith©r<Úversionr4r4r5r>sþzInfoCommon._maybe_tagcCs,d}|jr||j7}|jr(|t d¡7}|S)Nrz-%Y%m%d)Ú tag_buildÚtag_dateÚtimeÚstrftimerCr4r4r5Útags‹s  zInfoCommon.tags) Ú__name__Ú __module__Ú __qualname__rErFÚpropertyr=r@r>rIrAr4r4r4r5r7vs  r7c@sŠeZdZdZgd¢ZdgZddiZdd„Zedd„ƒZ e j d d„ƒZ d d „Z d d „Z ddd„Z dd„Zdd„Zdd„Zdd„Zdd„ZdS)Ú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]rPrScCs"d|_d|_d|_d|_d|_dS)NF)Úegg_baseÚegg_namerNÚ egg_versionÚbroken_egg_infor;r4r4r5Úinitialize_options¥s zegg_info.initialize_optionscCsdSr8r4r;r4r4r5Útag_svn_revision¯szegg_info.tag_svn_revisioncCsdSr8r4)r<Úvaluer4r4r5rZ³scCs0t ¡}| ¡|d<d|d<t|t|dƒ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. rErrF)rNN)Ú collectionsÚ OrderedDictrIr Údict)r<ÚfilenamerNr4r4r5Úsave_version_info¸s zegg_info.save_version_infoc CsV|j|_| ¡|_t|jƒ}z6t|tjjƒ}|r4dnd}t t ||j|jfƒƒWn>t y}z&t j  d|j|jf¡|‚WYd}~n d}~00|jdur¸|jj}|pªi dtj¡|_| d¡t|jƒd|_|jtjkròtj |j|j¡|_d|jvr| ¡|j|jj_|jj}|durR|j|j ¡krR|j|_t|jƒ|_ d|j_dS)Nz%s==%sz%s===%sz2Invalid distribution name or version syntax: %s-%srrUú .egg-infoú-)!r=rVr@rWr Ú isinstancerrDÚVersionÚlistr Ú ValueErrorÚ distutilsÚerrorsÚDistutilsOptionErrorrUr9Ú package_dirÚgetr!ÚcurdirÚensure_dirnamerrNr"ÚjoinÚcheck_broken_egg_infoÚmetadataZ _patched_distÚkeyÚlowerÚ_versionÚ_parsed_version)r<Úparsed_versionZ is_versionÚspecrOÚdirsÚpdr4r4r5Úfinalize_optionsÅsB   ÿÿ ÿÿý      zegg_info.finalize_optionsFcCsL|r| |||¡n4tj |¡rH|dur>|s>t d||¡dS| |¡dS)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)r<Úwhatr_ÚdataÚforcer4r4r5Úwrite_or_delete_fileös   ÿzegg_info.write_or_delete_filecCs>t d||¡| d¡}|js:t|dƒ}| |¡| ¡dS)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. zwriting %s to %súutf-8ÚwbN)rÚinfoÚencodeÚdry_runÚopenÚwriteÚclose)r<r~r_rÚfr4r4r5rz s    zegg_info.write_filecCs t d|¡|jst |¡dS)z8Delete `filename` (if not a dry run) after announcing itz deleting %sN)rr„r†r!Úunlink)r<r_r4r4r5r}s zegg_info.delete_filecCs’| |j¡t |jd¡|jj}tdƒD]4}|j|d| ¡}|||j tj   |j|j ¡ƒq*tj   |jd¡}tj   |¡r†|  |¡| ¡dS)Nzegg_info.writers)Ú installerznative_libs.txt)ÚmkpathrNr!Úutimer9Zfetch_build_eggrÚrequireÚresolver=r"rnr{r}Ú find_sources)r<rŒÚepÚwriterÚnlr4r4r5Úruns     z egg_info.runcCs4tj |jd¡}t|jƒ}||_| ¡|j|_dS)z"Generate SOURCES.txt manifest filez SOURCES.txtN) r!r"rnrNÚmanifest_makerr9Úmanifestr•Úfilelist)r<Zmanifest_filenameÚmmr4r4r5r‘-s  zegg_info.find_sourcescCsT|jd}|jtjkr&tj |j|¡}tj |¡rPt d||j ¡|j |_ ||_ dS)NraaB------------------------------------------------------------------------------ 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. ------------------------------------------------------------------------------) rVrUr!rlr"rnr{rr|rNrX)r<Zbeir4r4r5ro5s   ûzegg_info.check_broken_egg_infoN)F)rJrKrLÚ descriptionÚ user_optionsÚboolean_optionsÚ negative_optrYrMrZÚsetterr`ryrrzr}r•r‘ror4r4r4r5rN•s$ÿ    1  rNc@s|eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„ZdS)rc Cs | |¡\}}}}|j|j|j|jt |j|¡t |j|¡|j |j dœ}dddddddd dœ}z ||}Wn"t yŒt d j |d ƒ‚Yn0| d ¡} |d vr¦|g}| r°|fnd} ||} | d |g| rÒ|gng|¡¡|D] } || ƒsätj| | g| ¢RŽqädS)N)ÚincludeÚexcludezglobal-includezglobal-excludezrecursive-includezrecursive-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¢r4ú )Z_parse_template_linerŸr Úglobal_includeÚglobal_excludeÚ functoolsÚpartialÚrecursive_includeÚrecursive_excluder¡r¢ÚKeyErrorrÚformatÚ startswithÚ debug_printrnrr|) r<Úliner£ÚpatternsÚdirZ dir_patternZ action_mapZlog_mapZprocess_actionZaction_is_recursiveZextra_log_argsZlog_tmplÚpatternr4r4r5Úprocess_template_lineHs`ÿÿôé  ÿÿ  ÿþÿÿzFileList.process_template_linecCsRd}tt|jƒdddƒ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®)r<Ú predicateÚfoundr0r4r4r5Ú _remove_files•szFileList._remove_filescCs$dd„t|ƒDƒ}| |¡t|ƒS)z#Include files that match 'pattern'.cSsg|]}tj |¡s|‘qSr4©r!r"Úisdir©Ú.0rŠr4r4r5Ú ¤óz$FileList.include..©rÚextendÚbool©r<r²r¸r4r4r5rŸ¢s zFileList.includecCst|ƒ}| |j¡S)z#Exclude files that match 'pattern'.)r6r¹Úmatch©r<r²rÄr4r4r5r ¨szFileList.excludecCs8tj |d|¡}dd„t|ddDƒ}| |¡t|ƒS)zN Include all files anywhere in 'dir/' that match the pattern. rcSsg|]}tj |¡s|‘qSr4rºr¼r4r4r5r¾²s ÿz.FileList.recursive_include..T)Ú recursive)r!r"rnrrÁrÂ)r<r±r²Z full_patternr¸r4r4r5r©­s zFileList.recursive_includecCs ttj |d|¡ƒ}| |j¡S)zM Exclude any file anywhere in 'dir/' that match the pattern. r©r6r!r"rnr¹rÄ)r<r±r²rÄr4r4r5rª·szFileList.recursive_excludecCs$dd„t|ƒDƒ}| |¡t|ƒS)zInclude all files from 'dir/'.cSs"g|]}tj |¡D]}|‘qqSr4)rgr˜Úfindall)r½Z match_dirÚitemr4r4r5r¾Àsþz"FileList.graft..rÀ)r<r±r¸r4r4r5r¡¾s þ zFileList.graftcCsttj |d¡ƒ}| |j¡S)zFilter out files from 'dir/'.rrÇ)r<r±rÄr4r4r5r¢ÈszFileList.prunecsJ|jdur| ¡ttj d|¡ƒ‰‡fdd„|jDƒ}| |¡t|ƒS)z“ Include all files anywhere in the current directory that match the pattern. This is very inefficient on large file trees. Nrcsg|]}ˆ |¡r|‘qSr4©rÄr¼rÊr4r5r¾Õr¿z+FileList.global_include..)ÚallfilesrÈr6r!r"rnrÁrÂrÃr4rÊr5r¥Ís   zFileList.global_includecCsttj d|¡ƒ}| |j¡S)zD Exclude all files anywhere that match the pattern. rrÇrÅr4r4r5r¦ÙszFileList.global_excludecCs8| d¡r|dd…}t|ƒ}| |¡r4|j |¡dS)Nú r´)rBrÚ _safe_pathr¶Úappend)r<rÉr"r4r4r5rÎàs    zFileList.appendcCs|j t|j|ƒ¡dSr8)r¶rÁÚfilterrÍ)r<Úpathsr4r4r5rÁèszFileList.extendcCstt|j|jƒƒ|_dS)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)rerÏrÍr¶r;r4r4r5Ú_repairëszFileList._repairc Csšd}t |¡}|dur(t d|¡dSt |d¡}|durNt ||d¡dSz"tj |¡shtj |¡rnWdSWn$ty”t ||t   ¡¡Yn0dS)Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFr‚T) Ú unicode_utilsÚfilesys_decoderr|Z try_encoder!r"r{ÚUnicodeEncodeErrorÚsysÚgetfilesystemencoding)r<r"Zenc_warnZu_pathZ utf8_pathr4r4r5rÍõs    zFileList._safe_pathN)rJrKrLr³r¹rŸr r©rªr¡r¢r¥r¦rÎrÁrÑrÍr4r4r4r5rEsM     rc@sdeZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z e dd„ƒZ dd„Z dd„Z dd„ZdS)r–z MANIFEST.incCsd|_d|_d|_d|_dS)Nr)Z use_defaultsr¢Z manifest_onlyZforce_manifestr;r4r4r5rYsz!manifest_maker.initialize_optionscCsdSr8r4r;r4r4r5ryszmanifest_maker.finalize_optionscCsltƒ|_tj |j¡s| ¡| ¡tj |j¡r<|  ¡|  ¡|  ¡|j  ¡|j  ¡| ¡dSr8)rr˜r!r"r{r—Úwrite_manifestÚ add_defaultsÚtemplateZ read_templateÚadd_license_filesÚprune_file_listÚsortZremove_duplicatesr;r4r4r5r•s  zmanifest_maker.runcCst |¡}| tjd¡S)Nú/)rÒrÓÚreplacer!r#)r<r"r4r4r5Ú_manifest_normalize&s z"manifest_maker._manifest_normalizecsBˆj ¡‡fdd„ˆjjDƒ}dˆj}ˆ tˆj|f|¡dS)zo Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. csg|]}ˆ |¡‘qSr4)rßr¼r;r4r5r¾2r¿z1manifest_maker.write_manifest..zwriting manifest file '%s'N)r˜rÑr¶r—Úexecuterz)r<r¶Úmsgr4r;r5r×*s  zmanifest_maker.write_manifestcCs| |¡st ||¡dSr8)Ú_should_suppress_warningrr|)r<rár4r4r5r|6s zmanifest_maker.warncCs t d|¡S)z; suppress missing-file warnings from sdist zstandard file .*not found)r$rÄ)rár4r4r5râ:sz'manifest_maker._should_suppress_warningcCsŒt |¡|j |j¡|j |j¡ttƒƒ}|rB|j |¡nt j   |j¡rX|  ¡t j   d¡rp|j d¡|  d¡}|j |j¡dS)Nzsetup.pyrN)rrØr˜rÎrÙr—rerrÁr!r"r{Z read_manifestÚget_finalized_commandr¡rN)r<ZrcfilesZei_cmdr4r4r5rØAs     zmanifest_maker.add_defaultscCs4|jjjp g}|D]}t d|¡q|j |¡dS)Nzadding license file '%s')r9rpÚ license_filesrr„r˜rÁ)r<räÚlfr4r4r5rÚSs  z manifest_maker.add_license_filescCsZ| d¡}|j ¡}|j |j¡|j |¡t tj ¡}|jj d|d|dddS)NÚbuildz(^|z)(RCS|CVS|\.svn)r)Zis_regex) rãr9Ú get_fullnamer˜r¢Ú build_baser$r%r!r#Zexclude_pattern)r<ræÚbase_dirr#r4r4r5rÛZs    ÿzmanifest_maker.prune_file_listN)rJrKrLrÙrYryr•rßr×r|Ú staticmethodrârØrÚrÛr4r4r4r5r– s   r–cCsLd |¡}| d¡}t|dƒ}| |¡Wdƒn1s>0YdS)z{Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. Ú r‚rƒN)rnr…r‡rˆ)r_ÚcontentsrŠr4r4r5rzds   rzc CsŠt d|¡|js†|jj}|j|j|_}|j|j|_}z|  |j ¡W|||_|_n|||_|_0t |jddƒ}t   |j |¡dS)Nz writing %sZzip_safe)rr„r†r9rprWrDrVr=Úwrite_pkg_inforNÚgetattrr Zwrite_safety_flag)ÚcmdÚbasenamer_rpZoldverZoldnameÚsafer4r4r5ríqs  rícCstj |¡rt d¡dS)NzsWARNING: 'depends.txt' is not used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)r!r"r{rr|©rïrðr_r4r4r5Úwarn_depends_obsolete„s ÿrócCs,t|pdƒ}dd„}t||ƒ}| |¡dS)Nr4cSs|dS)Nrër4)r¯r4r4r5Ú append_crsz&_write_requirements..append_cr)rÚmapÚ writelines)ÚstreamÚreqsÚlinesrôr4r4r5Ú_write_requirementsŒs  rúcCsn|j}t ¡}t||jƒ|jp"i}t|ƒD]*}| djfit ƒ¤Ž¡t|||ƒq,|  d||  ¡¡dS)Nz [{extra}] Ú requirements) r9ÚioÚStringIOrúZinstall_requiresÚextras_requireÚsortedrˆr¬ÚvarsrÚgetvalue)rïrðr_ÚdistrrþÚextrar4r4r5Úwrite_requirements•s   rcCs,t ¡}t||jjƒ| d|| ¡¡dS)Nzsetup-requirements)rürýrúr9Zsetup_requiresrr)rïrðr_rr4r4r5Úwrite_setup_requirements srcCs:t dd„|j ¡Dƒ¡}| d|d t|ƒ¡d¡dS)NcSsg|]}| dd¡d‘qS)Ú.rr)r )r½Úkr4r4r5r¾¨sÿz(write_toplevel_names..ztop-level namesrë)r^Úfromkeysr9Ziter_distribution_namesrzrnrÿ)rïrðr_Úpkgsr4r4r5Úwrite_toplevel_names¦s þÿr cCst|||dƒdS)NT)Ú write_argròr4r4r5Ú overwrite_arg°sr FcCsHtj |¡d}t|j|dƒ}|dur4d |¡d}| ||||¡dS)Nrrë)r!r"Úsplitextrîr9rnr)rïrðr_r€Úargnamer[r4r4r5r ´s r cCs |jj}t|tƒs|dur |}nl|durŒg}t| ¡ƒD]H\}}t|tƒsnt ||¡}d tt t|  ¡ƒƒ¡}|  d||f¡q8d |¡}|  d||d¡dS)Nrëz [%s] %s rz entry pointsT) r9Z entry_pointsrcÚstrrÿÚitemsrÚ parse_grouprnrõÚvaluesrÎr)rïrðr_r’rÚsectionrìr4r4r5Ú write_entries¼s   rcCs€t dt¡tj d¡r|t d¡J}|D]4}t  d|¡}|r(t |  d¡ƒWdƒSq(Wdƒn1sr0YdS)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) Úwarningsr|ÚEggInfoDeprecationWarningr!r"r{rür‡r$rÄÚintÚgroup)rŠr¯rÄr4r4r5Úget_pkg_info_revisionÍsÿ   @rc@seZdZdZdS)rz?Deprecated behavior warning for EggInfo, bypassing suppression.N)rJrKrLÚ__doc__r4r4r4r5rÝsr)F);rÚdistutils.filelistrZ _FileListÚdistutils.errorsrÚdistutils.utilrrgrr§r!r$rÕrürrGr\Ú setuptoolsrZsetuptools.command.sdistrrZsetuptools.command.setoptr Zsetuptools.commandr Ú pkg_resourcesr r r rrrrrZsetuptools.unicode_utilsrÒZsetuptools.globrZsetuptools.externrrr6r7rNr–rzrírórúrrr r r rrrr4r4r4r5ÚsV         (    S1IW