Skip to content

Commit

Permalink
spack: only enable plugin support for @main
Browse files Browse the repository at this point in the history
  • Loading branch information
rbberger committed Jan 29, 2024
1 parent f9158b2 commit a4a756c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions spack-repo/packages/singularity-eos/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ class SingularityEos(CMakePackage, CudaPackage):
default="none",
validator=plugin_validator,
description="list of plugins to build",
when="@main"
)
variant("variant", default="default", description="include path used for variant header")
variant("variant", default="default", description="include path used for variant header", when="@main")

# building/testing/docs
depends_on("[email protected]:")
Expand Down Expand Up @@ -214,12 +215,13 @@ def cmake_args(self):
self.define("SINGULARITY_USE_EOSPAC", "^eospac" in self.spec),
]

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]
args.append(self.define("SINGULARITY_PLUGINS", ";".join(pdirs)))
if self.spec.satisfies("@main"):
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]
args.append(self.define("SINGULARITY_PLUGINS", ";".join(pdirs)))

if self.spec.variants["variant"].value != "default":
args.append(self.define_from_variant("SINGULARITY_VARIANT", "variant"))
if self.spec.variants["variant"].value != "default":
args.append(self.define_from_variant("SINGULARITY_VARIANT", "variant"))

#TODO: do we need this?
if "+kokkos+cuda" in self.spec:
Expand Down

0 comments on commit a4a756c

Please sign in to comment.