K iW UddlmZddlZddlZddlZddlZddlZddlZddlZddl m Z m Z m Z m Z ddlmZddlmZddlmZmZmZddlmZmZddlmZmZdd lmZmZdd lmZd d l m!Z!m"Z"m#Z#m$Z%d d l&m'Z'd dl(m)Z)d dl*m+Z+d dl"m,Z,d dl-m.Z.m/Z/d dl0m1Z1d dl2m3Z3d dl4m5Z5d dl6m7Z7m8Z8ddl9Z:ddl;Z:ddlZ:ddl?m@Z@ddlAmBZBmCZCddlDmEZEddlFmGZGerddlHmIZIdgZJeKeLfZM eeKeNdfeLeNfZOdePd<dZQeeNeReNefe eNfZSdePd < d4d!ZTd"ZUd5d#ZVd$ZWd%ZXd&ZYd'ZZd(Z[d)Z\d6d*Z]d+Z^d,Z_d-Z`d.Zaerdd/l> B!hEeYa P  s&)AAAc  t|tsJdj||k7sJy#ttt t f$r}t|dtd|d|d}~wwxYw)z"Verify that value is a string listz must be of type <> (got r>N) isinstancer3joinrArBr4rCr&_sequence_type_reprrDrEr<rGs r8assert_string_listrP^sq %+++wwu~&&& z>> B!h()<(=WUIQ O  s(+A"AA"c|}t||||D]u}|j|std||jd\}}}|r%||vr!tj j d||tjdddwy) z(Verify that namespace packages are validzCDistribution contains no modules or packages for namespace package .z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyz/The namespace_packages parameter is deprecated.z 2! &   s14A AAc|jd\}}} t|t t j |y#t$rd|d|d}t|dwxYw)N:zInvalid environment marker: z (r>)r _check_markerrr&r`rparse)extrareqs_namer\markermsgs r8rcrcsi//#.E41f T  1,VHBuiqA!#&D01s AA c@|syt|}|jyN)revaluate)rmms r8rhrhs vAJJLr:cBt||k7rt|d|dy)z)Verify that value is True, False, 0, or 1z must be a boolean value (got r>N)boolr&rDrEr<s r8 assert_boolrvs- E{e!TH,J5)ST"UVVr:cT|stj|dyt|d)Nz is ignored.z is invalid.)DistDeprecationWarningr2r&rus r8invalid_unless_falserys/ ##tfL$9: l3 44r:c ttj|t|tr t dy#t t f$r}|d|}t||d}~wwxYw)z9Verify that install_requires is a valid requirements listzUnordered types are not allowedzb must be a string or iterable of strings containing valid project/version requirement specifiers; N)r`rrirLsetrArBr&rDrEr<errorrns r8check_requirementsr~sr 2 U[[  eS !=> > " z "2hHHMw P "#&E1 2s9<A# AA#cp t|y#ttf$r}|d|}t||d}~wwxYw)z.Verify that value is a valid version specifierz7 must be a string containing valid version specifiers; N)rrr4r&r|s r8check_specifierrsC2U n -2OPUwW!#&E12s 505cj tj|y#t$r}t||d}~wwxYw)z)Verify that entry_points map is parseableN)rload Exceptionr&rOs r8check_entry_pointsrs2,5! ,!!$!+,s 2 -2ct|tst|d|jD]8\}}t|tstd|d|dt |d|d|:y)z@Verify that value is a dictionary of package names to glob listszP must be a dictionary mapping package names to lists of string wildcard patternszkeys of z dict must be strings (got r>z values of z dictN)rLdictr&rdstrrP)rDrEr<kvs r8check_package_datars eT "!h' '   @1!S!%4("=aU!D  4:dXU!;Q? @r:c|D]9}tjd|rtjj d|;y)Nz \w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)rematchrVrWrX)rDrEr<pkgnames r8check_packagesrs9xx0 MM  8 r:)r*c eZdZUdZdeedddeedZded<d0d1d Zd Z d Z e d Z d Z dZd2dZd2dZe d3 d4dZe d3d5dZd0dZd6dZd6dZd7dZd7dZd0dZd8dZ d9 d:dZd;dZd2dZe dZdZdZ d Z!dd&Z'd?d'Z(d?d(Z)d2d)Z*d@d*Z+d+Z,dAd,Z-d-Z.d.Z/d2fd/ Z0xZ1S)Br*a Distribution with support for tests and package data This is an enhanced version of 'distutils.dist.Distribution' that effectively adds the following new optional keyword arguments to 'setup()': 'install_requires' -- a string or sequence of strings specifying project versions that the distribution requires when installed, in the format used by 'pkg_resources.require()'. They will be installed automatically when the package is installed. If you wish to use packages that are not available in PyPI, or want to give your users an alternate download location, you can add a 'find_links' option to the '[easy_install]' section of your project's 'setup.cfg' file, and then setuptools will scan the listed web pages for links that satisfy the requirements. 'extras_require' -- a dictionary mapping names of optional "extras" to the additional requirement(s) that using those extras incurs. For example, this:: extras_require = dict(reST = ["docutils>=0.3", "reSTedit"]) indicates that the distribution can optionally provide an extra capability called "reST", but it can only be used if docutils and reSTedit are installed. If the user installs your package using EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. 'package_data' -- a dictionary mapping package names to lists of filenames or globs to use to find data files contained in the named packages. If the dictionary has filenames or globs listed under '""' (the empty string), those names will be searched for in every package, in addition to any names for the specific package. Data files found using these names/globs will be installed along with the package, in the same location as the package. Note that globs are allowed to reference the contents of non-package subdirectories, as long as you use '/' as a path separator. (Globs are automatically converted to platform-specific paths at runtime.) In addition to these new keywords, this class also has several new methods for manipulating the distribution's contents. For example, the 'include()' and 'exclude()' methods can be thought of as in-place add and subtract commands that add or remove packages, modules, extensions, and so on from the distribution. cyrprr:r8zDistribution.!r:cyrprrr:r8rzDistribution.$rr:cyrprrr:r8rzDistribution.%rr:cyrprrr:r8rzDistribution.&rr:)long_description_content_type project_urlsprovides_extraslicense_expression license_file license_filesinstall_requiresextras_require list[str]namespace_packagesc$t|d}|si|_|xsi}g|_d|_d|_|j dd|_|j dg|_|j dg|_tjdD]'}t|j|jd)t|j}|ddhz}|j!Dcic] \}}||vs ||}}}t#j$||tt&|_t+||_|j/||j1|jj2|j_|j5ycc}}w) N package_datasrc_rootdependency_linkssetup_requiresdistutils.setup_keywordsr=rr)hasattrr dist_filesinclude_package_dataexclude_package_datapoprrrr entry_pointsvars setdefaultr7r{_DISTUTILS_UNSUPPORTED_METADATArd _Distribution__init__r_referenced_filesr set_defaults_set_metadata_defaults_normalize_versionversion_finalize_requires)selfattrshave_package_datarF metadata_onlyrr dist_attrss r8rzDistribution.__init__/s`#D.9 68D  6815!AE!$)IIj$$? +0995G+L).3CR)H''.HI 1B J ! !"''4 0 1D@@A ,.>?? ',{{}Otq!8NadO OtZ0 "%S+D1 ##E* $ 7 7 8M8M N  !Ps % F 2F cdh}t|jDchc]}t|j|d|}}||z }|rd|}t|ycc}w)Nr7z&Required package metadata is missing: )rrgetattrr&)rrequiredkeyprovidedmissingrns r8_validate_metadatazDistribution._validate_metadataOst8DMM* t}}c40<   X% :7)DC%c* *  s Ac |jjD]?\}}t|jj ||j ||Ay)z Fill-in missing metadata fields not supported by distutils. Some fields may have been set by other tools (e.g. pbr). Those fields (vars(self.metadata)) take precedence to supplied attrs. N)rrdrrrget)rroptiondefaults r8rz#Distribution._set_metadata_defaults\sN $CCIIK QOFG   * *6599VWY3O P Qr:cddlm}t|tjr t |}nt||s||St t |}||k7rtjd|d|d|S|S)Nr)sic Normalizing '' to '') rJrrLnumbersNumberrrr"r2)rr normalizeds r8rzDistribution._normalize_versionfsn gw~~ .'lG  %N)* j  =  |1!M N r:ct|ddr|j|j_|j|j|j_|j |j_|j r\|j j D]>}|jdd}|s|jjj|@yy)z Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`. python_requiresNrgr) rrr_normalize_requiresrrkeyssplitrr)rrjs r8rzDistribution._finalize_requiresvs 4*D 1,0,@,@DMM )   ")-)>)> &'+':': $   ,,113 D C(+MM11<z3Distribution._normalize_requires..s7$ :>!QQSekk!'r234 5$ s?A)rr is_staticListr`rrrrirDictrrdr)rrrlist_dict_s r8rz Distribution._normalize_requiress"4);TBHb '7>D"!( 1 12B C  %c#u{{;K/L&M N ' 1 1. A t#$ BPBVBVBX$  r:c4|jj}|Dcgc]}|jds|}}|jj}|rt j |rtj nt}|t|}||k7r-tjd|d|d||j_|rtddj|zy |r0d}tjdd dj|zd | y y cc}w) a Normalize license and license_expression. >>> dist = Distribution({"license_expression": _static.Str("mit aNd gpl-3.0-OR-later")}) >>> _static.is_static(dist.metadata.license_expression) True >>> dist._finalize_license_expression() >>> _static.is_static(dist.metadata.license_expression) # preserve "static-ness" True >>> print(dist.metadata.license_expression) MIT AND GPL-3.0-or-later z License :: rrrzyLicense classifiers have been superseded by license expressions (see https://peps.python.org/pep-0639/). Please remove:  z&guides/writing-pyproject-toml/#licensez#License classifiers are deprecated.z[Please consider removing the following classifiers in favor of a SPDX license expression: 'https://packaging.python.org/en/latest/)see_urlN)rget_classifiers startswithrrrStrrrr"r2r rMr#)r classifierscllicense_classifiers license_exprstr_r pypa_guidess r8_finalize_license_expressionz)Distribution._finalize_license_expressionsmm335 ,7Xb2==;WrXX}}77 ")"3"3L"A7;;sD>|LMJz)$$}\N& TU%VW3= 0"(Rii 345# !BK ( - -5/15;N1OPA+O  !Ys DDc:|jj}|xsg}|jj}|r||vr|j|||gd}|j |d}n|j |d}t t ||j_y)z>> getfixture('sample_project_cwd') >>> list(Distribution._expand_patterns(['LICENSE.txt'])) ['LICENSE.txt'] >>> list(Distribution._expand_patterns(['pyproject.toml', 'LIC*'])) ['pyproject.toml', 'LICENSE.txt'] >>> list(Distribution._expand_patterns(['src/**/*.dat'])) ['src/sample/package_data.dat'] c3K|]t}tj|D]T}|jdsAtjj |r"|j tjdVvyw)~/N)sorted _find_patternendswithospathisfilereplacesep)rpatternrclsrs r8rz0Distribution._expand_patterns..sj s00-HI ==%"''..*> LL % % sA:A=r)rrrs` `r8rzDistribution._expand_patternss #  r:ctd}d|vr tjd|ddd|d|jtjd fsd |vrt d|d t jd |tjd d|d|dt|d}|r|stjdd|d|S)a >>> getfixture('sample_project_cwd') >>> Distribution._find_pattern("LICENSE.txt") ['LICENSE.txt'] >>> Distribution._find_pattern("/LICENSE.MIT") Traceback (most recent call last): ... setuptools.errors.InvalidConfigError: Pattern '/LICENSE.MIT' should be relative... >>> Distribution._find_pattern("../LICENSE.MIT") Traceback (most recent call last): ... setuptools.warnings.SetuptoolsDeprecationWarning: ...Pattern '../LICENSE.MIT' cannot contain '..'... >>> Distribution._find_pattern("LICEN{CSE*") Traceback (most recent call last): ... setuptools.warnings.SetuptoolsDeprecationWarning: ...Pattern 'LICEN{CSE*' contains invalid characters... zspecifications/glob-patterns/z..zPattern z cannot contain '..'z Please ensure the files specified are contained by the root of the Python package (normally marked by `pyproject.toml`). r))rr1rz:\z/ should be relative and must not start with '/'z^[\w\-\.\/\*\?\[\]]+$z$Please provide a valid glob pattern.z0Pattern {pattern!r} contains invalid characters.)rrr1T) recursivez,Cannot find any files for the given pattern.z,Pattern {pattern!r} did not match any files.)rr1) r#r2rrrr rrr)rrrfounds r8rzDistribution._find_patterns&6 7? ( - -7+%9:B+O&    rvvsm ,0@$7+%TU  88,g 6 > ( - -6BA+O&  W-  ( - ->>&   r:c &ddlm}tjtjk(rgngd}t |}||j }tr|jd|}t|_ |D]}t|d5}tr)|jdjd it|j|ddd|jD]r}|j!|}|j#|} |D]I} | d k(s| |vr |j%|| } |j'| |} |j)| |} || f| | <Kt|j+d |j,vry|j,d j/D]S\} \} } |j0j%| } | r t3|  } n| d vr t3| } t5|| xs| | Uy#1swY$xYw#t6$r}t9||d}~wwxYw) z Adapted from distutils.dist.Distribution.parse_config_files, this method provides the same functionality in subtly-improved ways. r) ConfigParser) z install-basezinstall-platbasez install-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptsz install-dataprefixz exec-prefixhomeuserrootNz"Distribution.parse_config_files():utf-8encodingz reading {filename}r5global)verbosedry_runr) configparserr sysr  base_prefix frozensetfind_config_filesr$announcer optionxformopenformatlocals read_filesectionsoptionsget_option_dictr_enforce_underscore_enforce_option_lowercasercommand_optionsrd negative_optr(setattrrBr%)r filenamesr ignore_optionsparserfilenamereadersectionr"opt_dictoptvalsrcaliasrGs r8_parse_config_filesz Distribution._parse_config_files"s . zzS__,  (#>2  ..0I  MM> ? ! Hh1 )VMM"?"8"?"?"K&("KL  ( )"??, 4 ..1//8"4Cj(C>,A  **Wc2C223@C88gFC%-sOHSM4 4 OO ) , 4// /  $33H=CCE 5OC#s%%))#.E#C.(..n 5elsC0 57 ) )H 5*1-14 5s%AG)G6)G3 6 H? H  Hc d|vs|j|r|S|jdd}|jjrd|jjdnd}t j d|d|d|d d |d |d |d dd|S)N-_ (Affected: ).rJzInvalid dash-separated key  in z- (setup.cfg), please use the underscore name instead.z% Usage of dash-separated zV will not be supported in future versions. Please use the underscore name  instead. !userguide/declarative_config.htmlrrrrSr1)_skip_setupcfg_normalizationrrr7r#r2)rr0r.underscore_optaffecteds r8r$z Distribution._enforce_underscoreqs c>T>>wGJS#.;?==;M;M[!3!3 4B7SU$)))#WK@..<-?y J%%(G,66D5GH J   9! r:c 0|js|j|r|S|j}|jjrd|jjdnd}t j d|d|d|dd|d|d |d |d d d |S)Nr8r9rJzInvalid uppercase key r:z# (setup.cfg), please use lowercase r;z$ Usage of uppercase key zL will not be supported in future versions. Please use lowercase r<r=r>r?r@)islowerrAlowerrr7r#r2)rr0r. lowercase_optrCs r8r%z&Distribution._enforce_option_lowercases ;;=D==gFJ ;?==;M;M[!3!3 4B7SU$))$SG4{;$$1#4I ?$$'7$wk:33@2CD J   9! r:c6d}||vxs|j| S)N)zoptions.extras_requirezoptions.data_fileszoptions.entry_pointszoptions.package_datazoptions.exclude_package_data)_is_setuptools_section)rr.skips r8rAz)Distribution._skip_setupcfg_normalizations( $Jd&A&A'&J"JJr:cN|dk(xs|jdxs |tvS)Nrr")r_setuptools_commands)rr.s r8rIz#Distribution._is_setuptools_sections3 z ! 1!!), 1.00 r:c |j}||j|}tr|jd|d|j D]\}\}}tr|jd|d|d|d |j Dcgc] }t |}} |j} t|t} || vr| rt|| |t| nL||vr| rt||t|n/t||rt|||ntd|d |d |d ycc}w#t$rg}YwxYw#t$ri} YwxYw#t$r} t| | d} ~ wwxYw) a Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). 'command_obj' must be a Command instance. If 'option_dict' is not supplied, uses the standard option dictionary for this command (from 'self.command_options'). (Adopted from distutils.dist.Distribution._set_command_options) Nz setting options for 'z ' command:z z = z (from r>z error in z : command 'z' has no such option 'r)get_command_namer#r$rrdboolean_optionsr'r4r'rLrr(r(rr%rB) r command_obj option_dict command_namersourcer<o bool_optsneg_opt is_stringrGs r8_set_command_optionsz!Distribution._set_command_optionss#335  ..|L M'2'8'8': 5 #FOVU VHCwgfXQGH ;F;V;VWa.q1W W %22 5&uc2 W$Ki>N:NOy(YK51AB[&1K7.#F8;|nDZ[aZbbcd+ 5X!   "   5*1-14 5sO:D/D*D/ E*A=E*D// D=<D= E E E+ E&&E+cg}t|jxstjd}|-t d|}t |d}t |d}||fS|j r|g}||fS)z/Add default file and split between INI and TOMLzpyproject.tomlc2t|jdk(S)Nz.toml)r suffix)fs r8rz8Distribution._get_project_config_files..sQ'(Ar:rr)r rrcurdirr r`exists)rr) tomlfilesstandard_project_metadatapartss r8_get_project_config_filesz&Distribution._get_project_config_filess} $()C"))EU$V!  A9MEU1XIU1XI)##' - - /23I)##r:c0|j|\}}|j|tj||j||D]}t j ||||j|j|jy)zXParses configuration files from various levels and loads configuration. )r))ignore_option_errorsN) rbr4rparse_configurationr&rapply_configurationrrr)rr)rdinifilesr_r,s r8parse_config_fileszDistribution.parse_config_filess#<R S T ! ))+ $$&r:c ddlm}|||S)zResolve pre-setup requirementsr)_fetch_build_eggs) installerrj)rrequiresrjs r8fetch_build_eggszDistribution.fetch_build_eggss0 x00r:cd}d}tj|}tj|j|}t d|}t ||D] }|| y)z Allow plugins to apply arbitrary operations to the distribution. Each hook may optionally define a 'order' to influence the order of execution. Smaller numbers go first and the default is 0. z(setuptools.finalize_distribution_optionsct|ddS)Norderr)r)hooks r8by_orderz/Distribution.finalize_options..by_order s4!, ,r:rc"|jSrp)r)rGs r8rz/Distribution.finalize_options..s qvvxr:)rN)rrra filterfalse_removedrr)rr=rrdefinedfilteredloadedrFs r8finalize_optionszDistribution.finalize_optionss`; -''e4((@'2X. B tH r:c$dh}|j|vS)z When removing an entry point, if metadata is loaded from an older version of Setuptools, that removed entry point will attempt to be loaded and will fail. See #2765 for more details. 2to3_doctestsr6)rFremoveds r8ruzDistribution._removeds  ww'!!r:ctjdD]>}t||jd}||j ||j|@y)Nrr)rrrr7r)rrFr<s r8_finalize_setup_keywordsz%Distribution._finalize_setup_keywords sM''.HI 0BD"''40E  $/ 0r:cddlm}tjj tj d}tjj |stj||j|tjj |d}t|dd5}|jd|jd |jd ddd|S|S#1swY|SxYw) Nr)windows_supportz.eggsz README.txtwrrzcThis directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. zAThis directory caches those eggs to prevent repeated downloads. z/However, it is safe to delete this directory. ) rJrrrrMr]r^mkdir hide_filerwrite)rr egg_cache_dirreadme_txt_filenamer\s r8get_egg_cache_dirzDistribution.get_egg_cache_dir&s% RYY8 ww~~m, HH] #  % %m 4"$'',,}l"K )3A MQJ.KL M} Ms (4C((C2c ddlm}|||S)z Fetch an egg needed for buildingr)fetch_build_egg)rkr)rreqrs r8rzDistribution.fetch_build_egg;s.tS))r:c||jvr|j|S|dk(rddlm}|Stjd|}|D]$}|j x|j|<}|cSt j||S)z(Pluggable version of get_command_class() bdist_wheelr)rdistutils.commands)r=r7)cmdclasscommand.bdist_wheelrrrrrget_command_class)rrrepsrFrs r8rzDistribution.get_command_classAs dmm #==) ) m # 8 ##*>WM BB02 9DMM' "XO B!224A Ar:ctjdD]D}|j|jvs|j }||j|j<Ft j |SNrr)rrr7rrrprint_commandsrrFrs r8rzDistribution.print_commandsSs]''.BC 2Bwwdmm+779)1 bgg& 2++D11r:ctjdD]D}|j|jvs|j }||j|j<Ft j |Sr)rrr7rrrget_command_listrs r8rzDistribution.get_command_listZs]''.BC 2Bwwdmm+779)1 bgg& 2--d33r:c |jD]2\}}t|d|zd}|r ||!|j||4y)aAdd items to distribution that are named in keyword arguments For example, 'dist.include(py_modules=["x"])' would add 'x' to the distribution's 'py_modules' attribute, if it was not already there. Currently, this method only supports inclusion for attributes that are lists or tuples. If you need to add support for adding to other attributes in this or a subclass, you can add an '_include_X' method, where 'X' is the name of the attribute. The method will be called with the value passed to 'include()'. So, 'dist.include(foo={"bar":"baz"})' will try to call 'dist._include_foo({"bar":"baz"})', which can then handle whatever special inclusion logic is needed. _include_N)rdr _include_misc)rrrrincludes r8rzDistribution.includeasIKKM )DAqdK!OT:G ""1a(  )r:c|dz}|jr7|jDcgc]}||k7s |j|r|c}|_|jr7|jDcgc]}||k7s |j|r|c}|_|jrJ|jDcgc].}|j|k7r|jj|s|0c}|_yycc}wcc}wcc}w)z9Remove packages, modules, and extensions in named packagerRN)packagesr py_modules ext_modulesr7rpackagepfxps r8exclude_packagezDistribution.exclude_packagewsm ====ALcARDM ????a7l1<->s-C D     s' C#C#C## C(.C(C(&3C-ch|dz}|jD]}||k(s|j|syy)zt|tst|dtd|d t ||}|t|tst|dz|r!t |||Dcgc] }||vs| c}yy#t $r}t|d|d}~wwxYwcc}w)zAHandle 'exclude()' for list/tuple attrs without a special handler: setting must be of type : No such distribution settingN4: this setting cannot be changed via include/exclude)rLr3r&rNrr4r()rr7r<oldrGitems r8 _exclude_misczDistribution._exclude_miscs%+%&34G3HPUyXYZ  V$%C ?:c9#=%MM  D$# K$U9J K L  V%.L&MNTU U V!Ls# A:# B -B : BBBcnt|tst|dtd|d t ||}|t |||yt|tst|dz|Dcgc] }||vs| }}t ||t||zy#t $r}t|d|d}~wwxYwcc}w)zAHandle 'include()' for list/tuple attrs without a special handlerrrKr>rNr)rLr3r&rNrr4r(r`)rr7r<rrGrnews r8rzDistribution._include_miscs%+%&34G3HPUyXYZ  V$%C ; D$ &C+%MM %*=DT_4=C= D$S C 0 V%.L&MNTU U V>s# B( B22B2 B/B**B/c |jD]2\}}t|d|zd}|r ||!|j||4y)aRemove items from distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from the distribution's 'py_modules' attribute. Excluding packages uses the 'exclude_package()' method, so all of the package's contained packages, modules, and extensions are also excluded. Currently, this method only supports exclusion from attributes that are lists or tuples. If you need to add support for excluding from other attributes in this or a subclass, you can add an '_exclude_X' method, where 'X' is the name of the attribute. The method will be called with the value passed to 'exclude()'. So, 'dist.exclude(foo={"bar":"baz"})' will try to call 'dist._exclude_foo({"bar":"baz"})', which can then handle whatever special exclusion logic is needed. _exclude_N)rdrr)rrrrexcludes r8rzDistribution.excludesI KKM )DAqdK!OT:G ""1a(  )r:ct|tstdtd|dt t |j |y)Nz#packages: setting must be of type )rLr3r&rNr`rr)rrs r8_exclude_packageszDistribution._exclude_packagessG(I.%56I5J'RZQ]]^_  S%%x 01r:c|jj|_|jj|_|d}|jd}||vr.||\}}||=ddl}|j |d|dd|d}||vr.t j|||}|j|} t| ddrd|f|j|d<|gS|S)NraliasesTrcommand_consumes_arguments command lineargs) __class__global_optionsr'r#shlexrr_parse_command_optsrr) rr+rrr_srcr3rnargs cmd_classs r8rz Distribution._parse_command_optss"nn;; NN77q'&&y1 !'*KD% {{5$/D!H1gG  11$E**73 9:D A5CU4KD  )& 1   r:c i}|jjD]\}}|jD]\}\}}|dk7r|jdd}|dk(ru|j|}|jj }|j t|di|jD]\} } | |k(s | }d}ntd|dk(rd}||j|i|<|S) ahReturn a '{cmd: {opt:val}}' map of all command-line options Option names are all long, but do not include the leading '--', and contain dashes rather than underscores. If the option doesn't take an argument (e.g. '--quiet'), the 'val' is 'None'. Note that options provided by config files are intentionally excluded. rr7r6rr'NzShouldn't be able to get herer) r&rdrget_command_objr'copyupdaterrCr) rdcmdoptsr0r2r1cmdobjrVnegposs r8get_cmdline_optionsz Distribution.get_cmdline_optionss/1--335 1IC#'::< 1Zc3.(kk#s+!8!11#6F"//446GNN76>2#FG$+MMONS#:"%C"&C! N --LMMAXC-0 S"%c*+ 1 12r:c#K|jxsdEd{|jxsdEd{|jxsdD]>}t|tr|\}}n |j }|j dr|dd}|@y7n7Xw)z@Yield all packages, modules, and extension names in distributionrNmodulei)rrrrLtupler7r)rextr7 _buildinfos r8rz$Distribution.iter_distribution_namess==&B&&??(b((##)r C#u%#& jxx}}X&CRyJ  '(s B BB BAB B cFddl}|jrtj||St |j t jstj||S|j jjdvrtj||S|j j}|j jd tj|||j j|S#|j j|wxYw)zIf there were any non-global "display-only" options (--help-commands or the metadata display options) on the command line, display the requested info and return true; else return false. rN)rutf8rr) r help_commandsrhandle_display_optionsrLstdoutio TextIOWrapperrrF reconfigure)r option_orderrrs r8rz#Distribution.handle_display_options-s     77lK K#**b&6&67 77lK K ::   $ $ &*; ; 77lK K::&& 0 6 77lK JJ " "H " 5CJJ " "H " 5s DD cD|jt| |yrp)rsuper run_command)rrrs r8rzDistribution.run_commandIs  G$r:rp)rzMutableMapping[str, Any] | NonereturnNone)rr)T)rrrrtrz Iterator[str])rrrrtrr)r0rr.rrr)r.rrrt)r)Iterable[StrPath] | None)NF)r)rrdrtrr)rlrrzlist[metadata.Distribution])rrrztype[distutils.cmd.Command])rrrr)rrrrt)r7rr<r+rr)rr+rr)rz dict[str, dict[str, str | None]])2r5 __module__ __qualname____doc__rr`r__annotations__rrr staticmethodrrrrr classmethodrrr4r$r%rArIrXrbrhrmryrur~rrrrrrrrTrrrrrrrrr __classcell__)rs@r8r*r*s+\*6*$%  '#"!"@ +Q  D&  &PC(8<   15   &77tM5^((K +5Z $/3%*'+'#'  ',1 $ " "0 ** B$24),* M"1*).26%N 68%%r:c tjdj}d|D}htj j |S#tj$rg}Y5wxYw)N setuptoolsc34K|]}|jywrpr6)rrFs r8rz'_setuptools_commands..Vs="bgg=s)r distributionrPackageNotFoundErrorrVr__all__)rrs r8rLrLQsa,,\:GG = = .Y   & & - --  ( (s(AA A ceZdZdZy)rxzrClass for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.N)r5rrrrr:r8rxrx]sFr:rx)r7rrr )rErr<r+rr)rErr<r,rr)rzset[str])h __future__r functoolsrrarrrrcollections.abcrrrrrpathlibr typingr r r more_itertoolsr rpackaging.markersrrpackaging.specifiersrrpackaging.versionrrJrrrrr7 _importlibr_normalizationr_pathrrconfigrr discoveryrerrorsr monkeyr!warningsr"r# distutils.cmdrVdistutils.commanddistutils.coredistutils.dist distutils.logdistutils.debugr$distutils.errorsr%r&distutils.fancy_getoptr'distutils.utilr(typing_extensionsr)rrr`r3rr+rrNrr,r9rHrPr^rercrhrvryr~rrrrr*rcorecacherLrxrr:r8r s"  HH,,53?% !<+&&!C!F4$+   4K U38_d3i78 983!&sDcNHSM'I!JYJK  8 W 5 22, @<!).."="=>M\ %=\ %~ ..F9Fr: