zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
U
G=®d¶™ã@sdgZddlZddlZddlZddlZddlZddlZddlZddl    Zddl
Zddl Zddl m Z ddlmZddlmZddlZddlmZddlmZddlmZmZdd    l mZdd
lmZdd lmZdd lmZdd lm Z ddl!m"Z"m#Z#m$Z$ddl%m&Z&ddl'Z'ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-Z-e.dƒe.dƒdd„Z/dd„Z0dd„Z1dd„Z2e3e4fZ5dd„Z6d d!„Z7d"d#„Z8d$d%„Z9d&d'„Z:d(d)„Z;d*d+„Z<d,d-„Z=d.d/„Z>d0d1„Z?d2d3„Z@d4d5„ZAe*ejBjCƒZDGd6d„deDƒZCGd7d8„d8e&ƒZEdS)9Ú DistributionéN)Ú    strtobool)ÚDEBUG©Útranslate_longopt)Ú defaultdict)Úmessage_from_file)ÚDistutilsOptionErrorÚDistutilsSetupError)Ú rfc822_escape)Ú StrictVersion)Úsix)Ú    packaging)Ú ordered_set)ÚmapÚfilterÚ filterfalseé)ÚSetuptoolsDeprecationWarning)Úwindows_support)Ú get_unpatched)Úparse_configurationz&setuptools.extern.packaging.specifiersz#setuptools.extern.packaging.versioncCst dt¡t|ƒS)NzDo not call this function)ÚwarningsÚwarnÚDistDeprecationWarningr)Úcls©rúFD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/dist.pyÚ_get_unpatched+s rcCs˜t|ddƒ}|dkr”|js |jr*tdƒ}nd|jdk    sT|jdk    sTt|ddƒdk    sT|jr^tdƒ}n0|js||js||j    s||j
s||j r†tdƒ}ntdƒ}||_ |S)NÚmetadata_versionz2.1Úpython_requiresú1.2ú1.1z1.0) ÚgetattrÚlong_description_content_typeÚprovides_extrasr Ú
maintainerÚmaintainer_emailÚ project_urlsÚprovidesÚrequiresÚ    obsoletesÚ classifiersÚ download_urlr)ÚselfÚmvrrrÚget_metadata_version0s*  
 
ÿþý
ÿÿ
r0cs t|ƒ‰‡fdd„}‡fdd„}tˆdƒ|_|dƒ|_|dƒ|_|dƒ|_|d    ƒ|_d
|_|d ƒ|_d
|_    |d ƒ|_
|d ƒ|_ dˆkr”|dƒ|_ nd
|_ |dƒ|_ |dƒ|_dˆkrÆ|dƒ d¡|_|dƒ|_|dƒ|_|jtdƒkr
|dƒ|_|dƒ|_|dƒ|_nd
|_d
|_d
|_d
S)z-Reads the metadata values from a file object.csˆ|}|dkrdS|S)NÚUNKNOWNr)ÚnameÚvalue©ÚmsgrrÚ _read_fieldJsz"read_pkg_file.<locals>._read_fieldcsˆ |d¡}|gkrdS|S©N)Úget_all)r2Úvaluesr4rrÚ
_read_listPs z!read_pkg_file.<locals>._read_listzmetadata-versionr2ÚversionÚsummaryÚauthorNz author-emailz    home-pageÚlicensez download-urlÚ descriptionÚkeywordsú,ÚplatformÚ
classifierr"r*r)r+)rr rr2r;r?r=r&Ú author_emailr'Úurlr>r-Úlong_descriptionÚsplitr@Ú    platformsr,r*r)r+)r.Úfiler6r:rr4rÚ read_pkg_fileFs:  
 
 
 
 
 
 
 
 
 
 
 
 
 rJc sˆ ¡}tjr‡‡fdd„}n ‡fdd„}|dt|ƒƒ|dˆ ¡ƒ|dˆ ¡ƒ|dˆ ¡ƒ|dˆ ¡ƒ|td    ƒkrš|d
