Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow absolute path for build directory #853

Merged
merged 1 commit into from Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/rez/build_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ def __init__(self, working_dir, build_system, package=None, vcs=None,
raise BuildProcessError(
"Build process was instantiated with a mismatched VCS instance")

self.build_path = os.path.join(self.working_dir,
self.package.config.build_directory)
if os.path.isabs(self.package.config.build_directory):
self.build_path = self.package.config.build_directory
else:
self.build_path = os.path.join(self.working_dir,
self.package.config.build_directory)

@property
def package(self):
Expand Down
4 changes: 2 additions & 2 deletions src/rez/build_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def build(self, context, variant, build_path, install_path, install=False,
context: A ResolvedContext object that the build process must be
executed within.
variant (`Variant`): The variant being built.
build_path: Where to write temporary build files. May be relative
to working_dir.
build_path: Where to write temporary build files. May be absolute
or relative to working_dir.
install_path (str): The package repository path to install the
package to, if installing. If None, defaults to
`config.local_packages_path`.
Expand Down
5 changes: 3 additions & 2 deletions src/rez/rezconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,9 @@
# the 'relocatable' attribute in its package definition file.
default_relocatable = True

# The default working directory for a package build, relative to the package
# source directory (this is typically where temporary build files are written).
# The default working directory for a package build, either absolute path or
# relative to the package source directory (this is typically where temporary
# build files are written).
build_directory = "build"

# The number of threads a build system should use, eg the make '-j' option.
Expand Down