rez.package_resources#

class rez.package_resources.PackageRepositoryResource#

Base class for all package-related resources.

schema_error#

Type of exception to throw on bad data.

Type:

Exception

repository_type#

Type of package repository associated with this resource type.

Type:

str

schema_error#

alias of PackageMetadataError

classmethod normalize_variables(variables)#

Give subclasses a chance to standardize values for certain variables

__init__(variables=None)#
class rez.package_resources.PackageFamilyResource#

A package family.

A repository implementation’s package family resource(s) must derive from this class. It must satisfy the schema package_family_schema.

class rez.package_resources.PackageResource#

A package.

A repository implementation’s package resource(s) must derive from this class. It must satisfy the schema package_schema.

classmethod normalize_variables(variables)#

Make sure version is treated consistently

class rez.package_resources.VariantResource#

A package variant.

A repository implementation’s variant resource(s) must derive from this class. It must satisfy the schema variant_schema.

Even packages that do not have a ‘variants’ section contain a variant - in this case it is the ‘None’ variant (the value of index is None). This provides some internal consistency and simplifies the implementation.

root()#

Return the ‘root’ path of the variant.

subpath()#

Return the variant’s ‘subpath’

The subpath is the relative path the variant’s payload should be stored under, relative to the package base. If None, implies that the variant root matches the package base.

class rez.package_resources.PackageResourceHelper#

PackageResource with some common functionality included.

class rez.package_resources.VariantResourceHelper#

Helper class for implementing variants that inherit properties from their parent package.

Since a variant overlaps so much with a package, here we use the forwarding metaclass to forward our parent package’s attributes onto ourself (with some exceptions - eg ‘variants’, ‘requires’). This is a common enough pattern that it’s supplied here for other repository plugins to use.