Version 1.2 of the metadata format adds a number of optional fields
designed to make third-party packaging of Python Software easier.
These fields are "Requires-Python", "Requires-External", "Requires-Dist",
-"Provides-Dist", and "Obsoletes-Dist". This version also changes the
+"Provides-Dist", and "Obsoletes-Dist". This version also changes the
"Platform" field. Three new fields were also added: "Maintainer",
"Maintainer-email" and "Project-URL".
The label is a free text limited to 32 signs.
+Provides-Extra (multiple use)
+A string containing the name of an optional feature. Must be a valid Python
+identifier. May be used to make a dependency conditional on whether the
+optional feature has been requested.
+ Requires-Dist: reportlab; extra == 'pdf'
+A second distribution requires an optional dependency by placing it
+inside square brackets, and can request multiple features by separating
+them with a comma (,). The requirements are evaluated for each requested
+feature and added to the set of requirements for the distribution.
+ Requires-Dist: beaglevote[pdf]
+ Requires-Dist: libexample[test, doc]
+Two feature names `test` and `doc` are reserved to mark dependencies that
+are needed for running automated tests and generating documentation,
+It is legal to specify `Provides-Extra:` without referencing it in any
- ``Requires-Dist: zope.interface (3.1)``: any version that starts with 3.1,
excluding post or pre-releases.
+- ``Requires-Dist: zope.interface (==3.1)``: equivalent to ``Requires-Dist:
+ zope.interface (3.1)``.
- ``Requires-Dist: zope.interface (3.1.0)``: any version that starts with
3.1.0, excluding post or pre-releases. Since that particular project doesn't
use more than 3 digits, it also means "only the 3.1.0 release".
- platform.machine = platform.machine()
- platform.python_implementation = platform.python_implementation()
- a free string, like ``'2.4'``, or ``'win32'``
+- extra = (name of requested feature)
Notice that ``in`` is restricted to strings, meaning that it is not possible
to use other sequences like tuples or lists on the right side.