-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dholladay00/release_190
- Loading branch information
Showing
2 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,9 @@ | |
|
||
|
||
@directive("singularity_eos_plugins") | ||
def singularity_eos_plugin(name, path): | ||
def singularity_eos_plugin(name, spackage, relpath): | ||
def _execute_register(pkg): | ||
pkg.plugins[name] = path | ||
pkg.plugins[name] = (spackage, relpath) | ||
|
||
return _execute_register | ||
|
||
|
@@ -82,22 +82,22 @@ class SingularityEos(CMakePackage, CudaPackage): | |
|
||
plugins = {} | ||
|
||
singularity_eos_plugin("dust", "example/plugin") | ||
singularity_eos_plugin("dust", "self", "example/plugin") | ||
|
||
variant( | ||
"plugins", | ||
multi=True, | ||
default="none", | ||
validator=plugin_validator, | ||
description="list of plugins to build", | ||
when="@main" | ||
when="@1.9.0:" | ||
) | ||
variant("variant", default="default", description="include path used for variant header", when="@main") | ||
variant("variant", default="default", description="include path used for variant header", when="@1.9.0:") | ||
|
||
# building/testing/docs | ||
depends_on("[email protected]:") | ||
depends_on("[email protected]:", when="@main +tests") | ||
depends_on("[email protected]", when="@:1.8.0 +tests") | ||
depends_on("[email protected]:", when="@1.9.0: +tests") | ||
depends_on("python@3:", when="+python") | ||
depends_on("py-numpy", when="+python+tests") | ||
depends_on("[email protected]:", when="+python") | ||
|
@@ -112,7 +112,7 @@ class SingularityEos(CMakePackage, CudaPackage): | |
|
||
depends_on("[email protected],1.5.2:", when="@:1.7.0") | ||
depends_on("[email protected]:", when="@1.7.1:") | ||
depends_on("[email protected]:", when="@1.8.1:") | ||
depends_on("[email protected]:", when="@1.9.0:") | ||
# request HEAD of main branch | ||
depends_on("ports-of-call@main", when="@main") | ||
|
||
|
@@ -216,13 +216,25 @@ def cmake_args(self): | |
self.define("SINGULARITY_USE_EOSPAC", "^eospac" in self.spec), | ||
] | ||
|
||
if self.spec.satisfies("@main"): | ||
if self.spec.satisfies("@1.9.0:"): | ||
if "none" not in self.spec.variants["plugins"].value: | ||
pdirs = [join_path(self.stage.source_path, self.plugins[p]) for p in self.spec.variants["plugins"].value] | ||
pdirs = [] | ||
for p in self.spec.variants["plugins"].value: | ||
spackage, path = self.plugins[p] | ||
if spackage == "self": | ||
pdirs.append(join_path(self.stage.source_path, path)) | ||
else: | ||
pdirs.append(join_path(self.spec[spackage].prefix, path)) | ||
args.append(self.define("SINGULARITY_PLUGINS", ";".join(pdirs))) | ||
|
||
if self.spec.variants["variant"].value != "default": | ||
args.append(self.define_from_variant("SINGULARITY_VARIANT", "variant")) | ||
variant_path = self.spec.variants["variant"].value | ||
if variant_path != "default": | ||
parts = os.path.normpath('variant_path').split(os.sep) | ||
if parts[0] in self.plugins.keys(): | ||
spackage, path = self.plugins[parts[0]] | ||
parts[0] = self.spec[spackage].prefix | ||
variant_path = join_path(*parts) | ||
args.append(self.define("SINGULARITY_VARIANT", variant_path)) | ||
|
||
#TODO: do we need this? | ||
if "+kokkos+cuda" in self.spec: | ||
|