Skip to content

Commit

Permalink
Going back to using dev-build command to see if that still works
Browse files Browse the repository at this point in the history
  • Loading branch information
ldowen committed May 17, 2024
1 parent bdd8472 commit 996c3d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/devtools/tpl-manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
12 changes: 9 additions & 3 deletions scripts/spack/packages/spheral/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ", "_")
)

Expand Down Expand Up @@ -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)

0 comments on commit 996c3d8

Please sign in to comment.