4h.fUdZddlZddlZddlZddlmZddlmZddlm Z m Z ddl m Z ddl mZddlmZmZmZmZmZmZmZmZmZmZdd lmZer dd lmZdd lmZeiZ ee!d <eej"e#fZ$ee%e#fZ&ed ee$gdfZ'ee#e'fZ(ej)e*Z+dd de%de$dd fdZ,dd de%de$fdZ-dd de%de$fdZ.dd de%fdZ/de#de#fdZ0dd de#defdZ1dddd Z2d!e#dee#fd"Z3dd d#e&de$fd$Z4dd d#e%de$fd%Z5dd d#ee%d&e$d'e#fd(Z6dd d#e%fd)Z7dd d#e%fd*Z8dd d#e9fd+Z:dd d#e%fd,Z;de%fd-Zd2d3deee#effd4Z?d5e#de#fd6Z@d7eee#ee#e#fdee#fd8ZAd9ZBd:ZCe4e5e e6d;<e e6d=<e7e:e;e8d>ZDee#e(fe!d?<d@dAiZEdBdCiZFhdDZGeBdEeBdFeBdGeBdHeCdIdJeBdKeCdLdMeCdNdOeBdPeBdQeBdReBdSeCdTdUeCdVdWdXZHGdYdZeIZJdS)[akTranslation layer between pyproject config and setuptools distribution and metadata objects. The distribution and metadata objects are modeled after (an old version of) core metadata, therefore configs in the format specified for ``pyproject.toml`` need to be processed before being applied. **PRIVATE MODULE**: API reserved for setuptools internal usage only. N)Mapping)Address)partialreduce)chain)MappingProxyType) TYPE_CHECKINGAnyCallableDictListOptionalSetTupleTypeUnion)SetuptoolsDeprecationWarningmetadata DistributionEMPTYrdistconfigfilenamereturnc|s|Stj|pd}t|||t |||tj}tj| ||tj|n#tj|wxYw|S)z=Apply configuration dict read with :func:`read_configuration`.) ospathdirname_apply_project_table_apply_tool_tablegetcwdchdir_finalize_requires_finalize_license_files)rrrroot_dircurrent_directorys /builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.pyapplyr+$s  wx((/CHvx000dFH--- HX$ !!! $$&&& "####"#### Ks 0(B--Cr(c|di}|sdSt||t||D]]\}}t |}t ||}t|r||||Lt|||^dS)Nproject) getcopy_handle_missing_dynamic_unify_entry_pointsitemsjson_compatible_keyPYPROJECT_CORRESPONDENCEcallable _set_config)rrr( project_tablefieldvaluenorm_keycorresps r*r"r":sJJy"--2244M D-000 &&&%++--.. u&u--*..xBB G   . GD% * * * * gu - - - - ..c|didi}|sdS|D]x\}}t|}|tvr/t|}d|d|}t j|t t||}t|||yt|||dS)Ntool setuptoolszThe parameter `z` is deprecated, ) r.r2r3TOOL_TABLE_DEPRECATIONSwarningswarnrTOOL_TABLE_RENAMESr6_copy_command_options) rrr tool_tabler8r9r: suggestionmsgs r*r#r#KsFB''++L"==J "((** + + u&u-- . . .0:JKHKKzKKC M#; < < <%))(H==D(E****&$11111r<r7ct|dg}tD]O\}}||vsF||vsB||}|r5t||}t j|tPdS)zJBe temporarily forgiving with ``dynamic`` fields not listed in ``dynamic``dynamicN)setr._PREVIOUSLY_DEFINEDr2_WouldIgnoreFieldmessagerArB)rr7rIr8getterr9rGs r*r0r0^s-##Ir2233G,224466 v&&%7*:*:F4LLE 6'//u== c#4555 66r<keycR|ddS)z1As defined in :pep:`566#json-compatible-metadata`-_)lowerreplace)rOs r*r3r3js 99;;  sC ( ((r<r8r9ct|jd|d}|r ||dSt|j|s |tvrt |j||dSt |||dS)Nset_)getattrrhasattrSETUPTOOLS_PATCHESsetattr)rr8r9setters r*r6r6os T]N5NND 9 9F $u  & &$%3E*E*E ue,,,,,eU#####r<z text/markdownz text/x-rstz text/plain)z.mdz.rstz.txtfilec@tj|\}}|sdS|tvr t|SddtD}d|d}td|d|)N, c3,K|]\}}|d|dVdS)z ()N.0kvs r* z&_guess_content_type..s2FFtq!llalllFFFFFFr<z3only the following file extensions are recognized: rzUndefined content type for )rr splitextrS_CONTENT_TYPESjoinr2 ValueError)r\rRextvalidrGs r*_guess_content_typerms W  djjll + +FAs t nc"" IIFF~/C/C/E/EFFF F FE H H H HC @4@@3@@ A AAr<valcbddlm}t|tr&|||}t |}nG|dp)||dg|}|d}t|d||rt|d|dSdS)Nrexpandtextr\z content-typelong_descriptionlong_description_content_type)setuptools.configrq isinstancestr read_filesrmr.r6)rrnr(rqrrctypes r*_long_descriptionrzs((((((#s$  h//#C((wwvR&"3"3CGGFB4G4G"R"RN#($/// BD95AAAAABBr<cddlm}d|vr.t|d||dg|dSt|d|ddS)Nrrpr\licenserr)rurqr6rx)rrnr(rqs r*_licenser}sg(((((( }}D)V%6%6F }h%O%OPPPPPD)S[11111r< _root_dirkindcg}g}|D]}d|vr||d"d|vr||dBt|d|d}|t||r$t||d||r)t||dd|dSdS)Nnameemail) display_name addr_specr^_email)appendrrwr6ri)rrnr~rr8 email_fieldpersonaddrs r*_peoplers EK**      vg / / / / F " " LL ( ( ( (v&/RRRD   s4yy ) ) ) ) 2D$ % 0 0111CDT///499[+A+ABBBBBCCr<c(t|d|dS)N project_urls)r6)rrnr~s r* _project_urlsrsnc*****r<cFddlm}t|d||dS)Nr) SpecifierSetpython_requires)&setuptools.extern.packaging.specifiersrr6)rrnr~rs r*_python_requiresrs7CCCCCC'c):):;;;;;r<cvt|dgrd}tj|t|d|dS)Ninstall_requireszA`install_requires` overwritten in `pyproject.toml` (dependencies))rWrArBr6)rrnr~rGs r* _dependenciesrsEt',,Q c(#.....r<cRt|di}t|di||dS)Nextras_require)rWr6)rrnr~existings r*_optional_dependenciesrs8t-r22H&(;8(;s(;<<<<z2_unify_entry_points...s&:::DAqa<z'_unify_entry_points..sE# # # e ::EKKMM:::# # # r<)poplistr2r3)r7r-rrenamingrOr9r:s r*r1r1sG;;~w{{>2/N/NOOL,]KKH7==??++@@ U&s++ x  E /6{{3/?/?L(+ , # # +1133# # #   r< pyprojectc |di}|didi}t|}|j}|didiD]\}}t |}||t } ||i|D]S\} } t | } t|| f||| <| | vr!t d|d| dTdS)Nr>r?cmdclass distutilszCommand option rz is not defined) r._valid_command_optionscommand_optionsr2r3rJ setdefaultrw_loggerwarning) rrrrEr valid_optionscmd_optscmdrrlrOr9s r*rDrDsQvr**J~~lB//33JCCH*844M#H }}VR0044["EEKKMM N N V!#&&!!#suu--C$$$ ,,.. N NJC%c**C"%h--!7HSM# % L# L L L L LMMM  N N Nr<rc |ddlm}ddlm}dt |ji}|jd}d|D}d |D}t||D]M\}}| |t} | t t|d gz} | ||<N|S) Nrrrglobalzdistutils.commands)rc34K|]}t|VdSN)_load_eprceps r*rfz)_valid_command_options..s(HHB8B<<HHHHHHr<c3K|]}||V dSrrars r*rfz)_valid_command_options..s';;2;B;;;;;;r< user_options) _importlibrsetuptools.distr_normalise_cmd_optionsglobal_optionsrrr2r.rJrW) rrrrunloaded_entry_pointsloaded_entry_pointsrr cmd_classoptss r*rrs%%%%%%,,,,,,5l6QRRSM1H18LMMMHH2GHHH;;!4;;;L hnn.>.>??""Y  cee,,,WYPR-S-STTT! c r<rzmetadata.EntryPointc |j|fS#t$r@}|jjd|j}t |d|Yd}~dSd}~wwxYw)Nz" while trying to load entry-point z: )rload Exception __class____name__rr)rexrGs r*rrs~## &SS"'SS3"'''ttttts A'5A""A'rcFt|dS)Nz_=)r3strip)rs r*_normalise_cmd_option_keyr s t $ $ * *4 0 00r<desccd|DS)Nc8h|]}t|dS)r)r)rc fancy_options r* z)_normalise_cmd_options..s% P P P< %l1o 6 6 P P Pr<ra)rs r*rrs P P4 P P PPr<cVttd|dS)a8 Similar to ``operator.attrgetter`` but returns None if ``attr`` is not found >>> from types import SimpleNamespace >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13)) >>> _attrgetter("a")(obj) 42 >>> _attrgetter("b.c")(obj) 13 >>> _attrgetter("d")(obj) is None True c$t||dSr)rW)accxs r*z_attrgetter..s'#q$*?*?r<r)rrsplit)attrs r* _attrgetterrs$ 6??C Q QQr<cfd}|S)aL Return the first "truth-y" attribute or None >>> from types import SimpleNamespace >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13)) >>> _some_attrgetter("d", "a", "b.c")(obj) 42 >>> _some_attrgetter("d", "e", "b.c", "a")(obj) 13 >>> _some_attrgetter("d", "e", "f")(obj) is None True cVfdD}td|DdS)Nc3HK|]}t|VdSr)r)rciobjs r*rfz5_some_attrgetter.._acessor../s355!.+a..%%555555r<c3K|]}||V dSrra)rcrs r*rfz5_some_attrgetter.._acessor..0s"881!-Q----88r<)next)rvaluesr2s` r*_acessorz"_some_attrgetter.._acessor.s<5555u55588888$???r<ra)r2rs` r*_some_attrgetterr"s(@@@@@ Or<author)r maintainer)readmer|authors maintainersurls dependenciesoptional_dependenciesrequires_pythonr4 script_filesrnamespace_packagesz5consider using implicit namespaces instead (PEP 420).> license_filer license_filesprovides_extrasrtz metadata.namezmetadata.versionzmetadata.descriptionzmetadata.long_descriptionrzmetadata.python_requireszmetadata.licensezmetadata.authorzmetadata.author_emailzmetadata.maintainerzmetadata.maintainer_emailzmetadata.keywordszmetadata.classifierszmetadata.project_urlsr_orig_install_requiresr_orig_extras_requirer)rversion descriptionrzrequires-pythonr|rrkeywords classifiersrrrzoptional-dependenciesc,eZdZdZdZedZdS)rLzGInform users that ``pyproject.toml`` would overwrite previous metadata.a {field!r} defined outside of `pyproject.toml` would be ignored. !! ########################################################################## # configuration would be ignored/result in error due to `pyproject.toml` # ########################################################################## The following seems to be defined outside of `pyproject.toml`: `{field} = {value!r}` According to the spec (see the link below), however, setuptools CANNOT consider this value unless {field!r} is listed as `dynamic`. https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ For the time being, `setuptools` will still consider the given value (as a **transitional** measure), but please note that future releases of setuptools will follow strictly the standard. To prevent this warning, you can list {field!r} under `dynamic` or alternatively remove the `[project]` table from your file and rely entirely on other means of configuration. !! cXddlm}||j||S)Nr)cleandoc)r8r9)inspectrMESSAGEformat)clsr8r9rs r*rMz_WouldIgnoreField.messagevs9$$$$$$x **e*DDEEEr<N)r __module__ __qualname____doc__r classmethodrMrar<r*rLrLYsAQQG4FF[FFFr<rL)KrloggingrrAcollections.abcremail.headerregistryr functoolsrr itertoolsrtypesrtypingr r r r r rrrrrsetuptools._deprecation_warningrsetuptools._importlibrrrr__annotations__PathLikerw_Pathdict _DictOrStr _CorrespFn_Correspondence getLoggerrrr+r"r#r0r3r6rhrmrzr}rrrrrrr1rDrrrrrrr4rCr@rYrK UserWarningrLrar<r*rs ######((((((%%%%%%%%""""""!!!!!!!!!!!!!!!!!!!!!!!!IHHHHH-......,,,,,,!!"%%w%%% bk3 49  ~sE2D8 9 Z( ' H % %.,.~.t.u...."2N2D2E2222& 6. 6 6 6 6 6)S)S)))) $n$S$$$$$    Bc Bhsm B B B B BN B Bu B B B B2>222222C.CtDzCeC3CCCC$++T++++<><<<<< //T////==d====  t     NTNN5NNNN&05Wc3s8m9L"&8E#t)4D+E1C1C1111QeC#,C&D!EQ#c(QQQQ R R R& wwX...77666 !3' 8 8$sO34   %i0QJJJ K ( ({-..;566k566''(9;UVV{-.. 13JKK##$9;VWW /00;566 K/ 0 0K//$$%=?QRR--.DFVWW$ F F F F F F F F F Fr<