Skip to content

Commit

Permalink
Merge pull request #853 from BlueSkyStudios/pr/build_directory_absolu…
Browse files Browse the repository at this point in the history
…te_path

Allow absolute path for build directory
  • Loading branch information
nerdvegas committed Feb 19, 2020
2 parents dfa97f8 + f930965 commit ccac6a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
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

0 comments on commit ccac6a4

Please sign in to comment.