Skip to content

Commit e34c496

Browse files
committed
Document that Requires-Dist can use explicit URLs
The core-metadata documentation currently implies that `Requires-Dist` can only use name-based specifiers, but then references PEP 508 which allows for URL based specifiers. Update the documentation to reflect this alternative specifier format.
1 parent b42cd5a commit e34c496

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

source/specifications/core-metadata.rst

+11-9
Original file line numberDiff line numberDiff line change
@@ -539,19 +539,21 @@ Requires-Dist (multiple use)
539539
The field format specification was relaxed to accept the syntax used by
540540
popular publishing tools.
541541

542-
Each entry contains a string naming some other distutils
543-
project required by this distribution.
542+
Each entry contains a string naming some other distribution required by this
543+
distribution.
544544

545-
The format of a requirement string contains from one to four parts:
545+
A requirement string has one mandatory and three optional parts.
546546

547547
* A project name, in the same format as the ``Name:`` field.
548548
The only mandatory part.
549-
* A comma-separated list of 'extra' names. These are defined by
550-
the required project, referring to specific features which may
551-
need extra dependencies. The names MUST conform to the restrictions
552-
specified by the ``Provides-Extra:`` field.
553-
* A version specifier. Tools parsing the format should accept optional
554-
parentheses around this, but tools generating it should not use
549+
* A comma-separated list of 'extra' names in square brackets, like
550+
``[extra1,extra2]``. These names are defined by the required
551+
project, referring to specific features which may need extra
552+
dependencies. The names MUST conform to the restrictions specified
553+
by the ``Provides-Extra:`` field.
554+
* Either a version specifier or an ``@`` sign followed by a URL.
555+
Tools parsing the format should accept optional parentheses around
556+
a version specifier, but tools generating it should not use
555557
parentheses.
556558
* An environment marker after a semicolon. This means that the
557559
requirement is only needed in the specified conditions.

0 commit comments

Comments
 (0)