bg( *dZddlmZddlZddlZddlZddlZddlmZddl m Z ddl m Z m Z mZejejejejeddxZejvegzejd dddlZd d lmZmZd d lmZd d lmZm Z d dl!m"Z"d dl#m$Z$d dl%m&Z&d dl'm(Z(ddl)Z*ddl+m,Z,gdZ-e ddZ.dZ/ej0Z1e j0Z2dZ3d#dZ4dZ5e*j6j5je5_e rddl)m7Z8nej9e*j6j7Z8Gdde8Z7dZ:ej;fd Z<Gd!d"e=Z>ej?dS)$z@Extensions to the 'distutils' for large or complex distributions) annotationsN)abstractmethod)Mapping) TYPE_CHECKINGTypeVaroverload setuptools_vendor backports)loggingmonkey)Require) PackageFinderPEP420PackageFinder) Distribution) Extension) __version__)SetuptoolsDeprecationWarning)DistutilsOptionError)setuprCommandrrr find_packagesfind_namespace_packages _CommandT_Command)boundcGddtjj}||}|d|jrt |dSdS)Nc6eZdZdZd fd Zd fd Zd ZxZS) 4_install_setup_requires..MinimalDistributionzl A minimal version of a distribution for supporting the fetch_build_eggs interface. attrsMapping[str, object]returnNonecd}fdt|tzD}t||jdS)N)dependency_linkssetup_requiresc"i|] }|| Sr)).0kr!s J/opt/cloudlinux/venv/lib64/python3.11/site-packages/setuptools/__init__.py zQ_install_setup_requires..MinimalDistribution.__init__..AsEEE58EEE)setsuper__init__ set_defaults_disable)selfr!_inclfiltered __class__s ` r,r1z=_install_setup_requires..MinimalDistribution.__init__?sf8EEEEESZZ#e**-DEEEH GG  X & & &   & & ( ( ( ( (r.Nc t|\}}n#t$r|dfcYSwxYw|dfS)zAIgnore ``pyproject.toml``, they are not related to setup_requiresr))r0 _split_standard_project_metadata Exception)r4 filenamescfg_tomlr7s r,_get_project_config_fileszN_install_setup_requires..MinimalDistribution._get_project_config_filesFsY %"WWEEiPP UU % % % "}$$$ %7Ns $(99cdS)zl Disable finalize_options to avoid building the working set. Ref #2158. Nr)r4s r,finalize_optionszE_install_setup_requires..MinimalDistribution.finalize_optionsNsr.)r!r"r#r$N)__name__ __module__ __qualname____doc__r1r>rA __classcell__r7s@r,MinimalDistributionr 9st   ) ) ) ) ) )             r.rIT)ignore_option_errors) distutilscorerparse_config_filesr'_fetch_build_eggs)r!rIdists r,_install_setup_requiresrP6sin96  u % %D 666  $  r.rOrc ||jdS#t$rU}d}d|jjvr?t |dr||n|d|dd}~wwxYw)Na It is possible a package already installed in your system contains an version that is invalid according to PEP 440. You can try `pip install --use-pep517` as a workaround for this problem, or rely on a new virtual environment. If the problem refers to a package that is not installed yet, please contact that package's maintainers or distributors. InvalidVersionadd_note )fetch_build_eggsr'r:r7rChasattrrSannounce)rOexmsgs r,rNrN\s d122222   r|4 4 4r:&& , C     l3lll+++ s A=AA88A=c rtjt|tjjdi|S)Nr))r configurerPrKrLr)r!s r,rrqs8 E""" >  ( (% ( ((r.)rceZdZUdZdZded<dfd Zdd Zdd Ze dddZ e dddZ dd dZ e d!dZ e d!dZ e d!dZxZS)"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: :meth:`initialize_options`, :meth:`finalize_options` and :meth:`run`. A useful analogy for command classes is to think of them as subroutines with local variables called "options". The options are "declared" in :meth:`initialize_options` and "defined" (given their final values, aka "finalized") in :meth:`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 :meth:`run` method. Between :meth:`initialize_options` and :meth:`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 :meth:`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 :meth:`initialize_options` and :meth:`finalize_options`. For example, all derived attributes (or attributes that depend on the value of other attributes) **SHOULD** be recomputed in :meth:`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. Fr distributionrOr#r$c t|t||dS)zj Construct the command for dist, updating vars(self) with any keyword parameters. N)r0r1varsupdate)r4rOkwr7s r,r1zCommand.__init__s=  T "r.Nc t||}|t||||St|tst d|d|d|d|S)N'z ' must be a z (got `z`))getattrsetattr isinstancestrr)r4optionwhatdefaultvals r,_ensure_stringlikezCommand._ensure_stringlikesqdF## ; D&' * * *NC%% &&28&&$$$D  r.rhrgc6t||}|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|tVdSrB)rfrg)r*vs r, z-Command.ensure_string_list..s,99As++999999r.Frcz!' must be a list of strings (got )) rdrfrgreresplitlistallr)r4rhrkoks r,ensure_string_listzCommand.ensure_string_listsdF## ; F S ! !  D&"(;"<"< = = = = =#t$$ 99S99999 **AGM  r.commandreinit_subcommandsboolrc dSrBr)r4rxryras r,reinitialize_commandzCommand.reinitialize_commands 3r.rc dSrBr)r|s r,r}zCommand.reinitialize_commands Cr.str | _Commandc vtj|||}t|||SrB)rr}r_r`)r4rxryracmds r,r}zCommand.reinitialize_commands8+D';MNN S  r.ct)z 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. NotImplementedErrorr@s r,initialize_optionszCommand.initialize_options "!r.ct)z 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``). rr@s r,rAzCommand.finalize_optionsrr.ct)z Execute the actions intended by the command. (Side effects **SHOULD** only take place when :meth:`run` is executed, for example, creating new files or writing to the terminal output). rr@s r,runz Command.runrr.)rOrr#r$rB)rhrgr#r$)F)rxrgryrzr#r)rxrryrzr#r)rxrryrzr#r)r#r$)rCrDrErFcommand_consumes_arguments__annotations__r1rlrwrr}rrrArrGrHs@r,rrsV##J"'    67<X=BXCH"""^""""^""""^"""""r.rcdtj|dD}ttjj|S)z% Find all files under 'path' c3hK|]-\}}}|D]$}tj||V%.dSrB)ospathjoin)r*basedirsfilesfiles r,rpz#_find_all_simple..sc D$   T4  r.T) followlinks)rwalkfilterrisfile)rresultss r,_find_all_simplersE!#4!@!@!@G "'.' * **r.ct|}|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) rrcurdir functoolspartialrrelpathmaprt)dirrmake_rels r,findallrsR S ! !E bi$RW_C@@@He$$ ;;r.ceZdZdZdS)sicz;Treat this string as-is (https://en.wikipedia.org/wiki/Sic)N)rCrDrErFr)r.r,rrsEEEEr.r)rOr)@rF __future__rrrrrsysabcrcollections.abcrtypingrrrrextendrdirname__file__ vendor_pathmodulespop_distutils_hack.override_distutils_hackr rdependsr discoveryrrrOr extensionrversionrwarningsrdistutils.corerKdistutils.errorsr__all__rbootstrap_install_fromfindrrrPrNrrLrr get_unpatchedrrrrgr patch_allr)r.r,rs&FF#""""" ######3333333333bgoobgooh>W>W.X.XZfhq!r!rr+{~|DDITHUUVVV  T"""99999999 //////222222111111    GKz 2 2 2 " -2# # # L*)))$, <2222222#v#IN$:;;H"""""h"""D + + +    FFFFF#FFF r.