mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Document the RequiresPython
fields (#4798)
This commit is contained in:
parent
576ba9c522
commit
d178d97a40
1 changed files with 7 additions and 0 deletions
|
@ -25,7 +25,14 @@ pub enum RequiresPythonError {
|
||||||
/// See: <https://packaging.python.org/en/latest/guides/dropping-older-python-versions/>
|
/// See: <https://packaging.python.org/en/latest/guides/dropping-older-python-versions/>
|
||||||
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
||||||
pub struct RequiresPython {
|
pub struct RequiresPython {
|
||||||
|
/// The supported Python versions as provides by the user, usually through the `requires-python`
|
||||||
|
/// field in `pyproject.toml`.
|
||||||
|
///
|
||||||
|
/// For a workspace, it's the union of all `requires-python` fields in the workspace. If no
|
||||||
|
/// bound was provided by the user, it's greater equal the current Python version.
|
||||||
specifiers: VersionSpecifiers,
|
specifiers: VersionSpecifiers,
|
||||||
|
/// The lower bound from the `specifiers` field, i.e. greater or greater equal the lowest
|
||||||
|
/// version allowed by `specifiers`.
|
||||||
bound: RequiresPythonBound,
|
bound: RequiresPythonBound,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue