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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
U
G=®dõÄã@sÌdZddlZddlZddlZddlmZz ddlZWnek
rLdZYnXddlTddl    m
Z
m Z ddl m Z mZmZddlmZddlmZe d    ¡Zd
d „ZGd d „d ƒZGdd„dƒZdd„ZdS)z}distutils.dist
 
Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
éN)Úmessage_from_file)Ú*)Ú FancyGetoptÚtranslate_longopt)Ú check_environÚ    strtoboolÚ rfc822_escape©Úlog)ÚDEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$cCsLt|tƒr n<t|tƒsHt|ƒj}d}|jftƒŽ}t tj|¡t|ƒ}|S)Nz>Warning: '{fieldname}' should be a list, got type '{typename}')    Ú
isinstanceÚstrÚlistÚtypeÚ__name__ÚformatÚlocalsr
ÚWARN)ÚvalueÚ    fieldnameÚtypenameÚmsg©rúQD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/_distutils/dist.pyÚ _ensure_lists
 
 
rc@speZdZdZdddddgZdZdd    d
d d d dddddddddddddddgZdd„eDƒZdd iZdad"d#„Z    d$d%„Z
dbd'd(„Z d)d*„Z dcd+d,„Z d-d.„Zd/d0„Zd1d2„Zd3d4„Zd5d5gfd6d7„Zd8d9„Zd:d;„Zd<d=„Zd>d?„Zd@dA„ZdBdC„ZdddDdE„ZdedFdG„ZdfdIdJ„ZejfdKdL„ZdMdN„ZdOdP„Z dQdR„Z!dSdT„Z"dUdV„Z#dWdX„Z$dYdZ„Z%d[d\„Z&d]d^„Z'd_d`„Z(d!S)gÚ Distributiona½The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.
 
    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    )ÚverboseÚvzrun verbosely (default)é)ÚquietÚqz!run quietly (turns verbosity off))zdry-runÚnzdon't actually do anything)ÚhelpÚhzshow detailed help message)z no-user-cfgNz-ignore pydistutils.cfg in your home directoryz£Common commands: (see '--help-commands' for more)
 
  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
)z help-commandsNzlist all available commands)ÚnameNzprint package name)ÚversionÚVzprint package version)ÚfullnameNzprint <package name>-<version>)ÚauthorNzprint the author's name)ú author-emailNz print the author's email address)Ú
maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)ÚcontactNz7print the maintainer's name if known, else the author's)z contact-emailNz@print the maintainer's email address if known, else the author's)ÚurlNzprint the URL for this package)ÚlicenseNz print the license of the package)ÚlicenceNzalias for --license)Ú descriptionNzprint the package description)zlong-descriptionNz"print the long package description)Ú    platformsNzprint the list of platforms)Ú classifiersNzprint the list of classifiers)ÚkeywordsNzprint the list of keywords)ÚprovidesNz+print the list of packages/modules provided)ÚrequiresNz+print the list of packages/modules required)Ú    obsoletesNz0print the list of packages/modules made obsoletecCsg|]}t|dƒ‘qS)r©r)Ú.0ÚxrrrÚ
<listcomp>‚szDistribution.<listcomp>rrNcCs\d|_d|_d|_|jD]}t||dƒqtƒ|_|jjD] }d|}t||t|j|ƒƒq:i|_    d|_
d|_ d|_ i|_ g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|r| d¡}|dk    r8|d=| ¡D]4\}}|  |¡}| ¡D]\}    }
d|
f||    <qqd|kr~|d|d    <|d=d
} t!dk    rnt! "| ¡nt#j$ %| d ¡| ¡D]€\} }
t&|jd | ƒr¶t|jd | ƒ|
ƒnNt&|j| ƒrÔt|j| |
ƒn0t&|| ƒrît|| |
ƒnd t'| ƒ} t! "| ¡q†d|_(|j dk    rP|j D].} |  )d¡s6qP| dkr d|_(qPq | *¡dS)a0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        rrÚget_NÚÚoptionsz setup scriptr.r-z:'licence' distribution option is deprecated; use 'license'Ú
Úset_zUnknown distribution option: %sTú-z --no-user-cfgF)+rÚdry_runr"Údisplay_option_namesÚsetattrÚDistributionMetadataÚmetadataÚ_METHOD_BASENAMESÚgetattrÚcmdclassÚcommand_packagesÚ script_nameÚ script_argsÚcommand_optionsÚ
dist_filesÚpackagesÚ package_dataÚ package_dirÚ
py_modulesÚ    librariesÚheadersÚ ext_modulesÚ ext_packageÚ include_dirsÚ
extra_pathÚscriptsÚ
data_filesÚpasswordÚ command_objÚhave_runÚgetÚitemsÚget_option_dictÚwarningsÚwarnÚsysÚstderrÚwriteÚhasattrÚreprÚ want_user_cfgÚ
startswithÚfinalize_options)ÚselfÚattrsÚattrÚbasenameÚ method_namer<ÚcommandÚ cmd_optionsÚopt_dictÚoptÚvalrÚkeyÚargrrrÚ__init__‰s~ 
 
 
 
 
 
 
 
 
zDistribution.__init__cCs&|j |¡}|dkr"i}|j|<|S)zíGet the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N)rKr\)rirnÚdictrrrr^'s zDistribution.get_option_dictr;c    CsÈddlm}|dkr"t|j ¡ƒ}|dk    r@| ||¡|d}|sV| |d¡dS|D]h}|j |¡}|dkr†| |d|¡qZ| |d|¡||ƒ}| d¡D]}| |d|¡qªqZdS)Nr)Úpformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:r=)ÚpprintrwÚsortedrKÚkeysÚannouncer\Úsplit)    riÚheaderÚcommandsÚindentrwÚcmd_namerpÚoutÚlinerrrÚdump_option_dicts2s*  ÿÿzDistribution.dump_option_dictscCs¾g}tƒtj tjdj¡}tj |d¡}tj |¡rB|     |¡tj
dkrRd}nd}|j rˆtj tj  d¡|¡}tj |¡rˆ|     |¡d}tj |¡r¢|     |¡t rº| dd     |¡¡|S)
a¾Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).
 
        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.
 
        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        Ú    distutilsz distutils.cfgÚposixz.pydistutils.cfgzpydistutils.cfgú~z    setup.cfgzusing config files: %sz, )rÚosÚpathÚdirnameraÚmodulesÚ__file__ÚjoinÚisfileÚappendr$rfÚ
expanduserr r{)riÚfilesÚsys_dirÚsys_fileÚ user_filenameÚ    user_fileÚ
local_filerrrÚfind_config_filesNs& 
 
 
 
zDistribution.find_config_filesc Cs¤ddlm}tjtjkr8ddddddd    d
d d d ddg }ng}t|ƒ}|dkrT| ¡}trb| d¡|ƒ}|D]ˆ}tr‚| d|¡|     |¡| 
¡D]V}|  |¡}|  |¡}|D]8}    |    dkr°|    |kr°|  ||    ¡}
|     dd¡}    ||
f||    <q°q”| ¡qld|jkr |jd ¡D]Ž\}    \} }
|j  |    ¡} zF| rDt|| t|
ƒ ƒn(|    dkr`t||    t|
ƒƒn t||    |
ƒWn,tk
rš} z t| ƒ‚W5d} ~ XYnXqdS)Nr)Ú ConfigParserz install-basezinstall-platbasez install-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptsz install-dataÚprefixz exec-prefixÚhomeÚuserÚrootz"Distribution.parse_config_files():z   reading %srr?Ú_Úglobal)rr@)Ú configparserr—rar˜Ú base_prefixÚ    frozensetr–r r{ÚreadÚsectionsr<r^r\ÚreplacerurKr]Ú negative_optrBrÚ
ValueErrorÚDistutilsOptionError)riÚ    filenamesr—Úignore_optionsÚparserÚfilenameÚsectionr<rprqrrÚsrcÚaliasrrrrÚparse_config_files~s^  ü
 
 
 
 
 