ˆ     ¡ƒ|d ˆ 
¡ƒn.d }|D]$\}}t ˆ|ƒ}|d k    r¢|||ƒq¢|dˆ  ¡ƒˆj rè|dˆj ƒˆj ¡D]}|dd|ƒqòtˆ ¡ƒ}    |d|    ƒd ˆ ¡¡}
|
r:|d|
ƒ|td    ƒkrdˆ ¡D]} |d| ƒqPnˆ ˆdˆ ¡¡ˆ ˆdˆ ¡¡ˆ ˆdˆ ¡¡ˆ ˆdˆ ¡¡ˆ ˆdˆ ¡¡tˆdƒrÖ|dˆjƒˆjrê|dˆjƒˆjr
ˆjD]} |d| ƒqød S)z5Write the PKG-INFO format data to a file object.
    csˆ d|ˆ |¡f¡dS©Nz%s: %s
)ÚwriteZ _encode_field©Úkeyr3©rIr.rrÚ write_field‚sz#write_pkg_file.<locals>.write_fieldcsˆ d||f¡dSrK)rLrM)rIrrrP…szMetadata-VersionÚNameÚVersionZSummaryz    Home-pager!ÚAuthorú Author-email))rSr=)rTrD)Z
Maintainerr&)zMaintainer-emailr'NZLicensez Download-URLz Project-URLz%s, %sÚ DescriptionrAZKeywordsÚPlatformÚ
ClassifierÚRequiresÚProvidesÚ    Obsoletesr zRequires-PythonzDescription-Content-TypezProvides-Extra)r0r ÚPY2ÚstrÚget_nameÚ get_versionÚget_descriptionÚget_urlr Ú get_contactÚget_contact_emailr#Ú get_licenser-r(Úitemsr Úget_long_descriptionÚjoinÚ get_keywordsÚ get_platformsÚ _write_listÚget_classifiersÚ get_requiresÚ get_providesÚ get_obsoletesÚhasattrr r$r%) r.rIr;rPZoptional_fieldsÚfieldÚattrZattr_valÚ project_urlÚ    long_descr@rBÚextrarrOrÚwrite_pkg_file|sZ   
 
 
   þ
