Jd dZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z ddlmZddlZddlmZddlmZdd lmZdd lmZmZdd lmZdd lmZgd Zejj Z dZ!ej"Z#ej"Z$dZ%dZ&ej'j&je&_ej(ej'j)Z*Gdde*Z)dZ+ej,fdZ-ej.e dZ Gdde/Z0ej1dS)z@Extensions to the 'distutils' for large or complex distributionsN)DistutilsOptionError) convert_path)SetuptoolsDeprecationWarning) Extension) Distribution)Require) PackageFinderPEP420PackageFinder)monkey)logging)setuprCommandrr r find_packagesfind_namespace_packagescGddtjj}||}|d|jr||jdSdS)Nc4eZdZdZfdZdfd ZdZxZS)4_install_setup_requires..MinimalDistributionzl A minimal version of a distribution for supporting the fetch_build_eggs interface. cd}fdt|tzD}t||jdS)N)dependency_linkssetup_requiresc"i|] }|| Sr).0kattrss F/opt/alt/python311/lib/python3.11/site-packages/setuptools/__init__.py zQ_install_setup_requires..MinimalDistribution.__init__..8sEEE58EEE)setsuper__init__ set_defaults_disable)selfr_inclfiltered __class__s ` rr"z=_install_setup_requires..MinimalDistribution.__init__6sf8EEEEESZZ#e**-DEEEH GG  X & & &   & & ( ( ( ( (rNc~ t|\}}|dfS#t$r|dfcYSwxYw)zAIgnore ``pyproject.toml``, they are not related to setup_requiresr)r! _split_standard_project_metadata Exception)r% filenamescfgtomlr(s r_get_project_config_fileszN_install_setup_requires..MinimalDistribution._get_project_config_files=sW %!GGDDYOO TBw % % % "}$$$ %s '+<<cdS)zl Disable finalize_options to avoid building the working set. Ref #2158. Nr)r%s rfinalize_optionszE_install_setup_requires..MinimalDistribution.finalize_optionsEsrN)__name__ __module__ __qualname____doc__r"r/r1 __classcell__r(s@rMinimalDistributionr0so   ) ) ) ) ) % % % % % %       rr9T)ignore_option_errors) distutilscorerparse_config_filesrfetch_build_eggs)rr9dists r_install_setup_requiresr@-sin96  u % %D 666 3 d12222233rc rtjt|tjjdi|S)Nr)r configurer@r;r<r)rs rrrSs8 E""" >  ( (% ( ((rc<eZdZdZdZfdZd dZdZd dZxZ S) ra Setuptools internal actions are organized using a *command design pattern*. This means that each action (or group of closely related actions) executed during the build should be implemented as a ``Command`` subclass. These commands are abstractions and do not necessarily correspond to a command that can (or should) be executed via a terminal, in a CLI fashion (although historically they would). When creating a new command from scratch, custom defined classes **SHOULD** inherit from ``setuptools.Command`` and implement a few mandatory methods. Between these mandatory methods, are listed: .. method:: initialize_options(self) Set or (reset) all options/attributes/caches used by the command to their default values. Note that these values may be overwritten during the build. .. method:: finalize_options(self) Set final values for all options/attributes used by the command. Most of the time, each option/attribute/cache should only be set if it does not have any value yet (e.g. ``if self.attr is None: self.attr = val``). .. method:: run(self) Execute the actions intended by the command. (Side effects **SHOULD** only take place when ``run`` is executed, for example, creating new files or writing to the terminal output). A useful analogy for command classes is to think of them as subroutines with local variables called "options". The options are "declared" in ``initialize_options()`` and "defined" (given their final values, aka "finalized") in ``finalize_options()``, both of which must be defined by every command class. The "body" of the subroutine, (where it does all the work) is the ``run()`` method. Between ``initialize_options()`` and ``finalize_options()``, ``setuptools`` may set the values for options/attributes based on user's input (or circumstance), which means that the implementation should be careful to not overwrite values in ``finalize_options`` unless necessary. Please note that other commands (or other parts of setuptools) may also overwrite the values of the command's options/attributes multiple times during the build process. Therefore it is important to consistently implement ``initialize_options()`` and ``finalize_options()``. For example, all derived attributes (or attributes that depend on the value of other attributes) **SHOULD** be recomputed in ``finalize_options``. When overwriting existing commands, custom defined classes **MUST** abide by the same APIs implemented by the original class. They also **SHOULD** inherit from the original class. Fc t|t||dS)zj Construct the command for dist, updating vars(self) with any keyword parameters. N)r!r"varsupdate)r%r?kwr(s rr"zCommand.__init__s=  T "rNc t||}|t||||St|tst d|d|d|d|S)N'z ' must be a z (got `z`))getattrsetattr isinstancestrr)r%optionwhatdefaultvals r_ensure_stringlikezCommand._ensure_stringlikesqdF## ; D&' * * *NC%% &&28&&$$$D  rc6t||}|dSt|tr&t||t jd|dSt|t rtd|D}nd}|std|d|ddS)aEnsure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become ["foo", "bar", "baz"]. .. TODO: This method seems to be similar to the one in ``distutils.cmd`` Probably it is just here for backward compatibility with old Python versions? :meta private: Nz,\s*|\s+c3@K|]}t|tVdSr2)rLrM)rvs r z-Command.ensure_string_list..s,99As++999999rFrIz!' must be a list of strings (got )) rJrLrMrKresplitlistallr)r%rNrQoks rensure_string_listzCommand.ensure_string_listsdF## ; F S ! !  D&"(;"<"< = = = = =#t$$ 99S99999 **AGM  rrc t|||}t|||Sr2)_Commandreinitialize_commandrErF)r%commandreinit_subcommandsrGcmds rr`zCommand.reinitialize_commands9++D';MNN S  rr2)r) r3r4r5r6command_consumes_argumentsr"rRr]r`r7r8s@rrr`s44l"'    6rrcdtj|dD}ttjj|S)z% Find all files under 'path' c3hK|]-\}}}|D]$}tj||V%.dSr2)ospathjoin)rbasedirsfilesfiles rrVz#_find_all_simple..sc D$   T4  rT) followlinks)rgwalkfilterrhisfile)rhresultss r_find_all_simplerssE!#4!@!@!@G "'.' * **rct|}|tjkr5tjtjj|}t||}t|S)z Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. )start) rsrgcurdir functoolspartialrhrelpathmaprZ)dirrlmake_rels rfindallr}sR S ! !E bi$RW_C@@@He$$ ;;rcvddlm}d}tj||tt |S)Nr)cleandocz The function `convert_path` is considered internal and not part of the public API. Its direct usage by 3rd-party packages is considered deprecated and the function may be removed in the future. )inspectrwarningswarnr _convert_path)pathnamermsgs rrrsF       C  M((3--!=>>>  " ""rceZdZdZdS)sicz;Treat this string as-is (https://en.wikipedia.org/wiki/Sic)N)r3r4r5r6rrrrrsEEEErr)2r6rwrgrXr_distutils_hack.override_distutils_hackdistutils.corer;distutils.errorsrdistutils.utilrr_deprecation_warningrsetuptools.version setuptoolssetuptools.extensionrsetuptools.distrsetuptools.dependsr setuptools.discoveryr r r r __all__version __version__bootstrap_install_fromfindrrr@rr< get_unpatchedrr_rsrvr}wrapsrMr patch_allrrrrsNFF 111111888888>>>>>>******((((((&&&&&&CCCCCCCC    , " -2#3#3#3L)))$,  6   6 7 7jjjjjhjjjZ + + +     # #  #FFFFF#FFF r