zDistribution.parse_config_filescCs¾| ¡}g|_t||jƒ}| |j¡| ddi¡|j|j|d}|     ¡}t
  |j ¡|  |¡rhdS|r†| ||¡}|dkrhdSqh|jr¬|j|t|jƒdk|jddS|jsºtdƒ‚dS)    a‡Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        r.r-)ÚargsÚobjectNr©Údisplay_optionsr~zno commands suppliedT)Ú_get_toplevel_optionsr~rr²Úset_negative_aliasesr¤Ú set_aliasesÚgetoptrJÚget_option_orderr
Ú set_verbosityrÚhandle_display_optionsÚ_parse_command_optsr"Ú
_show_helpÚlenÚDistutilsArgError)riÚtoplevel_optionsr©r¯Ú option_orderrrrÚparse_command_line¸s.      
  þzDistribution.parse_command_linecCs |jdgS)zÃReturn the non-display options recognized at the top level.
 
        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        )zcommand-packages=Nz0list of packages that provide distutils commands)Úglobal_options©rirrrr³ûsÿz"Distribution._get_toplevel_optionsc
Csþddlm}|d}t |¡s*td|ƒ‚|j |¡z| |¡}Wn*tk
rn}z t    |ƒ‚W5d}~XYnXt
||ƒs†t d|ƒ‚t |dƒrœt |jtƒs¬d}t ||ƒ‚|j}t |dƒrÐ| ¡}| |j¡t |d    ƒròt |jtƒròt|jƒ}ng}| |j|j|¡| |¡| |d
d…¡\}}    t |    d ƒrV|    jrV|j|d|gd dSt |d    ƒrÌt |jtƒrÌd}
|jD]F\} } } }t |    | | ¡ƒrzd
}
t|ƒr®|ƒnt d || fƒ‚qz|
rÌdS| |¡}t|    ƒ ¡D]\}}d|f||<qâ|S)aÚParse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        r©ÚCommandzinvalid command name '%s'Nz&command class %s must subclass CommandÚ user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r¤Ú help_optionsrr"r±zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)z command line) Ú distutils.cmdrÄÚ
command_reÚmatchÚ
SystemExitr~rŽÚget_command_classÚDistutilsModuleErrorr½Ú
issubclassÚDistutilsClassErrorrdr rÅrr¤ÚcopyÚupdaterÆÚfix_help_optionsÚset_option_tablerÁr´r¶r"r»Ú get_attr_nameÚcallabler^Úvarsr])rir©r¯rÄrnÚ    cmd_classrr¤rÆÚoptsÚhelp_option_foundÚ help_optionÚshortÚdescÚfuncrpr$rrrrrºsr
 
 
ÿ
 
