[go: up one dir, main page]

Crate uv_distribution_types

Crate uv_distribution_types 

Source
Expand description

§Type hierarchy

When we receive the requirements from pip sync, we check which requirements already fulfilled in the users environment (InstalledDist), whether the matching package is in our wheel cache (CachedDist) or whether we need to download, (potentially build) and install it (Dist). These three variants make up BuiltDist.

§Dist

A Dist is either a built distribution (a wheel), or a source distribution that exists at some location. We translate every PEP 508 requirement e.g. from requirements.txt or from pyproject.toml’s [project] dependencies into a Dist by checking each index.

§CachedDist

A CachedDist is a built distribution (wheel) that exists in the local cache, with the two possible origins we currently track:

§InstalledDist

An InstalledDist is built distribution (wheel) that is installed in a virtual environment, with the two possible origins we currently track:

Since we read this information from direct_url.json, it doesn’t match the information Dist exactly.

Structs§

ArchivedFile
An archived File
ArchivedUrlString
An archived UrlString
ArchivedZstd
An archived Zstd
BuildInfo
A digest representing the build settings, such as build dependencies or other build-time configuration.
CachedDirectUrlDist
CachedRegistryDist
ConfigSettingEntry
ConfigSettingPackageEntry
ConfigSettings
Settings to pass to a PEP 517 build backend, structured as a map from (string) key to string or list of strings.
DependencyMetadata
Pre-defined StaticMetadata entries, indexed by PackageName and Version.
DerivationChain
A chain of derivation steps from the root package to the current package, to explain why a package is included in the resolution.
DerivationStep
A step in a derivation chain.
DirectSourceUrl
DirectUrlBuiltDist
A built distribution (wheel) that exists at an arbitrary URL.
DirectUrlSourceDist
A source distribution that exists at an arbitrary URL.
DirectorySourceDist
A source distribution that exists in a local directory.
DirectorySourceUrl
ExtraBuildRequirement
ExtraBuildRequires
Lowered extra build dependencies with source resolution applied.
ExtraBuildVariables
Extra environment variables to set during builds, on a per-package basis.
File
Internal analog to uv_pypi_types::PypiFile.
FileResolver
The resolver for an archived File
GitSourceDist
A source distribution that exists in a Git repository.
GitSourceUrl
Index
IndexCacheControl
Cache control configuration for an index.
IndexCapabilities
A map of IndexUrls to their capabilities.
IndexLocations
The index locations to use for fetching packages. By default, uses the PyPI index.
IndexMetadata
An IndexUrl along with the metadata necessary to query the index.
IndexMetadataRef
A reference to an IndexMetadata.
IndexName
The normalized name of an index.
IndexUrls
The index URLs to use for fetching packages.
InstalledDirectUrlDist
InstalledDist
InstalledEggInfoDirectory
InstalledEggInfoFile
InstalledLegacyEditable
InstalledRegistryDist
NameRequirementSpecification
An UnresolvedRequirement with additional metadata from requirements.txt, currently only hashes but in the future also editable and similar information.
PackageConfigSettings
Settings to pass to PEP 517 build backends on a per-package basis.
PathBuiltDist
A built distribution (wheel) that exists in a local directory.
PathSourceDist
A source distribution that exists in a local archive (e.g., a .tar.gz file).
PathSourceUrl
PipExtraIndex
PipFindLinks
PipIndex
PrioritizedDist
A collection of distributions that have been filtered by relevance.
RegistryBuiltDist
A built distribution (wheel) that exists in a registry, like PyPI.
RegistryBuiltWheel
A built distribution (wheel) that exists in a registry, like PyPI.
RegistrySourceDist
A source distribution that exists in a registry, like PyPI.
Requirement
A representation of dependency on a package, an extension over a PEP 508’s requirement.
RequiresPython
The Requires-Python requirement specifier.
RequiresPythonRange
Resolution
A set of packages pinned at specific versions.
SerializableStatusCode
SimplifiedMarkerTree
A simplified marker is just like a normal marker, except it has possibly been simplified by requires-python.
SourceAnnotations
A collection of source annotations.
StaticMetadata
A subset of the Python Package Metadata 2.3 standard as specified in https://packaging.python.org/specifications/core-metadata/.
UnresolvedRequirementSpecification
An UnresolvedRequirement with additional metadata from requirements.txt, currently only hashes but in the future also editable and similar information.
UrlString
A [Url] represented as a String.
UrlStringResolver
The resolver for an archived UrlString
Zstd
ZstdResolver
The resolver for an archived Zstd

