JdİRdgZddlZddlZddlZddlZddlZddlZddlZddl Zddl Zddl Zddl Zddl mZddlmZddlmZddlmZddlZddlZddlmZmZmZddlmZdd lmZdd lm Z dd l!m"Z"m#Z#dd l m$Z$dd l%m&Z&ddl%m'Z'ddl(m)Z)m*Z*ddl+m,Z,ddl-m.Z.ddl/Z/ddl0Z/ddl/m1Z1ddl2m3Z3ddl4m5Z5m6Z6ddl7m8Z8ddl9Z9ddl:m;Z;ddl-mm?Z?e@de@ddZAdZBdeCd eCfd!ZDd"d#d$eCd eeCfd%ZEd"d#d$eCd eeCfd&ZFd"d#d$eCd eeeCfd'ZGd"d#d eeCfd(ZHd)ZId*ZJd+ZKeLeMfZNd,ZOd-ZPd.ZQd/ZRd0ZSd1ZTd2ZUd3ZVd4ZWd5ZXd6ZYd7ZZd8Z[e3ej\j]Z^Gd9de^Z]Gd:d;e.Z_dS)< DistributionN) strtobool)DEBUGtranslate_longopt)iglob)ListOptional TYPE_CHECKING)Path) defaultdict)message_from_file)DistutilsOptionErrorDistutilsSetupError) rfc822_escape) packaging) ordered_set)unique_everseen partition)metadata)SetuptoolsDeprecationWarning)windows_support) get_unpatched)setupcfg pyprojecttoml)ConfigDiscoveryversion)_reqs) _entry_points)Messagez&setuptools.extern.packaging.specifiersz#setuptools.extern.packaging.versioncTtjdtt|S)NzDo not call this function)warningswarnDistDeprecationWarningr)clss B/opt/alt/python311/lib/python3.11/site-packages/setuptools/dist.py_get_unpatchedr)8s$ M-/EFFF   cbt|dd}|tjd}||_|S)Nmetadata_version2.1)getattrrVersionr,)selfmvs r(get_metadata_versionr2=s5 )4 0 0B z _U # # " Ir*contentreturnc <|}t|dkr|dSd|dt jd|ddfS)zFReverse RFC-822 escaping by removing leading whitespaces from content.rr N) splitlineslenlstripjointextwrapdedent)r3liness r(rfc822_unescaper>Esy    E 5zzQQx   99eAhoo''599M9M)N)NO P PPr*msgr"fieldc&||}|dkrdS|S)zRead Message header field.UNKNOWNNr?r@values r(_read_field_from_msgrFMs JE t Lr*cHt||}||St|S)z4Read Message header field and apply rfc822_unescape.)rFr>rDs r(_read_field_unescaped_from_msgrHUs) e , ,E } 5 ! !!r*cB||d}|gkrdS|S)z9Read Message header field and return all results as list.N)get_all)r?r@valuess r(_read_list_from_msgrL]s( [[ % %F ||t Mr*cf|}|dks|sdS|S)NrB) get_payloadstrip)r?rEs r(_read_payload_from_msgrPes7 OO   # # % %E t Lr*cLt|}tj|d|_t |d|_t |d|_t |d|_t |d|_d|_t |d|_ d|_ t |d|_ t |d |_ t|d |_t|d |_|j1|jtjd krt!||_t |d|_d |vr(t |d d|_t'|d|_t'|d|_|jtjdkr@t'|d|_t'|d|_t'|d|_nd|_d|_d|_t'|d|_dS)z-Reads the metadata values from a file object.zmetadata-versionnamersummaryauthorNz author-emailz home-pagez download-urllicense descriptionr-keywords,platform classifierz1.1requiresprovides obsoletesz license-file)rrr/r,rFrRrVrT maintainer author_emailmaintainer_emailurl download_urlrHrUlong_descriptionrPsplitrWrL platforms classifiersr[r\r] license_files)r0filer?s r( read_pkg_filerils D ! !C#OC0B,CDDD$S&11DI'Y77DL+C;;D&sH55DKDO,S.AAD D#C55DH,S.AAD1#yAADL:3 NND % !7!777 6s ; ;+C;;DS,S*==CCCHH (j99DN*3 ==D  6 666+C<< +C<< ,S+>>  ,S.AADr*cd|vrAtjd|dd}|S)zF Quick and dirty validation for Summary pypa/setuptools#1390. r6z1newlines not allowed and will break in the futurer)r$r%rOrd)vals r( single_linerlsE s{{  IJJJiikk%%a( Jr*c|}fd}|dt||d||d||}|r|dt |d}|D]$\}}t ||d}| |||%|} | r|dt| |j D]} |d d | zd | } | r |d | | pg} | D]} |d | |d||d||d||d|t'|dr|d|j|jr|d|j|jr|jD]}|d||d|jpg|}|rDd|z|dsddSdSdS)z0Write the PKG-INFO format data to a file object.c>|d|ddS)Nz: r6)write)keyrErhs r( write_fieldz#write_pkg_file..write_fields( eee,-----r*zMetadata-VersionNamer/Summary))z Home-pagera)z Download-URLrb)AuthorrT)z Author-emailr_) Maintainerr^)zMaintainer-emailr`NLicensez Project-URLz%s, %srXKeywordsPlatform ClassifierRequiresProvides Obsoletespython_requireszRequires-PythonzDescription-Content-TypezProvides-Extraz License-Filez %sr6)r2strget_name get_versionget_descriptionrlr. get_licenser project_urlsitemsr: get_keywords get_platforms _write_listget_classifiers get_requires get_provides get_obsoleteshasattrr}long_description_content_typeprovides_extrasrgget_long_descriptionroendswith)r0rhrrqrSoptional_fieldsr@attrattr_valrU project_urlrWrerYextrarcs ` r(write_pkg_filers}''))G.....K"CLL111K (((K 4++--...""$$G5 I{733444O')) t4t,,   Kx ( ( (  G7 I}W55666(..00;;  M8k#9::::xx))++,,H* J)))""$$*I** J))))T<)=)=)?)?@@@ T:t'8'8':':;;;T:t'8'8':':;;;T;(:(:(<(<===t&''= %t';<<< )T .0RSSS 1) 1 1E K(% 0 0 0 0T>4+=+CDDD0022 6,,---((..  JJt       r*c tj|dd}dS#tttt f$r}t |d|d|d}~wwxYw)N)rErRgroupz/ must be importable 'module:attrs' string (got ))r EntryPoint TypeError ValueErrorAttributeErrorAssertionErrorr)distrrEepes r(check_importablerso  u4t D D D z>> B!FJddEEE R   sAAAc|dS#ttttf$r}t |d|d|d}~wwxYw)z"Verify that value is a string listz must be a list of strings (got rN)rrrrrrrrErs r(assert_string_listrs[   z>> B!7;ttUUU C   s ;6;cB|}t||||D]}||stdd|zz|d\}}}|r%||vr!tjd||d}tj|tdS)z(Verify that namespace packages are validz1Distribution contains no modules or packages for znamespace package %r.z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyzeThe namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).N) rhas_contents_forr rpartition distutilslogr%r$r) rrrE ns_packagesnspparentsepchildr?s r( check_nsprsKtT;///99$$S)) %C(3./ !^^C00U  fK// M  ;     D   c78888%99r*c ttjt|dS#t t tf$r}td|d}~wwxYw)z+Verify that extras_require mapping is validz'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N) list itertoolsstarmap _check_extrarrrrrrs r( check_extrasr sr Y |U[[]] ; ;<<<<< z> 2! &    s9=A)A$$A)c|d\}}}|r&tj|rtd|zt t j|dS)N:zInvalid environment marker: )r pkg_resourcesinvalid_markerrrr parse)rreqsrRrmarkers r(rr,sh,,D#v K-.v66K!"@6"IJJJT  r*cxt||kr&d}t|||dS)z)Verify that value is True, False, 0, or 1z0{attr!r} must be a boolean value (got {value!r}))rrEN)boolrformat)rrrEtmpls r( assert_boolr3s> E{{eA!$++4u+"E"EFFFr*ch|stj|dtdSt|d)Nz is ignored.z is invalid.)r$r%r&rrrrEs r(invalid_unless_falser:sB  +++-CDDD 333 4 44r*c  ttj|t|tt frt ddS#t tf$r,}d}t| |||d}~wwxYw)z9Verify that install_requires is a valid requirements listzUnordered types are not allowedzm{attr!r} must be a string or list of strings containing valid project/version requirement specifiers; {error}rerrorN) rr r isinstancedictsetrrrrrrrErrs r(check_requirementsrAs R U[     edC[ ) ) ?=>> > ? ? z "RRR O "$++4u+"E"EFFEQ RsA AB !'BB c tj|dS#tjjtf$r,}d}t ||||d}~wwxYw)z.Verify that value is a valid version specifierzF{attr!r} must be a string containing valid version specifiers; {error}rN)r specifiers SpecifierSetInvalidSpecifierrrrrs r(check_specifierrOs}R))%00000  1> BRRR W "$++4u+"E"EFFEQ Rs#A*'A%%A*ct tj|dS#t$r}t||d}~wwxYw)z)Verify that entry_points map is parseableN)r!load Exceptionrrs r(check_entry_pointsrZsM,5!!!!! ,,,!!$$!+,s 727cNt|tstddS)Nztest_suite must be a string)rr~rrs r(check_test_suiterbs0 eS ! !A!"?@@@AAr*c`t|ts"td||D]a\}}t|t s#td||t |d||bdS)z@Verify that value is a dictionary of package names to glob listszT{!r} must be a dictionary mapping package names to lists of string wildcard patternsz,keys of {!r} dict must be strings (got {!r})zvalues of {!r} dictN)rrrrrr~r)rrrEkvs r(check_package_datargs eT " " ! ''-vd||    HH1!S!! %>EEdANN  4!6!=!=d!C!CQGGGG HHr*cz|D]7}tjd|s tjd|8dS)Nz \w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)rematchrrr%)rrrEpkgnames r(check_packagesrvsRx00  M  8   r*ceZdZdZdeejdddZdZdZ d1dZ d Z d Z e d Ze d Zd ZdZe dZdZdZdZe dZd1dZdZdZdZd1dZdZd2dZdZdZe dZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1fd0Z2xZ3S)3raG 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. 'test_suite' -- the name of a test suite to run for the 'test' command. If the user runs 'python setup.py test', the package will be installed, and the named test suite will be run. The format is the same as would be used on a 'unittest.py' command line. That is, it is the dotted name of an object to import and call to generate a test suite. '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. cdSNrCrCr*r(zDistribution.sr*cdSrrCrCr*r(rzDistribution.sr*cdSrrCrCr*r(rzDistribution.sr*)rrr license_filergNct|rd|vsd|vrdStjt|d}tjj|}|J|ds7tjt|d|_ ||_ dSdSdS)NrRrzPKG-INFO) r safe_namer~lower working_setby_keyget has_metadata safe_version_version _patched_dist)r0attrsrprs r(patch_missing_pkg_infoz#Distribution.patch_missing_pkg_infos  e++y/E/E F%c%-&8&899??AA(/33C88  D$5$5j$A$A )6s5;K7L7LMMDM!%D       r*cXtd}|si_|pi}g_|dd_||dg_|dg_tj dD]*}t |j d+tfd|Di_g_t%t&j_t-_|jjj_dS)N package_datasrc_rootdependency_linkssetup_requiresdistutils.setup_keywordsrc.i|]\}}|jv||SrC)_DISTUTILS_UNSUPPORTED_METADATA.0rrr0s r( z)Distribution.__init__..s7   AqD@@@1@@@r*)rr dist_filespoprrrrr entry_pointsvars setdefaultrR _Distribution__init__r_orig_extras_require_orig_install_requiresr r OrderedSet_tmp_extras_requirer set_defaults_set_metadata_defaults_normalize_version_validate_versionr_finalize_requires)r0rhave_package_datars` r(rzDistribution.__init__s#D.99  # "D   *d33  ##E*** % *z2Distribution._validate_metadata..s7   t}c400< <<D M+$+1111 2 2 2 r*c6t|tjrt|}|m tj|nL#tjjtf$r.tj d|ztj |cYSwxYw|S)NzThe version specified (%r) is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.) rnumbersNumberr~rrr/InvalidVersionrr$r%rrrs r(rzDistribution._validate_versions gw~ . . #'llG   /!))'2222%4i@ / / / ")) "~g..... /sA ABBct|ddr|j|j_t|ddrk|jp|j|_|jD]>}|dd}|r|jj|?t|ddr|j s |j |_ | | dS)z Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`. r}Nextras_requirerrinstall_requires) r.r}rr r'keysrdraddr r(_convert_extras_requirements"_move_install_requirements_markers)r0rs r(rzDistribution._finalize_requires(s 4*D 1 1 A,0,@DM ) 4)4 0 0 =(,(A(XTEXD %,1133 = = C((+=M155e<<< 4+T 2 2 @4;V @*.*?D ' ))+++ //11111r*cvt|ddpi}ttj}t|d||_|D]a\}}|j|t j|D]:}||}|j||z |;bdS)z Convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`. r'Nr ) r.r rr r rr r _suffix_forappend)r0 spec_ext_reqstmpsectionrrsuffixs r(r+z)Distribution._convert_extras_requirementsBs  &6==C +011#*41F#L#L '--// E EJGQ  $W - -[^^ E E))!,,(6)9:AA!DDDD E E Er*cB|jrdt|jzndS)ze For a requirement, return the 'extras_require' suffix for that requirement. r)rr~reqs r(r.zDistribution._suffix_forRs# ), :sS__$$:r*cd}tddpd}ttj|}t ||}t j||}ttt|_ |D]7}j dt|j z |8tfdj D_dS)zv Move requirements in `install_requires` that are using environment markers `extras_require`. c|j Srrr7s r( is_simple_reqzFDistribution._move_install_requirements_markers..is_simple_reqds z> !r*r(NrCrc 3K|]M\}}|ttdtj|DfVNdS)c34K|]}t|VdSr)r~)rr3s r( zLDistribution._move_install_requirements_markers...qs("K"Ka3q66"K"K"K"K"K"Kr*N)rrfromkeysmap _clean_reqrs r(r?zBDistribution._move_install_requirements_markers..osq# # 1T]]"K"K3t3J3J"K"K"KKKLL M# # # # # # r*)r.rr rfilterr filterfalserAr~r(r rr/rrr')r0r<spec_inst_reqs inst_reqs simple_reqs complex_reqsr3s` r(r,z/Distribution._move_install_requirements_markersZs  " " "!'94@@FB^4455 ]I66  ,]IFF $Sk%:%: ; ; D DA  $S3qx==%8 9 @ @ C C C C"# # # # 06688# # #   r*cd|_|S)zP Given a Requirement, remove environment markers and return it. Nr;)r0r8s r(rBzDistribution._clean_requs  r*c|jj}|r|ng}|jj}|r||vr||||d}t t |||j_dS)z>> list(Distribution._expand_patterns(['LICENSE'])) ['LICENSE'] >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*'])) ['setup.cfg', 'LICENSE'] c3K|]Y}tt|D]:}|dtj|6|V;ZdS)~N)sortedrrospathisfile)rpatternrSs r(r?z0Distribution._expand_patterns..s  uW~~..  ==%%  +-'..*>*>         r*rC)rLs r(rKzDistribution._expand_patternss#  #    r*c ddlm}tjtjkrgngd}t |}||}tr|d|}t|_ |D]'}tj |d5}tr,|dj d it||dddn #1swxYwY|D]}||}||} |D]V} | d ks| |vr ||| } || |} || |} || f| | <W|)d |jvrdS|jd D]~\} \} } |j| } | rt5|  } n| d vrt5| } t7|| p| | ]#t8$r}t;||d}~wwxYwdS) 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}__name__global)verbosedry_runrC) configparserrWsysrX base_prefix frozensetfind_config_filesrannouncer~ optionxformioopenrr  read_filesectionsoptionsget_option_dictrwarn_dash_deprecationmake_option_lowercasercommand_optionsr negative_optrsetattrrr)r0 filenamesrWignore_optionsparserfilenamereaderr2rnopt_dictoptrksrcaliasrs r(_parse_config_filesz Distribution._parse_config_filess .----- zS_,, B (#>22  ..00I  @ MM> ? ? ? !  HG444 )MMM"?"8"?"K"K&(("K"KLLL  ((( ) ) ) ) ) ) ) ) ) ) ) ) ) ) )"??,, 4 4 ..11//88"44Cj((C>,A,A  **Wc22C44S'BBC44S'BBC%-sOHSMM4 OO     4/ / / F "&!5h!?!E!E!G!G 5 5 S*3%))#..E %#C..(...nn 5elsC0000 5 5 5*1--14 5 5 5s+A C..C2 5C2 H00 I:I  IcD|dvr|S|dd}ttjtjj|}|ds |dkr||vr|Sd|vrtj d|d|d|S) N)zoptions.extras_requirezoptions.data_files-_rnrzUsage of dash-separated 'zL' will not be supported in future versions. Please use the underscore name ' ' instead) replacerrchainrcommand__all___setuptools_commands startswithr$r%)r0r{r2underscore_optcommandss r(rpz"Distribution.warn_dash_deprecations    JS#..    %  % % ' '     ""9-- ":%%x''! ! #:: MM33(    r*cn tjdjjS#tj$rgcYSwxYw)Nr)r distributionrnamesPackageNotFoundError)r0s r(rz!Distribution._setuptools_commands sE (66CI I,   III s  44c |dks|r|S|}tjd|d|d|d|S)NrzUsage of uppercase key 'z' in 'z?' will be deprecated in future versions. Please use lowercase 'r)islowerrr$r%)r0r{r2 lowercase_opts r(rqz"Distribution.make_option_lowercasesd j CKKMM J  ssGGG]]] ,   r*c ,|}|||}tr|d|z|D]3\}\}}tr|d|d|d|d d|jD}n#t $rg}YnwxYw |j}n#t $ri}YnwxYw t|t} ||vr(| r&t|||t| n`||vr!| rt||t|n;t||rt|||ntd|d |d |d #t$r} t| | d} ~ wwxYwdS) 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 '%s' command:z z = z (from rc,g|]}t|SrCr)ros r( z5Distribution._set_command_options..3s!WWWa.q11WWWr*z error in z : command 'z' has no such option '')get_command_namerorrhrboolean_optionsrrsrr~rtrrrr) r0 command_obj option_dict command_namersourcerE bool_optsneg_opt is_stringrs r(_set_command_optionsz!Distribution._set_command_optionss#3355  ..|<N>N:NOOOOy((Y(K51A1ABBBB[&11K7777..!66<<<9 5 5 5*1--14 53 5 5s=B!! B0/B04B<< C  C B!E22 F<F  Fcg}t|jp tjd}|.PsQ'(Ar*rr)r rrRcurdirrrexists)r0ru tomlfilesstandard_project_metadatapartss r(_get_project_config_filesz&Distribution._get_project_config_filesKs $()C")EU$V$V!  AA9MMEU1XIU1XII & - - / / 423I)##r*Fc ||\}}||tj||j||D]}t j|||||dS)zXParses configuration files from various levels and loads configuration. )ru)ignore_option_errorsN) rr~rparse_configurationrrrapply_configurationrrM)r0rurinifilesrrxs r(parse_config_fileszDistribution.parse_config_filesWs#<R S S S S !!! $$&&&&&r*ctjtj||jd}|D]#}tj|d$|S)zResolve pre-setup requirementsT) installerreplace_conflicting)r)rrresolver rfetch_build_eggr*)r0r[resolved_distsrs r(fetch_build_eggszDistribution.fetch_build_eggshsk&2:: K ! !* $;   # > >D  % ) )$ ) = = = =r*cd}d}tj|}tj|j|}t d|}t ||D] }||dS)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_optionsc$t|ddS)Norderr)r.)hooks r(by_orderz/Distribution.finalize_options..by_order|s4!,, ,r*rc*|Sr)r)rs r(rz/Distribution.finalize_options..sqvvxxr*)rpN)rrrrD_removedrArQ)r0rrdefinedfilteredloadedrs r(finalize_optionszDistribution.finalize_optionsss; - - -'e444(@@''22X...  B BtHHHH  r*cdh}|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_doctests)rR)rremoveds r(rzDistribution._removeds  w'!!r*ctjdD]>}t||jd}|$|||j|?dS)Nrr)rrr.rRr)r0rrEs r(_finalize_setup_keywordsz%Distribution._finalize_setup_keywordssb'.HIII 0 0BD"'400E  $/// 0 0r*ctjtjd}tj|stj|t j|tj|d}t|d5}| d| d| ddddn #1swxYwY|S)Nz.eggsz README.txtwzcThis 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. ) rRrSr:rrmkdirr hide_filerkro)r0 egg_cache_dirreadme_txt_filenamers r(get_egg_cache_dirzDistribution.get_egg_cache_dirs0 RY88 w~~m,, M H] # # #  %m 4 4 4"$',,}l"K"K )3// M1J.KLLL M M M M M M M M M M M M M M Ms"AC..C25C2c&ddlm}|||S)z Fetch an egg needed for buildingr)r)setuptools.installerr)r0r8rs r(rzDistribution.fetch_build_eggs&888888tS)))r*c||jvr |j|Stjd|}|D]#}|x|j|<}|cSt||S)z(Pluggable version of get_command_class()distutils.commands)rrR)cmdclassrrrrget_command_class)r0repsrrs r(rzDistribution.get_command_classs{ dm # #=) )#*>WMMM B BB02 9DM' "XOOO 224AA Ar*ctjdD]3}|j|jvr#|}||j|j<4t |SNrr)rrrRrrrprint_commandsr0rrs r(rzDistribution.print_commandss_'.BCCC 2 2Bwdm++7799)1 bg&++D111r*ctjdD]3}|j|jvr#|}||j|j<4t |Sr)rrrRrrrget_command_listrs r(rzDistribution.get_command_lists_'.BCCC 2 2Bwdm++7799)1 bg&--d333r*c |D]=\}}t|d|zd}|r ||'|||>dS)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)rr. _include_misc)r0rrrincludes r(rzDistribution.includesnKKMM ) )DAqdK!OT::G ) ""1a((((  ) )r*cdz|jrfd|jD|_|jrfd|jD|_|jrfd|jD|_dSdS)z9Remove packages, modules, and extensions in named packagercJg|]}|k|| SrCrrppackagepfxs r(rz0Distribution.exclude_package..s5ALLcARARLLLLr*cJg|]}|k|| SrCrrs r(rz0Distribution.exclude_package..s6a7ll1<.sE   6W$$QV->->s-C-C$$$$r*N)packages py_modules ext_modules)r0rrs `@r(exclude_packagezDistribution.exclude_packagesm = =DM ? ?DO        )   D     r*cz|dz}|D] }||ks||rdS!dS)z.s# K K K$U9J9J9J9J9Jr*rsequencerr.rrt)r0rRrEoldrs ` r( _exclude_misczDistribution._exclude_miscs%** %>BddEEEJ  X$%%CC X X X%&H4&OPPVW W X ?:c8#<# A AA ct|tst|d|d t||n%#t$r}td|z|d}~wwxYwt |||dSttst|dzfd|D}t |||zdS)zAHandle 'include()' for list/tuple attrs without a special handlerz: setting must be a list (rrNrcg|]}|v| SrCrC)rrrs r(rz.Distribution._include_misc..!s===DT__4___r*r)r0rRrErnewrs @r(rzDistribution._include_miscs%** Y%444QVQVQV&WXX X X$%%CC X X X%&H4&OPPVW W X ; D$ & & & & &C** +%MM >===E===C D$c * * * * *rc |D]=\}}t|d|zd}|r ||'|||>dS)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)rr.r)r0rrrexcludes r(rzDistribution.exclude$sn KKMM ) )DAqdK!OT::G ) ""1a((((  ) )r*ct|tstd|dtt |j|dS)Nz+packages: setting must be a list or tuple (r)rrrrrAr)r0rs r(_exclude_packageszDistribution._exclude_packages;sV(H-- %%DLHHN  S%x 0 011111r*c|jj|_|jj|_|d}|d}||vr9||\}}||=ddl}||d|dd<|d}||v9t |||}||} t| ddrd|f||d<|gS|S)NraliasesTrcommand_consumes_arguments command lineargs) __class__global_optionsrsroshlexrdr_parse_command_optsrr.) r0rwrrrr|r}rnargs cmd_classs r(rz Distribution._parse_command_optsBs"n; N7q'&&y11   )JC LLL{{5$//D!H1gG   11$EE**733 9:D A A 5CU4KD  ) )& 1   r*c i}|jD]\}}|D]\}\}}|dkr|dd}|dkr||}|j}|t|di|D]\} } | |kr| }d}ntdn|dkrd}|| |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. rrrrrsNzShouldn't be able to get herer) rrrrget_command_objrscopyupdater.rr) r0dcmdoptsr{r|rkcmdobjrnegposs r(get_cmdline_optionsz Distribution.get_cmdline_options]s@ -3355 1 1IC#'::<< 1 1Zc3.((kk#s++!88!11#66F"/4466GNN76>2#F#FGGG$+MMOONNS#::"%C"&C!E& --LMMM"AXXC-0 S"%%c**- 10r*c#K|jpdD]}|V|jpdD]}|V|jpdD]G}t|tr|\}}n|j}|dr |dd}|VHdS)z@Yield all packages, modules, and extension names in distributionrCmoduleNi)rrrrtuplerRr)r0pkgrextrR buildinfos r(rz$Distribution.iter_distribution_namess=&B  CIIIIo+  FLLLL#)r  C#u%% "%iix}}X&& !CRCyJJJJ  r*c4ddl}|jrt||St |jt jst||S|jj dvrt||S|jj}|j d t|||j |S#|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)r\utf8r\r]) rd help_commandsrhandle_display_optionsrstdoutrj TextIOWrapperr^r reconfigure)r0 option_orderrdr^s r(rz#Distribution.handle_display_optionss     L 77lKK K#*b&677 L 77lKK K :  $ $ & &*; ; ; 77lKK K:& 000 6 77lKK J " "H " 5 5 5 5CJ " "H " 5 5 5 5s C::Dcr|t|dSr)r super run_command)r0rrs r(r&zDistribution.run_commands5  G$$$$$r*r)NF)4r_ __module__ __qualname____doc__rrr rrrrrr staticmethodrrrr+r.r,rBrMrKr~rprrqrrrrrrrrrrrrrrrrrrrrrrrr& __classcell__)rs@r(rrs-11h*6&1$ % ''#M & & &""""""""H + + +QQQ  \ \$2224EEE ;;\;   6   &   \  M5M5M5M5^6   ,5,5,5,5\ $ $ $''''"   $ " "\ "000 &*** B B B222444))),*MMM"+++&))).2226&&&P$6668%%%%%%%%%r*ceZdZdZdS)r&zrClass for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.N)r_r'r(r)rCr*r(r&r&s"FFFFr*r&)`rrjrdrrRr$r# distutils.logrdistutils.core distutils.cmddistutils.distdistutils.commanddistutils.utilrdistutils.debugrdistutils.fancy_getoptrglobrrr;typingr r r pathlibr collectionsr emailrdistutils.errorsrrrsetuptools.externrr setuptools.extern.more_itertoolsrr _importlibrr6rrsetuptools.commandrsetuptools.monkeyrsetuptools.configrrsetuptools.discoveryrrsetuptools.extern.packagingrr r! email.messager" __import__r)r2r~r>rFrHrLrPrirlrrrrrrrrrrrrrrrrrcorerrr&rCr*r(rFs0   $$$$$$!!!!!!4444440000000000############FFFFFFFF((((((''''''))))))GGGGGGGG ******&&&&&&++++++55555555000000//////&%%%%%% 3444 0111 QSQSQQQQi " "#"(3-""""YsxS 7J hsm)B)B)BX   DDDN $;   9992   GGG555 R R RRRR,,,AAA H H H in9:: u %u %u %u %u %=u %u %u %pFFFFF9FFFFFr*