rtc Cs`ztj d|¡}|jrt‚Wn<ttttfk
rZ}ztd||fƒ|‚W5d}~XYnXdS)Nzx=z4%r must be importable 'module:attrs' string (got %r))    Ú pkg_resourcesÚ
EntryPointÚparseÚextrasÚAssertionErrorÚ    TypeErrorÚ
ValueErrorÚAttributeErrorr
)Údistrpr3ÚepÚerrrÚcheck_importableËsÿÿýr€c Csjz(t|ttfƒst‚d |¡|ks&t‚Wn<ttttfk
rd}ztd||fƒ|‚W5d}~XYnXdS)z"Verify that value is a string listÚz%%r must be a list of strings (got %r)N)    Ú
isinstanceÚlistÚtupleryrfrzr{r|r
©r}rpr3rrrrÚassert_string_listÖs
ÿþr†cCsd|}t|||ƒ|D]J}| |¡s2tdd|ƒ‚| d¡\}}}|r||krtj d||¡qdS)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.pyN)r†Úhas_contents_forr
Ú
rpartitionÚ    distutilsÚlogr)r}rpr3Z ns_packagesÚnspÚparentÚsepÚchildrrrÚ    check_nspäs  
ÿÿ þrc
CsPztt t| ¡¡ƒWn2tttfk
rJ}ztdƒ|‚W5d}~XYnXdS)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ƒÚ    itertoolsÚstarmapÚ _check_extrardrzr{r|r
r…rrrÚ check_extrasösÿür”cCs<| d¡\}}}|r*t |¡r*td|ƒ‚tt |¡ƒdS)Nú:zInvalid environment marker: )Ú    partitionruÚinvalid_markerr
rƒÚparse_requirements)rsÚreqsr2rŽÚmarkerrrrr“s r“cCs&t|ƒ|kr"d}t|j||dƒ‚dS)z)Verify that value is True, False, 0, or 1z0{attr!r} must be a boolean value (got {value!r}))rpr3N)Úboolr
Úformat)r}rpr3ÚtmplrrrÚ assert_bool    s ržc
Cslz(tt |¡ƒt|ttfƒr&tdƒ‚Wn>ttfk
rf}zd}t|j    ||dƒ|‚W5d}~XYnXdS)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}©rpÚerrorN)
rƒrur˜r‚ÚdictÚsetrzr{r
rœ©r}rpr3r rrrrÚcheck_requirementss ÿ ÿþr¤c
CsTztj |¡Wn>tjjk
rN}zd}t|j||dƒ|‚W5d}~XYnXdS)z.Verify that value is a valid version specifierzF{attr!r} must be a string containing valid version specifiers; {error}rŸN)rÚ
specifiersÚ SpecifierSetÚInvalidSpecifierr
rœr£rrrÚcheck_specifier sÿ ÿþr¨c
CsBztj |¡Wn,tk
r<}zt|ƒ|‚W5d}~XYnXdS)z)Verify that entry_points map is parseableN)rurvÚ    parse_mapr{r
r…rrrÚcheck_entry_points.srªcCst|tjƒstdƒ‚dS)Nztest_suite must be a string)r‚r Ú string_typesr
)r}rpr3rrrÚcheck_test_suite6s r¬cCs\t|tƒstd |¡ƒ‚| ¡D]6\}}t|tjƒsDtd ||¡ƒ‚t|d |¡|ƒq dS)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)r‚r¡r
rœrdr r«r†)r}rpr3ÚkÚvrrrÚcheck_package_data;s
ÿÿ ÿÿr¯cCs(|D]}t d|¡stj d|¡qdS)Nz \w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)ÚreÚmatchrŠr‹r)r}rpr3ÚpkgnamerrrÚcheck_packagesJs  þr³c@sFeZdZdZdeejejdœZdZdd„Z    dGdd„Z
e dd    „ƒZ e d
d „ƒZ d d „Zdd„Ze dd„ƒZdd„Zdd„ZdHdd„Ze dd„ƒZdIdd„ZdJdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Z d3d4„Z!d5d6„Z"d7d8„Z#d9d:„Z$d;d<„Z%d=d>„Z&d?d@„Z'dAdB„Z(dCdD„Z)dEdF„Z*dS)KraG 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.
    N)r$r(r%Z license_filescCsl|rd|ksd|krdSt t|dƒ¡ ¡}tjj |¡}|dk    rh| d¡sht t|dƒ¡|_    ||_
dS)Nr2r;zPKG-INFO) ruÚ    safe_namer\ÚlowerÚ working_setÚby_keyÚgetÚ has_metadataÚ safe_versionÚ_versionÚ _patched_dist)r.ÚattrsrNr}rrrÚpatch_missing_pkg_info“sz#Distribution.patch_missing_pkg_infocstˆdƒ}|siˆ_|pi}gˆ_| dd¡ˆ_ˆ |¡| dg¡ˆ_| dg¡ˆ_t     d¡D]}t
ˆƒ  |j d¡q`t  ˆ‡fdd„| ¡Dƒ¡ˆj ¡D]J\}}ˆjj|fD]}||kr´||}qÜq´|rØ|ƒnd}tˆj||ƒq ˆ ˆ ˆjj¡¡ˆj_ˆ ¡dS)NÚ package_dataÚsrc_rootÚdependency_linksÚsetup_requiresúdistutils.setup_keywordscs i|]\}}|ˆjkr||“qSr)Ú_DISTUTILS_UNSUPPORTED_METADATA©Ú.0r­r®©r.rrÚ
<dictcomp>­s
ÿz)Distribution.__init__.<locals>.<dictcomp>)rnr¿Ú
dist_filesÚpoprÀr¾rÁrÂruÚiter_entry_pointsÚvarsÚ
setdefaultr2Ú _DistributionÚ__init__rdrÄÚmetadataÚ__dict__ÚsetattrÚ_normalize_versionÚ_validate_versionr;Ú_finalize_requires)r.r½Zhave_package_datar~ÚoptionÚdefaultÚsourcer3rrÇrrÏ s2
 
