rez.utils.sourcecode#

rez.utils.sourcecode.early()#

Used by functions in package.py to harden to the return value at build time.

The term ‘early’ refers to the fact these package attribute are evaluated early, ie at build time and before a package is installed.

rez.utils.sourcecode.late()#

Used by functions in package.py that are evaluated lazily.

The term ‘late’ refers to the fact these package attributes are evaluated late, ie when the attribute is queried for the first time.

If you want to implement a package.py attribute as a function, you MUST use this decorator - otherwise it is understood that you want your attribute to be a function, not the return value of that function.

rez.utils.sourcecode.include(module_name, *module_names)#

Used by functions in package.py to have access to named modules.

See the ‘package_definition_python_path’ config setting for more info.

exception rez.utils.sourcecode.SourceCodeError#
__init__(msg, short_msg)#
exception rez.utils.sourcecode.SourceCodeCompileError#
exception rez.utils.sourcecode.SourceCodeExecError#
class rez.utils.sourcecode.SourceCode#

Wrapper for python source code.

This object is aware of the decorators defined in this sourcefile (such as ‘include’) and deals with them appropriately.

__init__(source=None, func=None, filepath=None, eval_as_function=True)#
class rez.utils.sourcecode.IncludeModuleManager#

Manages a cache of modules imported via @include’ decorator.

__init__()#