API

Warning

The API is only meant to be used by plugins authors.

class rez_pip.pip.T

alias of TypeVar(‘T’, ~rez_pip.pip.PackageInfo, ~rez_pip.pip.DownloadedArtifact)

class rez_pip.pip.DownloadInfo(url: 'str', archive_info: 'ArchiveInfo')
url: str

Download URL

archive_info: ArchiveInfo

Archive information

class rez_pip.pip.Metadata(version: str, name: str)

Represents metadata for a package

version: str
name: str
class rez_pip.pip.PackageInfo(download_info: DownloadInfo, is_direct: bool, requested: bool, metadata: Metadata)

Represents data returned by pip for a single package

download_info: DownloadInfo

Download information

is_direct: bool

Is this a direct dependency?

requested: bool

Is this a requested package?

metadata: Metadata

Metadata about the package

property name: str

Package name

property version: str

Package version

class rez_pip.pip.PackageGroup(packages: tuple[T, ...])

Bases: Generic[T]

A group of package. The order of packages and dists must be the same.

packages: tuple[T, ...]

List of packages

dists: list[Distribution]

List of distributions

property downloadUrls: list[str]

List of download URLs

class rez_pip.pip.DownloadedArtifact(download_info: DownloadInfo, is_direct: bool, requested: bool, metadata: Metadata, _localPath: str)

This is a subclass of PackageInfo. It’s used to represent a local wheel. It is immutable so that we can clearly express immutability in plugins.

property path: str

Path to the package on disk.

class rez_pip.plugins.CleanupAction(op: Literal['remove'], path: str)

Cleanup hook action. If you want to do any cleanup from a cleanup hook you need to return this from the cleanup() hook.

op: Literal['remove']

Operation to perform.

path: str

Path on which to perform the operation.