From 996c3d8cb76853750aea565b98edeab48f088e66 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Fri, 17 May 2024 12:33:45 -0700 Subject: [PATCH] Going back to using dev-build command to see if that still works --- scripts/devtools/tpl-manager.py | 2 +- scripts/spack/packages/spheral/package.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 699852eb8..d63ceda20 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -184,7 +184,7 @@ def build_deps(args): sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s)) # Install only the dependencies for Spheral and create CMake configure file - sexe("{0} install --fail-fast --fresh -u initconfig \"{1}@develop%{2} dev_path=./\" 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) + sexe("{0} dev-build --fresh -u initconfig {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) if not args.no_clean: sexe("rm -f spec-info-* tpl-build-* spack-build-* spack-configure-args.txt") diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index 903dedb09..a1ccecb1e 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -98,12 +98,13 @@ def cache_name(self): hostname = hostname.rstrip('1234567890') envspec = os.environ.get("SPEC") + spec = self.spec if envspec: cache_spec = envspec else: - cache_spec = self.spec.compiler.name + "@" + self.spec.compiler.version + cache_spec = str(spec.compiler.name) + "@" + str(spec.compiler.version) return "{0}-{1}.cmake".format( - str(self._get_sys_type(self.spec)), + str(self._get_sys_type(spec)), cache_spec.replace(" ", "_") ) @@ -207,5 +208,10 @@ def build_dirname(self): @property def build_directory(self): """Full-path to the directory to use when building the package.""" - return os.path.join(self.pkg.stage.path, self.build_dirname) + spec = self.spec + if spec.satisfies("@develop"): + dev_build_dir = "spack-build-" + str(spec.compiler.name) + "-" + str(spec.compiler.version) + return os.path.join(self.pkg.stage.source_path, build_dirname) + else: + return os.path.join(self.pkg.stage.path, self.build_dirname)