rezplugins.build_system.custom
Package-defined build command
- class rezplugins.build_system.custom.CustomBuildSystem(working_dir, opts=None, package=None, write_build_scripts=False, verbose=False, build_args=[], child_build_args=[])[source]
Bases:
rez.build_system.BuildSystemThis build system runs the ‘build_command’ defined in a package.py.
For example, consider the package.py snippet:
build_commands = “bash {root}/build.sh {install}”
This will run the given bash command in the build path - this is typically located somewhere under the ‘build’ dir under the root dir containing the package.py.
The following variables are available for expansion:
root: The source directory (the one containing the package.py).
install: ‘install’ if an install is occurring, or the empty string (‘’) otherwise;
build_path: The build path (this will also be the cwd);
install_path: Full path to install destination;
name: Name of the package getting built;
variant_index: Index of the current variant getting built, or an empty string (‘’) if no variants are present.
version: Package version currently getting built.
- classmethod bind_cli(parser, group)[source]
Uses a ‘parse_build_args.py’ file to add options, if found.
- build(context, variant, build_path, install_path, install=False, build_type=<BuildType.local: 0>)[source]
Perform the build.
Note that most of the func args aren’t used here - that’s because this info is already passed to the custom build command via environment variables.