ÿ ÿzDistribution.__init__cCsPt|tjƒs|dkr|Sttj |¡ƒ}||krLd}t |j    ft
ƒŽ¡|S|S)Nz)Normalizing '{version}' to '{normalized}') r‚Ú
setuptoolsÚsicr\rr;rRrrrœÚlocals)r;Ú
normalizedrrrrrÓÂszDistribution._normalize_versionc    Csft|tjƒrt|ƒ}|dk    rbztj |¡Wn4tjjtfk
r`t     
d|¡t   |¡YSX|S)Nz¦The 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.) r‚ÚnumbersÚNumberr\rr;rRÚInvalidVersionrzrrrÙrÚ)r;rrrrÔÎs ýÿzDistribution._validate_versioncCsft|ddƒr|j|j_t|ddƒrR|j ¡D]$}| d¡d}|r,|jj |¡q,| ¡|     ¡dS)z€
        Set `metadata.python_requires` and fix environment markers
        in `install_requires` and `extras_require`.
        r NÚextras_requirer•r)
r#r rÐràÚkeysrGr%ÚaddÚ_convert_extras_requirementsÚ"_move_install_requirements_markers)r.rsrrrrÕás 
 zDistribution._finalize_requirescCsht|ddƒpi}ttƒ|_| ¡D]@\}}|j|t |¡D]"}| |¡}|j|| |¡q>q"dS)z¡
        Convert requirements in `extras_require` of the form
        `"extra": ["barbazquux; {marker}"]` to
        `"extra:{marker}": ["barbazquux"]`.
        ràN)    r#rrƒÚ_tmp_extras_requirerdrur˜Ú _suffix_forÚappend)r.Z spec_ext_reqsÚsectionr®ÚrÚsuffixrrrrãõs
 
 
z)Distribution._convert_extras_requirementscCs|jrdt|jƒSdS)ze
        For a requirement, return the 'extras_require' suffix for
        that requirement.
        r•r)ršr\©ÚreqrrrræszDistribution._suffix_forcsdd„}tˆddƒpd}tt |¡ƒ}t||ƒ}t||ƒ}ttt|ƒƒˆ_|D]}ˆj    dt|j
ƒ  |¡qNt ‡fdd„ˆj      ¡Dƒƒˆ_dS)    zv
        Move requirements in `install_requires` that are using environment
        markers `extras_require`.
        cSs|j Sr7©ršrërrrÚ is_simple_reqszFDistribution._move_install_requirements_markers.<locals>.is_simple_reqÚinstall_requiresNrr•c3s,|]$\}}|dd„tˆj|ƒDƒfVqdS)cSsg|] }t|ƒ‘qSr)r\)rÆrérrrÚ
<listcomp>"szMDistribution._move_install_requirements_markers.<locals>.<genexpr>.<listcomp>N)rÚ
_clean_reqrÅrÇrrÚ    <genexpr>!sÿzBDistribution._move_install_requirements_markers.<locals>.<genexpr>)r#rƒrur˜rrrr\rïråršrçr¡rdrà)r.rîZspec_inst_reqsZ    inst_reqsZ simple_reqsZ complex_reqsrérrÇrrä s
 
 
 þz/Distribution._move_install_requirements_markerscCs
d|_|S)zP
        Given a Requirement, remove environment markers and return it.
        Nrí)r.rìrrrrñ&szDistribution._clean_reqc CsÞddlm}tjs>tjtjkr>ddddddd    d
d d d ddg }ng}t|ƒ}|dkrZ| ¡}t    rh| 
d¡|ƒ}|D]º}t j |dd4}t    rž| 
dj ftƒŽ¡tjrª|jn|j|ƒW5QRX| ¡D]\}| |¡}| |¡}    |D]>}
|
dkrâ|
|krâ| | ||
¡¡} |
 dd¡}
|| f|    |
<qâqÆ| ¡qrd|jkrÚ|jd ¡D]\}
\} } |j |
¡} zF| r|t|| t| ƒ ƒn(|
dkr˜t||
t| ƒƒn t||
| ƒWn.tk
rÔ}zt|ƒ|‚W5d}~XYnXqHdS)z£
        Adapted from distutils.dist.Distribution.parse_config_files,
        this method provides the same functionality in subtly-improved
        ways.
        r)Ú ConfigParserz install-basezinstall-platbasez install-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptsz install-dataÚprefixz exec-prefixÚhomeÚuserÚrootNz"Distribution.parse_config_files():úutf-8)Úencodingz  reading {filename}Ú__name__ú-Ú_Úglobal)ÚverboseÚdry_run)Z(setuptools.extern.six.moves.configparserrór r[ÚsysrôÚ base_prefixÚ    frozensetÚfind_config_filesrÚannounceÚioÚopenrœrÛÚreadfpÚ    read_fileÚsectionsÚoptionsÚget_option_dictÚ_try_strr¸ÚreplacerÏÚcommand_optionsrdÚ negative_optrÒrr{r    )r.Ú    filenamesróÚignore_optionsÚparserÚfilenameÚreaderrèr
Úopt_dictÚoptÚvalÚsrcÚaliasrrrrÚ_parse_config_files-s` ü
  
 
 
 
z Distribution._parse_config_filescCs.tjs
|Sz
| ¡WStk
r(YnX|S)ab
        On Python 2, much of distutils relies on string values being of
        type 'str' (bytes) and not unicode text. If the value can be safely
        encoded to bytes using the default encoding, prefer that.
 
        Why the default encoding? Because that value can be implicitly
        decoded back to text if needed.
 
        Ref #1653
        )r r[ÚencodeÚUnicodeEncodeError)rrrrr ks 