ÿ 
 
 
ÿ ÿþ
 
ÿ
þÿ
z Distribution._parse_command_optscCsPdD]F}t|j|ƒ}|dkrqt|tƒrdd„| d¡Dƒ}t|j||ƒqdS)z›Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        ©r2r0NcSsg|] }| ¡‘qSr©Ústrip)r7Úelmrrrr9ksz1Distribution.finalize_options.<locals>.<listcomp>ú,)rFrDr r r|rB)rirkrrrrrhas 
zDistribution.finalize_optionsrc
Csddlm}ddlm}|rR|r*| ¡}n|j}| |¡| |jd¡t    dƒ|rt| |j
¡| d¡t    dƒ|j D]z}t |t ƒr˜t||ƒr˜|}    n
| |¡}    t|    dƒrÐt |    jtƒrÐ| |    jt|    jƒ¡n | |    j¡| d|    j¡t    dƒqzt    ||jƒƒd    S)
abShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.
 
        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        r©Ú    gen_usagerÃz
Global options:r;zKInformation display options (just display information, ignore any commands)rÆzOptions for '%s' command:N)Údistutils.corerãrÇrÄr³rÁrÒÚ
print_helpÚ common_usageÚprintr²r~r rrÍrËrdrÆrrÅrÑrrI)
rir©rÁr²r~rãrÄr<rnÚklassrrrr»ns:  
 
 ÿ
 
 
 
ÿÿ 
zDistribution._show_helpc    CsÊddlm}|jr4| ¡tdƒt||jƒƒdSd}i}|jD]}d||d<qB|D]l\}}|rX| |¡rXt|ƒ}t    |j
d|ƒƒ}|dkr td  |¡ƒn |dkr¸td      |¡ƒnt|ƒd}qX|S)
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.
        rrâr;rr:rÝrá)r1r3r4r5r=) rärãÚ help_commandsÚprint_commandsrçrIr²r\rrFrDrŒ)    rir¿rãÚany_display_optionsÚis_display_optionÚoptionrqrrrrrrr¹ s* 
 z#Distribution.handle_display_optionsc    Csjt|dƒ|D]T}|j |¡}|s.| |¡}z
|j}Wntk
rPd}YnXtd|||fƒqdS)zZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        ú:ú(no description available)z
  %-*s  %sN)rçrGr\rËr/ÚAttributeError)rir~r}Ú
max_lengthÚcmdrèr/rrrÚprint_command_listÈs  
 
 
zDistribution.print_command_listcCsžddl}|jj}i}|D] }d||<qg}|j ¡D]}| |¡s4| |¡q4d}||D]}t|ƒ|krZt|ƒ}qZ| |d|¡|ršt    ƒ| |d|¡dS)anPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        rNrzStandard commandszExtra commands)
Údistutils.commandrnÚ__all__rGrzr\rŽr¼rórç)rir„Ú std_commandsÚis_stdròÚextra_commandsrñrrrrêÙs.
 
 
þþzDistribution.print_commandsc        Cs°ddl}|jj}i}|D] }d||<qg}|j ¡D]}| |¡s4| |¡q4g}||D]P}|j |¡}|sx| |¡}z
|j}Wnt    k
ršd}YnX| ||f¡qZ|S)a>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        rNrrï)
rôrnrõrGrzr\rŽrËr/rð)    rir„rör÷ròrøÚrvrèr/rrrÚget_command_listús(    
 
 
 
 
zDistribution.get_command_listcCsN|j}t|tƒsJ|dkrd}dd„| d¡Dƒ}d|krD| dd¡||_|S)z9Return a list of packages from which commands are loaded.Nr;cSsg|]}|dkr| ¡‘qS)r;rÞ)r7Úpkgrrrr9"sz5Distribution.get_command_packages.<locals>.<listcomp>rázdistutils.commandr)rHr rr|Úinsert)riÚpkgsrrrÚget_command_packagess
 z!Distribution.get_command_packagesc    Cs¸|j |¡}|r|S| ¡D]Š}d||f}|}zt|ƒtj|}Wntk
r^YqYnXzt||ƒ}Wn&tk
r”t    d|||fƒ‚YnX||j|<|St    d|ƒ‚dS)aoReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.
 
        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        z%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s'N)
rGr\rþÚ
__import__rarŠÚ ImportErrorrFrðrÌ)rirnrèÚpkgnameÚ module_nameÚ
klass_nameÚmodulerrrrË(s,   
ÿÿ
 
zDistribution.get_command_classcCsl|j |¡}|sh|rhtr&| d|¡| |¡}||ƒ}|j|<d|j|<|j |¡}|rh| ||¡|S)aReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        z<Distribution.get_command_obj(): creating '%s' command objectr)rZr\r r{rËr[rKÚ_set_command_options)rirnÚcreateÚcmd_objrèr<rrrÚget_command_objNs ÿ
 
  zDistribution.get_command_objc Cs\| ¡}|dkr| |¡}tr,| d|¡| ¡D] \}\}}trZ| d|||f¡zdd„|jDƒ}Wntk
r†g}YnXz
|j}Wntk
rªi}YnXz|t|t    ƒ}    ||krÜ|    rÜt
|||t |ƒ ƒnJ||krú|    rút
||t |ƒƒn,t ||ƒrt
|||ƒnt d|||fƒ‚Wq4tk
rT}
z t |
ƒ‚W5d}
~
XYq4Xq4dS)aySet 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').
        Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|] }t|ƒ‘qSrr6)r7Úorrrr9}sÿz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')Úget_command_namer^r r{r]Úboolean_optionsrðr¤r r rBrrdr¦r¥) rirZÚ option_dictÚ command_nameríÚsourcerÚ    bool_optsÚneg_optÚ    is_stringrrrrrisF    
 
ÿÿ
 
 
 
 
   ÿÿz!Distribution._set_command_optionsrcCs|ddlm}t||ƒs&|}| |¡}n| ¡}|js8|S| ¡d|_d|j|<| |¡|rx|     ¡D]}| 
||¡qf|S)a³Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.
 
        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.
 
        Returns the reinitialized command object.
        rrÃ) rÇrÄr rr
Ú    finalizedÚinitialize_optionsr[rÚget_sub_commandsÚreinitialize_command)rirnÚreinit_subcommandsrÄr Úsubrrrr•s 
 
 
 z!Distribution.reinitialize_commandcCst ||¡dS©Nr    )rirÚlevelrrrr{¾szDistribution.announcecCs|jD]}| |¡qdS)z¶Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N)r~Ú run_command)riròrrrÚ run_commandsÁs
