Link to Dependency specifiers instead of PEP 508 (#8411)

The canonical source is
https://packaging.python.org/en/latest/specifications/dependency-specifiers/,
not PEP 508 anymore, so we should link there and use the new name.
This commit is contained in:
konsti 2024-10-21 20:43:38 +02:00 committed by GitHub
parent 40f842df09
commit 0dd4d017e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 14 deletions

View file

@ -33,7 +33,9 @@ Utilities for interacting with Python version numbers and specifiers.
## [uv-pep508-rs](./uv-pep508)
Utilities for interacting with [PEP 508](https://peps.python.org/pep-0508/) dependency specifiers.
Utilities for parsing and evaluating
[dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/),
previously known as [PEP 508](https://peps.python.org/pep-0508/).
## [uv-platform-tags](./uv-platform-tags)

View file

@ -3,9 +3,9 @@
[![Crates.io](https://img.shields.io/crates/v/pep508_rs.svg?logo=rust&style=flat-square)](https://crates.io/crates/pep508_rs)
[![PyPI](https://img.shields.io/pypi/v/pep508_rs.svg?logo=python&style=flat-square)](https://pypi.org/project/pep508_rs)
A library for python
A library for
[dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/),
better known as [PEP 508](https://peps.python.org/pep-0508/).
previously known as [PEP 508](https://peps.python.org/pep-0508/).
## Usage

View file

@ -1,5 +1,5 @@
//! A library for python [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
//! better known as [PEP 508](https://peps.python.org/pep-0508/)
//! A library for [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
//! previously known as [PEP 508](https://peps.python.org/pep-0508/)
//!
//! ## Usage
//!

View file

@ -28,9 +28,10 @@ bird-feeder = { path = "./packages/bird-feeder" }
## Project dependencies
The `project.dependencies` table represents the dependencies that are used when uploading to PyPI or
building a wheel. Individual dependencies are specified using [PEP 508](#pep-508) syntax, and the
table follows the [PEP 621](https://packaging.python.org/en/latest/specifications/pyproject-toml/)
standard.
building a wheel. Individual dependencies are specified using
[dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
syntax, and the table follows the
[PEP 621](https://packaging.python.org/en/latest/specifications/pyproject-toml/) standard.
`project.dependencies` defines the list of packages that are required for the project, along with
the version constraints that should be used when installing them. Each entry includes a dependency
@ -248,8 +249,8 @@ members = [
### Platform-specific sources
You can limit a source to a given platform or Python version by providing
[PEP 508](https://peps.python.org/pep-0508/#environment-markers)-compatible environment markers for
the source.
[dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)-compatible
environment markers for the source.
For example, to pull `httpx` from GitHub, but only on macOS, use the following:
@ -320,7 +321,8 @@ installation of Excel parsers and `matplotlib` unless someone explicitly require
requested with the `package[<extra>]` syntax, e.g., `pandas[plot, excel]`.
Optional dependencies are specified in `[project.optional-dependencies]`, a TOML table that maps
from extra name to its dependencies, following [PEP 508](#pep-508) syntax.
from extra name to its dependencies, following
[dependency specifiers](#dependency-specifiers-pep-508) syntax.
Optional dependencies can have entries in `tool.uv.sources` the same as normal dependencies.
@ -437,10 +439,12 @@ Or, to opt-out of using an editable dependency in a workspace:
$ uv add --no-editable ./path/foo
```
## PEP 508
## Dependency specifiers (PEP 508)
[PEP 508](https://peps.python.org/pep-0508/) defines a syntax for dependency specification. It is
composed of, in order:
uv uses
[dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/),
previously known as [PEP 508](https://peps.python.org/pep-0508/). A dependency specifier is composed
of, in order:
- The dependency name
- The extras you want (optional)