zDistribution._try_strc Cs`| ¡}|dkr| |¡}tr,| d|¡| ¡D]$\}\}}trZ| d|||f¡zdd„|jDƒ}Wntk
r†g}YnXz
|j}Wntk
rªi}YnXz~t|t    j
ƒ}    ||krÞ|    rÞt |||t |ƒ ƒnJ||krü|    rüt ||t |ƒƒn,t ||ƒrt |||ƒntd|||fƒ‚Wq4tk
rX}
zt|
ƒ|
‚W5d}
~
XYq4Xq4dS)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    %s = %s (from %s)cSsg|] }t|ƒ‘qSrr)rÆÚorrrrð–sÿz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')Úget_command_namer rrrdÚboolean_optionsr|rr‚r r«rÒrrnr    r{) r.Ú command_objÚ option_dictÚ command_namerÖrØr3Ú    bool_optsÚneg_optÚ    is_stringrrrrÚ_set_command_optionssF 
 
ÿÿ
 
 
 
    ÿÿz!Distribution._set_command_optionsFcCs(|j|dt||j|d| ¡dS)zYParses configuration files from various levels
        and loads configuration.
 
        )r)Úignore_option_errorsN)rrrrÕ)r.rr'rrrÚparse_config_files®s
 ÿzDistribution.parse_config_filescCs8tjjt |¡|jdd}|D]}tjj|ddq|S)zResolve pre-setup requirementsT)Ú    installerÚreplace_conflicting)r )rur¶Úresolver˜Úfetch_build_eggrâ)r.r*Zresolved_distsr}rrrÚfetch_build_eggs¹sýzDistribution.fetch_build_eggscCs>d}dd„}tdd„t |¡ƒ}t||dD] }||ƒq,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_optionscSs t|ddƒS)NÚorderr)r#)ÚhookrrrÚby_orderÍsz/Distribution.finalize_options.<locals>.by_ordercSs| ¡Sr7)Úload)rrrrÚ<lambda>Ïóz/Distribution.finalize_options.<locals>.<lambda>)rNN)rrurËÚsorted)r.Úgroupr0Úepsr~rrrÚfinalize_optionsÄs
zDistribution.finalize_optionscCsJt d¡D]:}t||jdƒ}|dk    r
|j|jd| ¡||j|ƒq
dS)Nrér))rurËr#r2Úrequirer,r1)r.r~r3rrrÚ_finalize_setup_keywordsÓs
z%Distribution._finalize_setup_keywordscCs*t|ddƒr dd„|jDƒ|_ng|_dS)NÚconvert_2to3_doctestscSsg|]}tj |¡‘qSr)ÚosÚpathÚabspath©rÆÚprrrrðÝsÿz8Distribution._finalize_2to3_doctests.<locals>.<listcomp>)r#r;rÇrrrÚ_finalize_2to3_doctestsÚs
 þ
z$Distribution._finalize_2to3_doctestsc    Csvtj tjd¡}tj |¡srt |¡t |¡tj |d¡}t|dƒ$}|     d¡|     d¡|     d¡W5QRX|S)Nz.eggsz
README.txtÚwzcThis 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.
 
)
r<r=rfÚcurdirÚexistsÚmkdirrZ    hide_filerrL)r.Z egg_cache_dirZreadme_txt_filenameÚfrrrÚget_egg_cache_diräs 
 
 
 
zDistribution.get_egg_cache_dircCsddlm}|||ƒS)z Fetch an egg needed for buildingr)r,)Zsetuptools.installerr,)r.rìr,rrrr,ós zDistribution.fetch_build_eggcCs\||jkr|j|St d|¡}|D]*}|j|jd| ¡|j|<}|St ||¡S)z(Pluggable version of get_command_class()údistutils.commandsr8N)ÚcmdclassrurËr9r,r1rÎÚget_command_class)r.Úcommandr6r~rIrrrrJøs
 
 zDistribution.get_command_classcCs:t d¡D]$}|j|jkr
| ¡}||j|j<q
t |¡S©NrH)rurËr2rIr+rÎÚprint_commands©r.r~rIrrrrMs
 zDistribution.print_commandscCs:t d¡D]$}|j|jkr
| ¡}||j|j<q
t |¡SrL)rurËr2rIr+rÎÚget_command_listrNrrrrO s
 zDistribution.get_command_listcKs@| ¡D]2\}}t|d|dƒ}|r.||ƒq| ||¡qdS)aôAdd 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.
        Z    _include_N)rdr#Ú _include_misc)r.r½r­r®ÚincluderrrrQs
 
zDistribution.includecsfˆd‰|jr&‡‡fdd„|jDƒ|_|jrD‡‡fdd„|jDƒ|_|jrb‡‡fdd„|jDƒ|_dS)z9Remove packages, modules, and extensions in named packager‡cs"g|]}|ˆkr| ˆ¡s|‘qSr©Ú
startswithr?©ÚpackageÚpfxrrrð0s
ÿz0Distribution.exclude_package.<locals>.<listcomp>cs"g|]}|ˆkr| ˆ¡s|‘qSrrRr?rTrrrð6s
ÿcs&g|]}|jˆkr|j ˆ¡s|‘qSr)r2rSr?rTrrrð<s
ÿN)ÚpackagesÚ
py_modulesÚ ext_modules)r.rUrrTrÚexclude_package+s ÿ ÿ ÿzDistribution.exclude_packagecCs2|d}| ¡D]}||ks&| |¡rdSqdS)z<Return true if 'exclude_package(package)' would do somethingr‡TN)Úiter_distribution_namesrS)r.rUrVr@rrrrˆAs zDistribution.has_contents_forc
sœtˆtƒstd|ˆfƒ‚zt||ƒ}Wn0tk
rX}ztd|ƒ|‚W5d}~XYnX|dk    rzt|tƒszt|dƒ‚n|r˜t||‡fdd„|DƒƒdS)zAHandle 'exclude()' for list/tuple attrs without a special handlerz(%s: setting must be a list or tuple (%r)ú %s: No such distribution settingNú4: this setting cannot be changed via include/excludecsg|]}|ˆkr|‘qSrr©rÆÚitem©r3rrrð[sz.Distribution._exclude_misc.<locals>.<listcomp>©r‚Úsequencer
r#r|rÒ)r.r2r3Úoldrrr`rÚ _exclude_miscJs$
 