zDistribution.run_commandscCsD|j |¡rdSt d|¡| |¡}| ¡| ¡d|j|<dS)aªDo whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Nz
running %sr)r[r\r
ÚinforÚensure_finalizedÚrun)rirnrrrrrËs      
zDistribution.run_commandcCst|jp|jpgƒdkS©Nr)r¼rMrPrÂrrrÚhas_pure_modulesßszDistribution.has_pure_modulescCs|jot|jƒdkSr)rSr¼rÂrrrÚhas_ext_modulesâszDistribution.has_ext_modulescCs|jot|jƒdkSr)rQr¼rÂrrrÚhas_c_librariesåszDistribution.has_c_librariescCs| ¡p| ¡Sr)r r!rÂrrrÚ has_modulesèszDistribution.has_modulescCs|jot|jƒdkSr)rRr¼rÂrrrÚ has_headersëszDistribution.has_headerscCs|jot|jƒdkSr)rWr¼rÂrrrÚ has_scriptsîszDistribution.has_scriptscCs|jot|jƒdkSr)rXr¼rÂrrrÚhas_data_filesñszDistribution.has_data_filescCs| ¡o| ¡ o| ¡ Sr)r r!r"rÂrrrÚis_pureôs
ÿþzDistribution.is_pure)N)NNr;)N)r)N)r))rÚ
__module__Ú __qualname__Ú__doc__rÁrær²rAr¤rur^rƒr–r®rÀr³rºrhr»r¹rórêrúrþrËrrrr
ÚINFOr{rrr r!r"r#r$r%r&r'rrrrr-s‚û     ×,

0
:C [ ÿ
2(!" &
 
,
)
rc@seZdZdZdZdBdd„Zdd„Zdd    „Zd
d „Zd d „Z    dd„Z
dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zd d!„Zd"d#„ZeZd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zd0d1„Zd2d3„Zd4d5„Zd6d7„Zd8d9„Z d:d;„Z!d<d=„Z"d>d?„Z#d@dA„Z$dS)CrCz]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    )r$r%r(Ú author_emailr*Úmaintainer_emailr,r-r/Úlong_descriptionr2r0r'r+Ú contact_emailr1Ú download_urlr3r4r5NcCs‚|dk    r| t|ƒ¡nfd|_d|_d|_d|_d|_d|_d|_d|_    d|_
d|_ d|_ d|_ d|_d|_d|_d|_d|_dSr)Ú read_pkg_fileÚopenr$r%r(r,r*r-r,r-r/r.r2r0r1r0r3r4r5)rirˆrrrrus&zDistributionMetadata.__init__cst|ƒ‰‡fdd„}‡fdd„}ˆd}|dƒ|_|dƒ|_|dƒ|_|d    ƒ|_d
|_|d ƒ|_d
|_|d ƒ|_|d ƒ|_    dˆkrŽ|dƒ|_
nd
|_
|dƒ|_ |dƒ|_dˆkrÀ|dƒ  d¡|_ |dƒ|_|dƒ|_|dkrü|dƒ|_|dƒ|_|dƒ|_nd
|_d
|_d
|_d
S)z-Reads the metadata values from a file object.csˆ|}|dkrdS|S©NÚUNKNOWNr)r$r©rrrÚ _read_field)sz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcsˆ |d¡}|gkrdS|Sr)Úget_all)r$Úvaluesr5rrÚ
_read_list/s z6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionr$r%Úsummaryr(Nr)z    home-pager-z download-urlr/r2ráÚplatformÚ
classifierú1.1r4r3r5)rr$r%r/r(r*r,r-r,r-r0r.r|r2r0r1r4r3r5)riÚfiler6r9Úmetadata_versionrr5rr1%s:  
 
 
 
 
 
 
 
 
 
 
 
 
 z"DistributionMetadata.read_pkg_filec    Cs2ttj |d¡ddd}| |¡W5QRXdS)z7Write the PKG-INFO file into the release tree.
        zPKG-INFOÚwzUTF-8)ÚencodingN)r2r‡rˆrŒÚwrite_pkg_file)riÚbase_dirÚpkg_inforrrÚwrite_pkg_infoYs
ÿz#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}| d|¡| d| ¡¡| d| ¡¡| d| ¡¡| d|     ¡¡| d| 
¡¡| d    |  ¡¡| d
|  ¡¡|jrÈ| d |j¡t | ¡ƒ}| d |¡d  | ¡¡}|r| d|¡| |d| ¡¡| |d| ¡¡| |d| ¡¡| |d| ¡¡| |d| ¡¡dS)z9Write the PKG-INFO format data to a file object.
        z1.0r=zMetadata-Version: %s
