4f87edbe66
## Introduction
PEP 621 is limited. Specifically, it lacks
* Relative path support
* Editable support
* Workspace support
* Index pinning or any sort of index specification
The semantics of urls are a custom extension, PEP 440 does not specify
how to use git references or subdirectories, instead pip has a custom
stringly format. We need to somehow support these while still stying
compatible with PEP 621.
## `tool.uv.source`
Drawing inspiration from cargo, poetry and rye, we add `tool.uv.sources`
or (for now stub only) `tool.uv.workspace`:
```toml
[project]
name = "albatross"
version = "0.1.0"
dependencies = [
"tqdm >=4.66.2,<5",
"torch ==2.2.2",
"transformers[torch] >=4.39.3,<5",
"importlib_metadata >=7.1.0,<8; python_version < '3.10'",
"mollymawk ==0.1.0"
]
[tool.uv.sources]
tqdm = { git = "https://github.com/tqdm/tqdm", rev = "cc372d09dcd5a5eabdc6ed4cf365bdb0be004d44" }
importlib_metadata = { url = "https://github.com/python/importlib_metadata/archive/refs/tags/v7.1.0.zip" }
torch = { index = "torch-cu118" }
mollymawk = { workspace = true }
[tool.uv.workspace]
include = [
"packages/mollymawk"
]
[tool.uv.indexes]
torch-cu118 = "https://download.pytorch.org/whl/cu118"
```
See `docs/specifying_dependencies.md` for a detailed explanation of the
format. The basic gist is that `project.dependencies` is what ends up on
pypi, while `tool.uv.sources` are your non-published additions. We do
support the full range or PEP 508, we just hide it in the docs and
prefer the exploded table for easier readability and less confusing with
actual url parts.
This format should eventually be able to subsume requirements.txt's
current use cases. While we will continue to support the legacy `uv pip`
interface, this is a piece of the uv's own top level interface. Together
with `uv run` and a lockfile format, you should only need to write
`pyproject.toml` and do `uv run`, which generates/uses/updates your
lockfile behind the scenes, no more pip-style requirements involved. It
also lays the groundwork for implementing index pinning.
## Changes
This PR implements:
* Reading and lowering `project.dependencies`,
`project.optional-dependencies` and `tool.uv.sources` into a new
requirements format, including:
* Git dependencies
* Url dependencies
* Path dependencies, including relative and editable
* `pip install` integration
* Error reporting for invalid `tool.uv.sources`
* Json schema integration (works in pycharm, see below)
* Draft user-level docs (see `docs/specifying_dependencies.md`)
It does not implement:
* No `pip compile` testing, deprioritizing towards our own lockfile
* Index pinning (stub definitions only)
* Development dependencies
* Workspace support (stub definitions only)
* Overrides in pyproject.toml
* Patching/replacing dependencies
One technically breaking change is that we now require user provided
pyproject.toml to be valid wrt to PEP 621. Included files still fall
back to PEP 517. That means `pip install -r requirements.txt` requires
it to be valid while `pip install -r requirements.txt` with `-e .` as
content falls back to PEP 517 as before.
## Implementation
The `pep508` requirement is replaced by a new `UvRequirement` (name up
for bikeshedding, not particularly attached to the uv prefix). The still
existing `pep508_rs::Requirement` type is a url format copied from pip's
requirements.txt and doesn't appropriately capture all features we
want/need to support. The bulk of the diff is changing the requirement
type throughout the codebase.
We still use `VerbatimUrl` in many places, where we would expect a
parsed/decomposed url type, specifically:
* Reading core metadata except top level pyproject.toml files, we fail a
step later instead if the url isn't supported.
* Allowed `Urls`.
* `PackageId` with a custom `CanonicalUrl` comparison, instead of
canonicalizing urls eagerly.
* `PubGrubPackage`: We eventually convert the `VerbatimUrl` back to a
`Dist` (`Dist::from_url`), instead of remembering the url.
* Source dist types: We use verbatim url even though we know and require
that these are supported urls we can and have parsed.
I tried to make improve the situation be replacing `VerbatimUrl`, but
these changes would require massive invasive changes (see e.g.
https://github.com/astral-sh/uv/pull/3253). A main problem is the ref
`VersionOrUrl` and applying overrides, which assume the same
requirement/url type everywhere. In its current form, this PR increases
this tech debt.
I've tried to split off PRs and commits, but the main refactoring is
still a single monolith commit to make it compile and the tests pass.
## Demo
Adding
https://gist.githubusercontent.com/konstin/68f3e5ea5e8f1a30a0c9096ae72925c1/raw/d1ae3b85d5a0f3c4bb562c7dfd38c3dafc04ec08/pyproject.json
as json schema (v7) to pycharm for `pyproject.toml`, you can try the IDE
support already:

[dove.webm](https://github.com/astral-sh/uv/assets/6826232/c293c272-c80b-459d-8c95-8c46a8d198a1)
898 lines
23 KiB
JSON
Generated
898 lines
23 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "ToolUv",
|
|
"description": "Metadata and configuration for uv.",
|
|
"type": "object",
|
|
"properties": {
|
|
"cache-dir": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"native-tls": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"no-cache": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"pip": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/PipOptions"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"preview": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"sources": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/Source"
|
|
}
|
|
},
|
|
"workspace": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ToolUvWorkspace"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"AnnotationStyle": {
|
|
"description": "Indicate the style of annotation comments, used to indicate the dependencies that requested each package.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Render the annotations on a single, comma-separated line.",
|
|
"type": "string",
|
|
"enum": [
|
|
"line"
|
|
]
|
|
},
|
|
{
|
|
"description": "Render each annotation on its own line.",
|
|
"type": "string",
|
|
"enum": [
|
|
"split"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ConfigSettingValue": {
|
|
"oneOf": [
|
|
{
|
|
"description": "The value consists of a single string.",
|
|
"type": "object",
|
|
"required": [
|
|
"String"
|
|
],
|
|
"properties": {
|
|
"String": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "The value consists of a list of strings.",
|
|
"type": "object",
|
|
"required": [
|
|
"List"
|
|
],
|
|
"properties": {
|
|
"List": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"ConfigSettings": {
|
|
"description": "Settings to pass to a PEP 517 build backend, structured as a map from (string) key to string or list of strings.\n\nSee: <https://peps.python.org/pep-0517/#config-settings>",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/ConfigSettingValue"
|
|
}
|
|
},
|
|
"ExcludeNewer": {
|
|
"type": "string",
|
|
"pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(Z|[+-]\\d{2}:\\d{2}))?$"
|
|
},
|
|
"ExtraName": {
|
|
"description": "The normalized name of an extra dependency group.\n\nConverts the name to lowercase and collapses any run of the characters `-`, `_` and `.` down to a single `-`, e.g., `---`, `.`, and `__` all get converted to just `-`.\n\nSee: - <https://peps.python.org/pep-0685/#specification/> - <https://packaging.python.org/en/latest/specifications/name-normalization/>",
|
|
"type": "string"
|
|
},
|
|
"FlatIndexLocation": {
|
|
"type": "string"
|
|
},
|
|
"IndexStrategy": {
|
|
"oneOf": [
|
|
{
|
|
"description": "Only use results from the first index that returns a match for a given package name.\n\nWhile this differs from pip's behavior, it's the default index strategy as it's the most secure.",
|
|
"type": "string",
|
|
"enum": [
|
|
"first-index"
|
|
]
|
|
},
|
|
{
|
|
"description": "Search for every package name across all indexes, exhausting the versions from the first index before moving on to the next.\n\nIn this strategy, we look for every package across all indexes. When resolving, we attempt to use versions from the indexes in order, such that we exhaust all available versions from the first index before moving on to the next. Further, if a version is found to be incompatible in the first index, we do not reconsider that version in subsequent indexes, even if the secondary index might contain compatible versions (e.g., variants of the same versions with different ABI tags or Python version constraints).\n\nSee: <https://peps.python.org/pep-0708/>",
|
|
"type": "string",
|
|
"enum": [
|
|
"unsafe-first-match"
|
|
]
|
|
},
|
|
{
|
|
"description": "Search for every package name across all indexes, preferring the \"best\" version found. If a package version is in multiple indexes, only look at the entry for the first index.\n\nIn this strategy, we look for every package across all indexes. When resolving, we consider all versions from all indexes, choosing the \"best\" version found (typically, the highest compatible version).\n\nThis most closely matches pip's behavior, but exposes the resolver to \"dependency confusion\" attacks whereby malicious actors can publish packages to public indexes with the same name as internal packages, causing the resolver to install the malicious package in lieu of the intended internal package.\n\nSee: <https://peps.python.org/pep-0708/>",
|
|
"type": "string",
|
|
"enum": [
|
|
"unsafe-best-match"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"IndexUrl": {
|
|
"type": "string"
|
|
},
|
|
"KeyringProviderType": {
|
|
"description": "Keyring provider type to use for credential lookup.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Do not use keyring for credential lookup.",
|
|
"type": "string",
|
|
"enum": [
|
|
"disabled"
|
|
]
|
|
},
|
|
{
|
|
"description": "Use the `keyring` command for credential lookup.",
|
|
"type": "string",
|
|
"enum": [
|
|
"subprocess"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"LinkMode": {
|
|
"oneOf": [
|
|
{
|
|
"description": "Clone (i.e., copy-on-write) packages from the wheel into the site packages.",
|
|
"type": "string",
|
|
"enum": [
|
|
"clone"
|
|
]
|
|
},
|
|
{
|
|
"description": "Copy packages from the wheel into the site packages.",
|
|
"type": "string",
|
|
"enum": [
|
|
"copy"
|
|
]
|
|
},
|
|
{
|
|
"description": "Hard link packages from the wheel into the site packages.",
|
|
"type": "string",
|
|
"enum": [
|
|
"hardlink"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"PackageName": {
|
|
"description": "The normalized name of a package.\n\nConverts the name to lowercase and collapses any run of the characters `-`, `_` and `.` down to a single `-`, e.g., `---`, `.`, and `__` all get converted to just `-`.\n\nSee: <https://packaging.python.org/en/latest/specifications/name-normalization/>",
|
|
"type": "string"
|
|
},
|
|
"PackageNameSpecifier": {
|
|
"type": "string",
|
|
"pattern": "^(:none:|:all:|([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]))$"
|
|
},
|
|
"PipOptions": {
|
|
"description": "A `[tool.uv.pip]` section.",
|
|
"type": "object",
|
|
"properties": {
|
|
"all-extras": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"annotation-style": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/AnnotationStyle"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"break-system-packages": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"compile-bytecode": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"config-settings": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ConfigSettings"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"custom-compile-command": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"emit-find-links": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"emit-index-annotation": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"emit-index-url": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"emit-marker-expression": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"exclude-newer": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ExcludeNewer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"extra": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/ExtraName"
|
|
}
|
|
},
|
|
"extra-index-url": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/IndexUrl"
|
|
}
|
|
},
|
|
"find-links": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/FlatIndexLocation"
|
|
}
|
|
},
|
|
"generate-hashes": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"index-strategy": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/IndexStrategy"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"index-url": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/IndexUrl"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"keyring-provider": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/KeyringProviderType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"legacy-setup-py": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"link-mode": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/LinkMode"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"no-annotate": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"no-binary": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/PackageNameSpecifier"
|
|
}
|
|
},
|
|
"no-build": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"no-build-isolation": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"no-deps": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"no-emit-package": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/PackageName"
|
|
}
|
|
},
|
|
"no-header": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"no-index": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"no-strip-extras": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"offline": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"only-binary": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/PackageNameSpecifier"
|
|
}
|
|
},
|
|
"output-file": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"prerelease": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/PreReleaseMode"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"python": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"python-platform": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/TargetTriple"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"python-version": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/PythonVersion"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"require-hashes": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"resolution": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ResolutionMode"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"strict": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"system": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"target": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"PreReleaseMode": {
|
|
"oneOf": [
|
|
{
|
|
"description": "Disallow all pre-release versions.",
|
|
"type": "string",
|
|
"enum": [
|
|
"disallow"
|
|
]
|
|
},
|
|
{
|
|
"description": "Allow all pre-release versions.",
|
|
"type": "string",
|
|
"enum": [
|
|
"allow"
|
|
]
|
|
},
|
|
{
|
|
"description": "Allow pre-release versions if all versions of a package are pre-release.",
|
|
"type": "string",
|
|
"enum": [
|
|
"if-necessary"
|
|
]
|
|
},
|
|
{
|
|
"description": "Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirements.",
|
|
"type": "string",
|
|
"enum": [
|
|
"explicit"
|
|
]
|
|
},
|
|
{
|
|
"description": "Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements.",
|
|
"type": "string",
|
|
"enum": [
|
|
"if-necessary-or-explicit"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"PythonVersion": {
|
|
"type": "string"
|
|
},
|
|
"ResolutionMode": {
|
|
"oneOf": [
|
|
{
|
|
"description": "Resolve the highest compatible version of each package.",
|
|
"type": "string",
|
|
"enum": [
|
|
"highest"
|
|
]
|
|
},
|
|
{
|
|
"description": "Resolve the lowest compatible version of each package.",
|
|
"type": "string",
|
|
"enum": [
|
|
"lowest"
|
|
]
|
|
},
|
|
{
|
|
"description": "Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies.",
|
|
"type": "string",
|
|
"enum": [
|
|
"lowest-direct"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"Source": {
|
|
"description": "A `tool.uv.sources` value.",
|
|
"anyOf": [
|
|
{
|
|
"description": "A remote git repository, either over HTTPS or over SSH.\n\nExample: ```toml flask = { git = \"https://github.com/pallets/flask\", tag = \"3.0.0\" } ```",
|
|
"type": "object",
|
|
"required": [
|
|
"git"
|
|
],
|
|
"properties": {
|
|
"branch": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"git": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"rev": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"subdirectory": {
|
|
"description": "The path to the directory with the `pyproject.toml` if it is not in the archive root.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"tag": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "A remote `http://` or `https://` URL, either a wheel (`.whl`) or a source distribution (`.zip`, `.tar.gz`).\n\nExample: ```toml flask = { url = \"https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl\" } ```",
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"subdirectory": {
|
|
"description": "For source distributions, the path to the directory with the `pyproject.toml` if it is not in the archive root.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "The path to a dependency. It can either be a wheel (a `.whl` file), a source distribution as archive (a `.zip` or `.tag.gz` file) or a source distribution as directory (a directory with a pyproject.toml in, or a legacy directory with only a setup.py but non pyproject.toml in it).",
|
|
"type": "object",
|
|
"required": [
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"editable": {
|
|
"description": "`false` by default.",
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "When using a version as requirement, you can optionally pin the requirement to an index you defined, e.g. `torch` after configuring `torch` to `https://download.pytorch.org/whl/cu118`.",
|
|
"type": "object",
|
|
"required": [
|
|
"index"
|
|
],
|
|
"properties": {
|
|
"index": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "A dependency on another package in the workspace.",
|
|
"type": "object",
|
|
"required": [
|
|
"workspace"
|
|
],
|
|
"properties": {
|
|
"editable": {
|
|
"description": "`true` by default.",
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"workspace": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Show a better error message for invalid combinations of options.",
|
|
"type": "object",
|
|
"required": [
|
|
"git",
|
|
"index",
|
|
"patch",
|
|
"url",
|
|
"workspace"
|
|
],
|
|
"properties": {
|
|
"branch": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"git": {
|
|
"type": "string"
|
|
},
|
|
"index": {
|
|
"type": "string"
|
|
},
|
|
"patch": {
|
|
"type": "string"
|
|
},
|
|
"rev": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"subdirectory": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"tag": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"workspace": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"String": {
|
|
"type": "string"
|
|
},
|
|
"TargetTriple": {
|
|
"description": "The supported target triples. Each triple consists of an architecture, vendor, and operating system.\n\nSee: <https://doc.rust-lang.org/nightly/rustc/platform-support.html>",
|
|
"oneOf": [
|
|
{
|
|
"description": "An alias for `x86_64-pc-windows-msvc`, the default target for Windows.",
|
|
"type": "string",
|
|
"enum": [
|
|
"windows"
|
|
]
|
|
},
|
|
{
|
|
"description": "An alias for `x86_64-unknown-linux-gnu`, the default target for Linux.",
|
|
"type": "string",
|
|
"enum": [
|
|
"linux"
|
|
]
|
|
},
|
|
{
|
|
"description": "An alias for `aarch64-apple-darwin`, the default target for macOS.",
|
|
"type": "string",
|
|
"enum": [
|
|
"macos"
|
|
]
|
|
},
|
|
{
|
|
"description": "An x86 Windows target.",
|
|
"type": "string",
|
|
"enum": [
|
|
"x8664-pc-windows-msvc"
|
|
]
|
|
},
|
|
{
|
|
"description": "An x86 Linux target. Equivalent to `x86_64-manylinux_2_17`.",
|
|
"type": "string",
|
|
"enum": [
|
|
"x8664-unknown-linux-gnu"
|
|
]
|
|
},
|
|
{
|
|
"description": "An ARM-based macOS target, as seen on Apple Silicon devices.",
|
|
"type": "string",
|
|
"enum": [
|
|
"aarch64-apple-darwin"
|
|
]
|
|
},
|
|
{
|
|
"description": "An x86 macOS target.",
|
|
"type": "string",
|
|
"enum": [
|
|
"x8664-apple-darwin"
|
|
]
|
|
},
|
|
{
|
|
"description": "An ARM64 Linux target. Equivalent to `aarch64-manylinux_2_17`.",
|
|
"type": "string",
|
|
"enum": [
|
|
"aarch64-unknown-linux-gnu"
|
|
]
|
|
},
|
|
{
|
|
"description": "An ARM64 Linux target.",
|
|
"type": "string",
|
|
"enum": [
|
|
"aarch64-unknown-linux-musl"
|
|
]
|
|
},
|
|
{
|
|
"description": "An `x86_64` Linux target.",
|
|
"type": "string",
|
|
"enum": [
|
|
"x8664-unknown-linux-musl"
|
|
]
|
|
},
|
|
{
|
|
"description": "An `x86_64` target for the `manylinux_2_17` platform.",
|
|
"type": "string",
|
|
"enum": [
|
|
"x8664-manylinux217"
|
|
]
|
|
},
|
|
{
|
|
"description": "An `x86_64` target for the `manylinux_2_28` platform.",
|
|
"type": "string",
|
|
"enum": [
|
|
"x8664-manylinux228"
|
|
]
|
|
},
|
|
{
|
|
"description": "An ARM64 target for the `manylinux_2_17` platform.",
|
|
"type": "string",
|
|
"enum": [
|
|
"aarch64-manylinux217"
|
|
]
|
|
},
|
|
{
|
|
"description": "An ARM64 target for the `manylinux_2_28` platform.",
|
|
"type": "string",
|
|
"enum": [
|
|
"aarch64-manylinux228"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ToolUvWorkspace": {
|
|
"description": "`tool.uv.workspace`.",
|
|
"type": "object",
|
|
"properties": {
|
|
"exclude": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/String"
|
|
}
|
|
},
|
|
"members": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"$ref": "#/definitions/String"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
} |