rez.wrapper

class rez.wrapper.Wrapper(filepath)[source]

Bases: object

A Wrapper.

A wrapper is a tool created by a Suite. Wrappers reside in the ./bin directory of a suite. They are executable yaml files that are run with the internal ‘_rez-forward’ tool.

When a wrapper is executed, it runs the associated tool within the matching context in the suite.

peek()[source]
print_about()[source]

Print an info message about the tool.

print_package_versions()[source]

Print a list of versions of the package this tool comes from, and indicate which version this tool is from.

run(*args)[source]

Invoke the wrapped script.

Returns

Return code of the command, or 0 if the command is not run.

suite

Simple property caching descriptor.

Example

>>> class Foo(object):
>>>     @cached_property
>>>     def bah(self):
>>>         print('bah')
>>>         return 1
>>>
>>> f = Foo()
>>> f.bah
bah
1
>>> f.bah
1