z    Name: %s
z Version: %s
z Summary: %s
zHome-page: %s
z Author: %s
zAuthor-email: %s
z License: %s
zDownload-URL: %s
zDescription: %s
ráz Keywords: %s
ÚPlatformÚ
ClassifierÚRequiresÚProvidesÚ    ObsoletesN)r3r4r5r1r0rcÚget_nameÚ get_versionÚget_descriptionÚget_urlÚ get_contactÚget_contact_emailÚ get_licenserÚget_long_descriptionrŒÚ get_keywordsÚ _write_listÚ get_platformsÚget_classifiersÚ get_requiresÚ get_providesÚ get_obsoletes)rir>r%Ú    long_descr2rrrrB`s6ÿÿ z#DistributionMetadata.write_pkg_filecCs |D]}| d||f¡qdS)Nz%s: %s
)rc)rir>r$r8rrrrrT‚sz DistributionMetadata._write_listcCs
|jpdSr3)r$rÂrrrrKˆszDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r%rÂrrrrL‹sz DistributionMetadata.get_versioncCsd| ¡| ¡fS)Nz%s-%s)rKrLrÂrrrÚ get_fullnameŽsz!DistributionMetadata.get_fullnamecCs
|jpdSr3)r(rÂrrrÚ
get_author‘szDistributionMetadata.get_authorcCs
|jpdSr3)r,rÂrrrÚget_author_email”sz%DistributionMetadata.get_author_emailcCs
|jpdSr3)r*rÂrrrÚget_maintainer—sz#DistributionMetadata.get_maintainercCs
|jpdSr3)r-rÂrrrÚget_maintainer_emailšsz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdSr3)r*r(rÂrrrrOsz DistributionMetadata.get_contactcCs|jp|jpdSr3)r-r,rÂrrrrP sz&DistributionMetadata.get_contact_emailcCs
|jpdSr3)r,rÂrrrrN£szDistributionMetadata.get_urlcCs
|jpdSr3)r-rÂrrrrQ¦sz DistributionMetadata.get_licensecCs
|jpdSr3)r/rÂrrrrMªsz$DistributionMetadata.get_descriptioncCs
|jpdSr3)r.rÂrrrrR­sz)DistributionMetadata.get_long_descriptioncCs
|jpgSr)r2rÂrrrrS°sz!DistributionMetadata.get_keywordscCst|dƒ|_dS)Nr2)rr2©rirrrrÚ set_keywords³sz!DistributionMetadata.set_keywordscCs |jp
dgSr3)r0rÂrrrrU¶sz"DistributionMetadata.get_platformscCst|dƒ|_dS)Nr0)rr0r`rrrÚ set_platforms¹sz"DistributionMetadata.set_platformscCs
|jpgSr)r1rÂrrrrV¼sz$DistributionMetadata.get_classifierscCst|dƒ|_dS)Nr1)rr1r`rrrÚset_classifiers¿sz$DistributionMetadata.set_classifierscCs
|jpdSr3)r0rÂrrrÚget_download_urlÂsz%DistributionMetadata.get_download_urlcCs
|jpgSr)r4rÂrrrrWÆsz!DistributionMetadata.get_requirescCs,ddl}|D]}|j |¡q t|ƒ|_dSr)Údistutils.versionpredicateÚversionpredicateÚVersionPredicaterr4©rirr„rrrrÚ set_requiresÉsz!DistributionMetadata.set_requirescCs
|jpgSr)r3rÂrrrrXÏsz!DistributionMetadata.get_providescCs6dd„|Dƒ}|D]}ddl}|j |¡q||_dS)NcSsg|] }| ¡‘qSrrÞ)r7rrrrr9Ósz5DistributionMetadata.set_provides.<locals>.<listcomp>r)rerfÚsplit_provisionr3)rirrr„rrrÚ set_providesÒs
z!DistributionMetadata.set_providescCs
|jpgSr)r5rÂrrrrYÙsz"DistributionMetadata.get_obsoletescCs,ddl}|D]}|j |¡q t|ƒ|_dSr)rerfrgrr5rhrrrÚ set_obsoletesÜsz"DistributionMetadata.set_obsoletes)N)%rr(r)r*rErur1rErBrTrKrLr[r\r]r^r_rOrPrNrQÚ get_licencerMrRrSrarUrbrVrcrdrWrirXrkrYrlrrrrrCsD    
4"rCcCs$g}|D]}| |dd…¡q|S)zConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    ré)rŽ)r<Ú new_optionsÚ
help_tuplerrrrÑâsrÑ)r*rar‡ÚreÚemailrr_rÚdistutils.errorsÚdistutils.fancy_getoptrrÚdistutils.utilrrrr„r
Údistutils.debugr ÚcompilerÈrrrCrÑrrrrÚ<module>s4  
 
Zc