Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added obsolete fields: requires, provides and obsoletes #1138

Merged
merged 19 commits into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions source/specifications/core-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,92 @@ Examples::
Obsoletes-Dist: OtherProject (<3.0)
Obsoletes-Dist: Foo; os_name == "posix"


Deprecated Fields
=================

Requires
--------

.. versionadded:: 1.1
.. deprecated:: 1.2
in favour of ``Requires-Dist``
venthur marked this conversation as resolved.
Show resolved Hide resolved

Each entry contains a string describing some other module or package required
by this package.

The format of a requirement string is identical to that of a module or package
name usable with the ``import`` statement, optionally followed by a version
declaration within parentheses.

A version declaration is a series of conditional operators and version numbers,
separated by commas. Conditional operators must be one of "<", ">"', "<=",
">=", "==", and "!=". Version numbers must be in the format accepted by the
``distutils.version.StrictVersion`` class: two or three dot-separated numeric
components, with an optional "pre-release" tag on the end consisting of the
letter 'a' or 'b' followed by a number. Example version numbers are "1.0",
"2.3a2", "1.3.99",

Any number of conditional operators can be specified, e.g. the string ">1.0,
!=1.3.4, <2.0" is a legal version declaration.

All of the following are possible requirement strings: "rfc822", "zlib
(>=1.1.4)", "zope".

There’s no canonical list of what strings should be used; the Python community
is left to choose its own standards.

Examples::

Requires: re
Requires: sys
Requires: zlib
Requires: xml.parsers.expat (>1.0)
Requires: psycopg


Provides
--------

.. versionadded:: 1.1
.. deprecated:: 1.2
in favour of ``Provides-Dist``

Each entry contains a string describing a package or module that will be
provided by this package once it is installed. These strings should match the
ones used in Requirements fields. A version declaration may be supplied
(without a comparison operator); the package’s version number will be implied
if none is specified.

Examples::

Provides: xml
Provides: xml.utils
Provides: xml.utils.iso8601
Provides: xml.dom
Provides: xmltools (1.3)


Obsoletes
---------

.. versionadded:: 1.1
.. deprecated:: 1.2
in favour of ``Obsoletes-Dist``

Each entry contains a string describing a package or module that this package
renders obsolete, meaning that the two packages should not be installed at the
same time. Version declarations can be supplied.

The most common use of this field will be in case a package name changes, e.g.
Gorgon 2.3 gets subsumed into Torqued Python 1.0. When you install Torqued
Python, the Gorgon package should be removed.

Example::

Obsoletes: Gorgon


----

.. [1] reStructuredText markup:
Expand Down