ÿÿþÿzDistribution._exclude_miscc
s®t|tƒstd||fƒ‚zt||ƒ‰Wn0tk
rX}ztd|ƒ|‚W5d}~XYnXˆdkrpt|||ƒn:tˆtƒsˆt|dƒ‚n"‡fdd„|Dƒ}t||ˆ|ƒdS)zAHandle 'include()' for list/tuple attrs without a special handlerz%s: setting must be a list (%r)r\Nr]csg|]}|ˆkr|‘qSrrr^©rcrrrðqsz.Distribution._include_misc.<locals>.<listcomp>ra)r.r2r3rÚnewrrerrP]s(
 
ÿÿþ
ÿzDistribution._include_misccKs@| ¡D]2\}}t|d|dƒ}|r.||ƒq| ||¡qdS)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.
        Z    _exclude_N)rdr#rd)r.r½r­r®Úexcluderrrrgts
 
zDistribution.excludecCs,t|tƒstd|fƒ‚tt|j|ƒƒdS)Nz.packages: setting must be a list or tuple (%r))r‚rbr
rƒrrZ)r.rWrrrÚ_exclude_packages‹s
 
ÿzDistribution._exclude_packagesc
Cs¬|jj|_|jj|_|d}| d¡}||krf||\}}||=ddl}| |d¡|dd…<|d}q&t |||¡}| |¡}    t    |    ddƒr¨d|f| |¡d<|dk    r¨gS|S)NrÚaliasesTrZcommand_consumes_argumentsú command lineÚargs)
Ú    __class__Úglobal_optionsrr ÚshlexrGrÎÚ_parse_command_optsrJr#)
r.rrkrKrirrrnÚnargsÚ    cmd_classrrrro’s"
 
 
 
 
 z Distribution._parse_command_optsc CsÂi}|j ¡D]®\}}| ¡D]œ\}\}}|dkr4q| dd¡}|dkrž| |¡}|j ¡}| t|diƒ¡| ¡D]\}    }
