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

Note issues with Provides-Dist and Obsoletes-Dist #513

Merged
merged 3 commits into from
May 29, 2018
Merged
Changes from 1 commit
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
150 changes: 80 additions & 70 deletions source/specifications/core-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -459,76 +459,6 @@ Examples::
Requires-Dist: pywin32 >1.0; sys_platform == 'win32'


Provides-Dist (multiple use)
============================

.. versionadded:: 1.2
.. versionchanged:: 2.1
The field format specification was relaxed to accept the syntax used by
popular publishing tools.

Each entry contains a string naming a Distutils project which
is contained within this distribution. This field *must* include
the project identified in the ``Name`` field, followed by the
version : Name (Version).

A distribution may provide additional names, e.g. to indicate that
multiple projects have been bundled together. For instance, source
distributions of the ``ZODB`` project have historically included
the ``transaction`` project, which is now available as a separate
distribution. Installing such a source distribution satisfies
requirements for both ``ZODB`` and ``transaction``.

A distribution may also provide a "virtual" project name, which does
not correspond to any separately-distributed project: such a name
might be used to indicate an abstract capability which could be supplied
by one of multiple projects. E.g., multiple projects might supply
RDBMS bindings for use by a given ORM: each project might declare
that it provides ``ORM-bindings``, allowing other projects to depend
only on having at most one of them installed.

A version declaration may be supplied and must follow the rules described
in :doc:`version-specifiers`. The distribution's version number will be implied
if none is specified.

This field may be followed by an environment marker after a semicolon.

Examples::

Provides-Dist: OtherProject
Provides-Dist: AnotherProject (3.4)
Provides-Dist: virtual_package; python_version >= "3.4"


Obsoletes-Dist (multiple use)
=============================

.. versionadded:: 1.2
.. versionchanged:: 2.1
The field format specification was relaxed to accept the syntax used by
popular publishing tools.

Each entry contains a string describing a distutils project's distribution
which this distribution renders obsolete, meaning that the two projects
should not be installed at the same time.

Version declarations can be supplied. Version numbers must be in the
format specified in :doc:`version-specifiers`.

This field may be followed by an environment marker after a semicolon.

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

Examples::

Obsoletes-Dist: Gorgon
Obsoletes-Dist: OtherProject (<3.0)
Obsoletes-Dist: Foo; os_name == "posix"


Requires-Python
===============

Expand Down Expand Up @@ -632,6 +562,86 @@ respectively.
It is legal to specify ``Provides-Extra:`` without referencing it in any
``Requires-Dist:``.

Fields for Private Use Only
===========================

The current design of the fields in this section doesn't take into account
the potential for distributions on a public index server (such as
`PyPI <https://pypi.org>`__) to include disputed or deliberately misleading
information.

As a result, they should only be used in combination with curated
package repositories, and installation tools are expected to ignore
them when working with public index servers.

Provides-Dist (multiple use)
----------------------------

.. versionadded:: 1.2
.. versionchanged:: 2.1
The field format specification was relaxed to accept the syntax used by
popular publishing tools.

Each entry contains a string naming a Distutils project which
is contained within this distribution. This field *must* include
the project identified in the ``Name`` field, followed by the
version : Name (Version).

A distribution may provide additional names, e.g. to indicate that
multiple projects have been bundled together. For instance, source
distributions of the ``ZODB`` project have historically included
the ``transaction`` project, which is now available as a separate
distribution. Installing such a source distribution satisfies
requirements for both ``ZODB`` and ``transaction``.

A distribution may also provide a "virtual" project name, which does
not correspond to any separately-distributed project: such a name
might be used to indicate an abstract capability which could be supplied
by one of multiple projects. E.g., multiple projects might supply
RDBMS bindings for use by a given ORM: each project might declare
that it provides ``ORM-bindings``, allowing other projects to depend
only on having at most one of them installed.

A version declaration may be supplied and must follow the rules described
in :doc:`version-specifiers`. The distribution's version number will be implied
if none is specified.

This field may be followed by an environment marker after a semicolon.

Examples::

Provides-Dist: OtherProject
Provides-Dist: AnotherProject (3.4)
Provides-Dist: virtual_package; python_version >= "3.4"


Obsoletes-Dist (multiple use)
-----------------------------

.. versionadded:: 1.2
.. versionchanged:: 2.1
The field format specification was relaxed to accept the syntax used by
popular publishing tools.

Each entry contains a string describing a distutils project's distribution
which this distribution renders obsolete, meaning that the two projects
should not be installed at the same time.

Version declarations can be supplied. Version numbers must be in the
format specified in :doc:`version-specifiers`.

This field may be followed by an environment marker after a semicolon.

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

Examples::

Obsoletes-Dist: Gorgon
Obsoletes-Dist: OtherProject (<3.0)
Obsoletes-Dist: Foo; os_name == "posix"

----

Expand Down