@@ -9,8 +9,13 @@ It defines the following specification as the canonical source for the core
99metadata file format.
1010
1111Fields defined in the following specification should be considered valid,
12- complete and not subject to change. Fields should be considered "optional" for
13- versions which predate their introduction.
12+ complete and not subject to change. The required fields are:
13+
14+ - ``Metadata-Version ``
15+ - ``Name ``
16+ - ``Version ``
17+
18+ All the other fields are optional.
1419
1520.. note :: *Interpreting old metadata:* In :pep:`566`, the version specifier
1621 field format specification was relaxed to accept the syntax used by popular
@@ -22,7 +27,6 @@ versions which predate their introduction.
2227.. contents :: Contents
2328 :local:
2429
25-
2630Metadata-Version
2731================
2832
@@ -120,9 +124,16 @@ Example::
120124
121125 Summary: A module for collecting votes from beagles.
122126
127+ .. Some of these headings used to have a suffix "(optional)". This became part
128+ of links (...#description-optional). We have changed the headings (required
129+ fields are now listed at the start of the specification), but added explicit
130+ link targets like this one, so that links to the individual sections are not
131+ broken.
123132
124- Description (optional)
125- ======================
133+ .. _description-optional :
134+
135+ Description
136+ ===========
126137
127138.. versionadded :: 1.0
128139.. versionchanged :: 2.1
@@ -164,9 +175,10 @@ Alternatively, the distribution's description may instead be provided in the
164175message body (i.e., after a completely blank line following the headers, with
165176no indentation or other special formatting necessary).
166177
178+ .. _description-content-type-optional :
167179
168- Description-Content-Type (optional)
169- ===================================
180+ Description-Content-Type
181+ ========================
170182
171183.. versionadded :: 2.1
172184
@@ -249,9 +261,10 @@ So for the last example above, the ``charset`` defaults to ``UTF-8`` and the
249261``variant `` defaults to ``GFM `` and thus it is equivalent to the example
250262before it.
251263
264+ .. _keywords-optional :
252265
253- Keywords (optional)
254- ===================
266+ Keywords
267+ ========
255268
256269.. versionadded :: 1.0
257270
@@ -262,9 +275,10 @@ Example::
262275
263276 Keywords: dog puppy voting election
264277
278+ .. _home-page-optional :
265279
266- Home-page (optional)
267- ====================
280+ Home-page
281+ =========
268282
269283.. versionadded :: 1.0
270284
@@ -284,9 +298,10 @@ A string containing the URL from which this version of the distribution
284298can be downloaded. (This means that the URL can't be something like
285299".../BeagleVote-latest.tgz", but instead must be ".../BeagleVote-0.45.tgz".)
286300
301+ .. _author-optional :
287302
288- Author (optional)
289- =================
303+ Author
304+ ======
290305
291306.. versionadded :: 1.0
292307
@@ -298,9 +313,10 @@ Example::
298313 Author: C. Schultz, Universal Features Syndicate,
299314 Los Angeles, CA <cschultz@peanuts.example.com>
300315
316+ .. _author-email-optional :
301317
302- Author-email (optional)
303- =======================
318+ Author-email
319+ ============
304320
305321.. versionadded :: 1.0
306322
@@ -317,9 +333,10 @@ addresses::
317333
318334 Author-email: cschultz@example.com, snoopy@peanuts.com
319335
336+ .. _maintainer-optional :
320337
321- Maintainer (optional)
322- =====================
338+ Maintainer
339+ ==========
323340
324341.. versionadded :: 1.2
325342
@@ -335,9 +352,10 @@ Example::
335352 Maintainer: C. Schultz, Universal Features Syndicate,
336353 Los Angeles, CA <cschultz@peanuts.example.com>
337354
355+ .. _maintainer-email-optional :
338356
339- Maintainer-email (optional)
340- ===========================
357+ Maintainer-email
358+ ================
341359
342360.. versionadded :: 1.2
343361
@@ -358,9 +376,10 @@ addresses::
358376
359377 Maintainer-email: cschultz@example.com, snoopy@peanuts.com
360378
379+ .. _license-optional :
361380
362- License (optional)
363- ==================
381+ License
382+ =======
364383
365384.. versionadded :: 1.0
366385
@@ -580,8 +599,10 @@ The label is a free text limited to 32 signs.
580599
581600.. _metadata_provides_extra :
582601
583- Provides-Extra (optional, multiple use)
584- =======================================
602+ .. _provides-extra-optional-multiple-use :
603+
604+ Provides-Extra (multiple use)
605+ =============================
585606
586607.. versionadded :: 2.1
587608
0 commit comments