|
|krv|    }d}qªqvtdƒ‚n |dkrªd}||     |i¡|<qq|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.
        rjrürûrrNzShouldn't be able to get herer)
rrdr Úget_command_objrÚcopyÚupdater#ryrÍ) r.ÚdÚcmdÚoptsrrrZcmdobjr$ÚnegÚposrrrÚget_cmdline_options¬s(
 
 
 
z Distribution.get_cmdline_optionsccsv|jpdD]
}|Vq
|jpdD]
}|Vq |jp4dD]:}t|tƒrN|\}}n|j}| d¡rj|dd…}|Vq6dS)z@Yield all packages, modules, and extension names in distributionrÚmoduleNiúÿÿÿ)rWrXrYr‚r„r2Úendswith)r.Úpkgr{Úextr2Z    buildinforrrr[Ôs
 
 
 z$Distribution.iter_distribution_namesc CsÌddl}tjs|jr t ||¡St|jtj    ƒs:t ||¡S|jj
  ¡dkrVt ||¡S|jj
}|jj }|j dkrtdpvd}|jj}t     |j ¡d|||¡|_zt ||¡W¢St     |j ¡||||¡|_XdS)zÚIf 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øÚutf8Úwin32Ú
rø)rr r[Ú help_commandsrÎÚhandle_display_optionsr‚ÚstdoutrÚ TextIOWrapperrùrµÚerrorsrBÚline_bufferingÚdetach)r.Ú option_orderrrùr†Únewliner‡rrrrƒæs6    ÿÿz#Distribution.handle_display_options)N)N)N)NF)+rúÚ
__module__Ú __qualname__Ú__doc__r¡rZ
OrderedSetrÄr¼r¾rÏÚ staticmethodrÓrÔrÕrãrærärñrr r&r(r-r7r:rArGr,rJrMrOrQrZrˆrdrPrgrhrorzr[rƒrrrrrVsX4ü
"
 
 
 
>
 
/
 
     (c@seZdZdZdS)rzrClass for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning.N)rúr‹rŒrrrrrr    sr)FÚ__all__rrr°r<rrÝZ distutils.logrŠÚdistutils.coreÚ distutils.cmdÚdistutils.distÚdistutils.utilrÚdistutils.debugrÚdistutils.fancy_getoptrr‘Ú collectionsrÚemailrÚdistutils.errorsr    r
r Zdistutils.versionr Zsetuptools.externr rrZsetuptools.extern.six.movesrrrrrrÙrZsetuptools.monkeyrZsetuptools.configrruÚ
__import__rr0rJrtr„rƒrbr€r†rr”r“ržr¤r¨rªr¬r¯r³ÚcorerrÎrrrrrÚ<module>sp              6L       8