Enums§

ArchivedFileLocation
An archived FileLocation
BuildableSource
A reference to a source that can be built into a built distribution.
BuiltDist
A wheel, with its three possible origins (index, url, path)
CachedDist
A built distribution (wheel) that exists in the local cache.
CanonicalVersion
Like InstalledVersion, but with CanonicalUrl to ensure robust URL comparisons.
CompatibleDist
A distribution that can be used for both resolution and installation.
Dist
Either a built distribution, a wheel, or a source distribution that exists at some location.
DistErrorKind
The operation(s) that failed when reporting an error with a distribution.
DistRef
A reference to a built or source distribution.
DistributionId
A unique resource identifier for the distribution, like a SHA-256 hash of the distribution’s contents.
Edge
An edge in the resolution graph.
Error
ExtraBuildRequiresError
FileConversionError
Error converting uv_pypi_types::PypiFile to [distribution_type::File].
FileLocation
While a registry file is generally a remote URL, it can also be a file if it comes from a directory flat indexes.
FileLocationResolver
The resolver for an archived FileLocation
HashComparison
HashGeneration
The context in which hashes should be generated.
HashPolicy
IncompatibleDist
IncompatibleSource
IncompatibleWheel
IndexFormat
IndexNameError
An error that can occur when parsing an IndexName.
IndexSourceError
An error that can occur when parsing an Index.
IndexStatusCodeDecision
Decision on whether to continue searching the next index.
IndexStatusCodeStrategy
IndexUrl
The URL of an index to use for fetching packages (e.g., PyPI).
IndexUrlError
An error that can occur when parsing an IndexUrl.
InstalledDistError
InstalledDistKind
A built distribution (wheel) that is installed in a virtual environment.
InstalledVersion
KnownPlatform
A platform for which the resolver is solving.
LocalDist
A distribution which is either installable, is a wheel in our cache or is already installed.
Node
A node in the resolution, along with whether its been filtered out.
Origin
The origin of a piece of configuration.
PackageId
A unique identifier for a package. A package can either be identified by a name (e.g., black) or a URL (e.g., git+https://github.com/psf/black).
PythonRequirementKind
RequestedDist
A distribution that can be requested during resolution.
RequirementError
RequirementSource
The different locations with can install a distribution from: Version specifier (from an index), HTTP(S) URL, git repository, and path.
ResolutionDiagnostic
ResolvedDist
A distribution that can be used for resolution and installation.
ResolvedDistRef
A variant of ResolvedDist with borrowed inner distributions.
ResourceId
A unique identifier for a resource, like a URL or a Git repository.
SourceAnnotation
Source of a dependency, e.g., a -r requirements.txt file.
SourceDist
A source distribution, with its possible origins (index, url, path, git)
SourceDistCompatibility
SourceUrl
A reference to a source distribution defined by a URL.
ToUrlError
An error that occurs when a FileLocation is not a valid URL.
UnresolvedRequirement
A requirement read from a requirements.txt or pyproject.toml file.
VersionId
A unique identifier for a package at a specific version (e.g., black==23.10.0).
VersionOrUrlRef
WheelCompatibility

Traits§

Diagnostic
DistributionMetadata
Metadata that can be resolved from a requirements specification alone (i.e., prior to building or installing the distribution).
Hashed
Identifier
InstalledMetadata
Metadata that can be resolved from a built distribution.
IsBuildBackendError
Inspect whether an error type is a build error.
Name
RemoteSource
Verbatim

Functions§

implied_markers
Given a wheel filename, determine the set of supported markers.

Type Aliases§

BuildVariables
A map of extra build variables, from variable name to value.