prhڱVdgZddlZddlZddlZddlZddlZddlZddlZddl Zddl Zddl Zddl Zddl mZddlmZddlmZddlmZddlZddlZddlmZmZmZmZddlmZdd lmZdd l m!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/ddl0Z0ddl1Z0ddl0m2Z2ddl3m4Z4ddl5m6Z6m7Z7ddl8m9Z9ddl:Z:ddl;mZ>erddl?m@Z@eAdeAddZBdZCdeDd eDfd!ZEd"d#d$eDd eeDfd%ZFd"d#d$eDd eeDfd&ZGd"d#d$eDd eeeDfd'ZHd"d#d eeDfd(ZId)ZJd*ZKd+ZLeMeNfZOd,ZPd-ZQd.ZRd/ZSd0ZTd1ZUd2ZVd3ZWd4ZXd5ZYd6ZZd7Z[d8Z\e4ej]j^Z_Gd9de_Z^Gd:d;e/Z`dS)< DistributionN) strtobool)DEBUGtranslate_longopt)iglob)ListOptionalSet 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 [/var/lib/jenkins/jobs/Dev/workspace/my-venv/lib/python3.11/site-packages/setuptools/dist.py_get_unpatchedr*8s$ M-/EFFF   cbt|dd}|tjd}||_|S)Nmetadata_version2.1)getattrr Versionr-)selfmvs r)get_metadata_versionr3=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)r4liness r)rfc822_unescaper?Esy    E 5zzQQx   99eAhoo''599M9M)N)NO P PPr+msgr#fieldc&||}|dkrdS|S)zRead Message header field.UNKNOWNNr@rAvalues r)_read_field_from_msgrGMs JE t Lr+cHt||}||St|S)z4Read Message header field and apply rfc822_unescape.)rGr?rEs r)_read_field_unescaped_from_msgrIUs) e , ,E } 5 ! !!r+cB||d}|gkrdS|S)z9Read Message header field and return all results as list.N)get_all)r@rAvaluess r)_read_list_from_msgrM]s( [[ % %F ||t Mr+cf|}|dks|sdS|S)NrC) get_payloadstrip)r@rFs r)_read_payload_from_msgrQes7 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-versionnamer summaryauthorNz author-emailz home-pagez download-urllicense descriptionr.keywords,platform classifierz1.1requiresprovides obsoletesz license-file)rr r0r-rGrSrWrU maintainer author_emailmaintainer_emailurl download_urlrIrVlong_descriptionrQsplitrXrM platforms classifiersr\r]r^ license_files)r1filer@s r) read_pkg_filerjls 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. r7z1newlines not allowed and will break in the futurer)r%r&rPre)vals r) single_linermsE 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#t/|jD]}|d||d|jpg|}|rDd|z|dsddSdSdS)z0Write the PKG-INFO format data to a file object.c>|d|ddS)Nz: r7)write)keyrFris r) write_fieldz#write_pkg_file..write_fields( eee,-----r+zMetadata-VersionNamer0Summary))z Home-pagerb)z Download-URLrc)AuthorrU)z Author-emailr`) Maintainerr_)zMaintainer-emailraNLicensez Project-URLz%s, %srYKeywordsPlatform ClassifierRequiresProvides Obsoletespython_requireszRequires-PythonzDescription-Content-TypezProvides-Extraz License-Filez %sr7)r3strget_name get_versionget_descriptionrmr/ get_licenser project_urlsitemsr; get_keywords get_platforms _write_listget_classifiers get_requires get_provides get_obsoleteshasattrr~long_description_content_typeprovides_extrassortedrhget_long_descriptionrpendswith)r1rir rrrToptional_fieldsrAattrattr_valrV project_urlrXrfrZextrards ` 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 1D011 1 1E K(% 0 0 0 0T>4+=+CDDD0022 6,,---((..  JJt       r+c tj|dd}|jrJdS#ttt t f$r}t|d|d|d}~wwxYw)N)rFrSgroupz/ must be importable 'module:attrs' string (got ))r EntryPointextras TypeError ValueErrorAttributeErrorAssertionErrorr)distrrFepes r)check_importablers  u4t D D D9 z>> B!FJddEEE R   s $AAAc t|ttfsJd||ksJdS#tt t tf$r}t|d|d|d}~wwxYw)z"Verify that value is a string listz must be a list of strings (got rN) isinstancelisttupler;rrrrrrrrFrs r)assert_string_listrs %$/////wwu~~&&&&&& z>> B!7;ttUUU C   s9=A5A00A5cB|}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) rrrF 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) r 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)rreqsrSrmarkers 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}))rrFN)boolrformat)rrrFtmpls r) assert_boolr3s> E{{eA!$++4u+"E"EFFFr+ch|stj|dtdSt|d)Nz is ignored.z is invalid.)r%r&r'rrrrFs 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!rrdictsetrrrrrrrFrrs 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)rrrrs 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)rrrrrrr)rrrFkvs 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&)rrrFpkgnames 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. cdSNrDrDr+r)zDistribution.sr+cdSrrDrDr+r)rzDistribution.sr+cdSrrDrDr+r)rzDistribution.sr+)rrr license_filerhNct|rd|vsd|vrdStjt|d}tjj|}|J|ds7tjt|d|_ ||_ dSdSdS)NrSr zPKG-INFO) r safe_namerlower working_setby_keyget has_metadata safe_version_version _patched_dist)r1attrsrqrs 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+c~td}|si_|pi}g_|dd_||dg_|dg_tj dD]*}t |j d+tfd|Dt!_i_g_t)t*j_t1_|jjj_dS)N package_datasrc_rootdependency_linkssetup_requiresdistutils.setup_keywordsrc.i|]\}}|jv||SrD)_DISTUTILS_UNSUPPORTED_METADATA.0rrr1s r) z)Distribution.__init__..s7   AqD@@@1@@@r+)rr dist_filespoprrrrr entry_pointsvars setdefaultrS _Distribution__init__rr_referenced_files_orig_extras_require_orig_install_requiresrr OrderedSet_tmp_extras_requirer set_defaults_set_metadata_defaults_normalize_version_validate_versionr _finalize_requires)r1rhave_package_datars` r)r zDistribution.__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.) rnumbersNumberrrr r0InvalidVersionrr%r&r$r%rs 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~rrr-keysreraddrr._convert_extras_requirements"_move_install_requirements_markers)r1rs 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/rrrrrr!r _suffix_forappend)r1 spec_ext_reqstmpsectionrrsuffixs r)r1z)Distribution._convert_extras_requirementsGs  &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. rr)rrreqs r)r4zDistribution._suffix_forWs# ), :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 Srrr<s r) is_simple_reqzFDistribution._move_install_requirements_markers..is_simple_reqis z> !r+r.NrDrc 3K|]M\}}|ttdtj|DfVNdS)c34K|]}t|VdSr)r)rr9s r) zLDistribution._move_install_requirements_markers...vs("K"Ka3q66"K"K"K"K"K"Kr+N)rrfromkeysmap _clean_reqrs r)rDzBDistribution._move_install_requirements_markers..tsq# # 1T]]"K"K3t3J3J"K"K"KKKLL M# # # # # # r+)r/rr!rfilterr filterfalserFrr.rrr5rrr-)r1rAspec_inst_reqs inst_reqs simple_reqs complex_reqsr9s` r)r2z/Distribution._move_install_requirements_markers_s  " " "!'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@)r1r=s r)rGzDistribution._clean_reqzs  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)rrrospathisfile)rpatternrWs r)rDz0Distribution._expand_patterns..s  uW~~..  ==%%  +-'..*>*>         r+rD)rQs r)rPzDistribution._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_runrD) configparserr[sysr\ base_prefix frozensetfind_config_filesrannouncer optionxformioopenrr& read_filesectionsoptionsget_option_dictrwarn_dash_deprecationmake_option_lowercaser command_optionsr negative_optrsetattrrr)r1 filenamesr[ignore_optionsparserfilenamereaderr8rropt_dictoptrlsrcaliasrs 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-_rrrzUsage of dash-separated 'zL' will not be supported in future versions. Please use the underscore name ' ' instead) replacerrchainrcommand__all___setuptools_commands startswithr%r&)r1rr8underscore_optcommandss r)rtz"Distribution.warn_dash_deprecations    JS#..    %  % % ' '     ""9-- ":%%x''! ! #:: MM33(    r+cn tjdjjS#tj$rgcYSwxYw)Nr$)r distributionr namesPackageNotFoundError)r1s r)rz!Distribution._setuptools_commandssE (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&)r1rr8 lowercase_opts r)ruz"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|SrDr)ros r) z5Distribution._set_command_options..8s!WWWa.q11WWWr+z error in z : command 'z' has no such option '')get_command_namersrrlrboolean_optionsrrwrrrxrrrr) r1 command_obj option_dict command_namer!sourcerF bool_optsneg_opt is_stringrs r)_set_command_optionsz!Distribution._set_command_options"s#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}|.UsQ'(Ar+rr)r rrVcurdirrrexists)r1ry tomlfilesstandard_project_metadatapartss r)_get_project_config_filesz&Distribution._get_project_config_filesPs $()C")EU$V$V!  AA9MMEU1XIU1XII & - - / / 423I)##r+Fc ||\}}||tj||j||D]}t j|||||dS)zXParses configuration files from various levels and loads configuration. )ry)ignore_option_errorsN) rrrparse_configurationrvrapply_configurationrrR)r1ryrinifilesrr|s r)parse_config_fileszDistribution.parse_config_files\s#<R S S S S !!! $$&&&&&r+ctjtj||jd}|D]#}tj|d$|S)zResolve pre-setup requirementsT) installerreplace_conflicting)r)rrresolver!rfetch_build_eggr0)r1r\resolved_distsrs r)fetch_build_eggszDistribution.fetch_build_eggsmsk&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_orders4!,, ,r+rc*|Sr)r)rs r)rz/Distribution.finalize_options..sqvvxxr+)rqN)rr rrI_removedrFr)r1rrdefinedfilteredloadedrs r)finalize_optionszDistribution.finalize_optionsxs; - - -'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)rS)rremoveds r)rzDistribution._removeds  w'!!r+ctjdD]>}t||jd}|$|||j|?dS)Nrr)rr r/rSr)r1rrFs 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. ) rVrWr;rrmkdirr hide_filerorp)r1 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)r1r=rs 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)rrS)cmdclassrr rr get_command_class)r1repsrrs r)rzDistribution.get_command_classs{ dm # #=) )#*>WMMM B BB02 9DM' "XOOO 224AA Ar+ctjdD]3}|j|jvr#|}||j|j<4t |SNrr)rr rSrrr print_commandsr1rrs r)rzDistribution.print_commandss_'.BCCC 2 2Bwdm++7799)1 bg&++D111r+ctjdD]3}|j|jvr#|}||j|j<4t |Sr)rr rSrrr get_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)r1rrrincludes 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|| SrDrrppackagepfxs r)rz0Distribution.exclude_package..s5ALLcARARLLLLr+cJg|]}|k|| SrDrrs r)rz0Distribution.exclude_package..s6a7ll1<.sE   6W$$QV->->s-C-C$$$$r+N)packages py_modules ext_modules)r1rrs `@r)exclude_packagezDistribution.exclude_packagesm = =DM ? ?DO        )   D     r+cz|dz}|D] }||ks||rdS!dS)z.s# K K K$U9J9J9J9J9Jr+rsequencerr/rrx)r1rSrFoldrs ` 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| SrDrD)rrrs r)rz.Distribution._include_misc..&s===DT__4___r+r)r1rSrFrnewrs @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)r1rrrexcludes 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)rrrrrFr)r1rs 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_optionsrwrsshlexrer _parse_command_optsrr/) r1r{rrrrrr nargs cmd_classs r)r z Distribution._parse_command_optsGs"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. rrrrrwNzShouldn't be able to get herer) rvrrget_command_objrwcopyupdater/rr ) r1dcmdoptsrrrlcmdobjrnegposs r)get_cmdline_optionsz Distribution.get_cmdline_optionsbs@ -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 distributionrDmoduleNi)rrrrrrSr)r1pkgrextrS 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`ra) rh help_commandsr handle_display_optionsrstdoutrn TextIOWrapperrbr reconfigure)r1 option_orderrhrbs r)r"z#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)rsuper run_command)r1rr s r)r)zDistribution.run_commands5  G$$$$$r+r)NF)4rc __module__ __qualname____doc__rrrrrrr rr staticmethodrrrr1r4r2rGrRrPrrtrrurrrrrrrrrrrrrrrrrrrr rrr"r) __classcell__)r s@r)rrs-11h*6&1$ % ''#M & & &'"'"'"'"R + + +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)rcr*r+r,rDr+r)r'r's"FFFFr+r')arrnrhrrVr%r) distutils.logrdistutils.core distutils.cmddistutils.distdistutils.commanddistutils.utilrdistutils.debugrdistutils.fancy_getoptrglobrrr<typingr r r r pathlibr collectionsremailrdistutils.errorsrrrsetuptools.externrr setuptools.extern.more_itertoolsrr _importlibrrrr$setuptools.commandrsetuptools.monkeyrsetuptools.configrrsetuptools.discoveryrrsetuptools.extern.packagingr r!r" email.messager# __import__r*r3rr?rGrIrMrQrjrmrrrrrrrrrrrrrrrrrcorerr r'rDr+r)rIs6   $$$$$$!!!!!!444444555555555555############FFFFFFFF((((((''''''))))))GGGGGGGG ******&&&&&&++++++55555555000000//////&%%%%%% 3444 0111 QSQSQQQQi " "#"(3-""""YsxS 7J hsm)B)B)BX   DDDN $;   9992   GGG555 R R RRRR,,,AAA H H H in9:: z %z %z %z %z %=z %z %z %zFFFFF9FFFFFr+