Skip to content

Commit

Permalink
Redefine variants in neptune-env virtual package (JCSDA#1265)
Browse files Browse the repository at this point in the history
This PR defines three variants in the neptune-env virtual package: espc, python, xnrl. In the unified environment and in the skylab environment, the variants espc and xnrl are off, the python variant is on. This is so that py-fortranformat is available in those environments (required by pyiri-jedi). In the neptune standalone environment, all three variants are on. Note that the xnrl variant requires the python variant.
  • Loading branch information
climbfuji authored Aug 22, 2024
1 parent f9666c4 commit 3b22b34
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions spack-ext/repos/spack-stack/packages/neptune-env/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class NeptuneEnv(BundlePackage):

version("1.4.0")

variant("python", default=True, description="Build Python libraries")
variant("python", default=True, description="Build Python dependencies")
variant("espc", default=True, description="Build ESPC dependencies")
variant("xnrl", default=True, description="Build XNRL and its extra Python dependencies")

depends_on("base-env", type="run")

Expand All @@ -37,9 +39,11 @@ class NeptuneEnv(BundlePackage):
depends_on("nco", type="run")
depends_on("mct", type="run")

# Required by ESPC
depends_on("fftw", type="build")
depends_on("netlib-lapack", type="build")
conflicts("+xnrl", when="~python", msg="Variant xnrl requires variant python")

with when("+espc"):
depends_on("fftw", type="build")
depends_on("netlib-lapack", type="build")

with when("+python"):
depends_on("py-f90nml", type="run")
Expand All @@ -53,8 +57,10 @@ class NeptuneEnv(BundlePackage):
depends_on("py-pyyaml", type="run")
depends_on("py-scipy", type="run")
depends_on("py-xarray", type="run")
depends_on("py-xnrl", type="run")
depends_on("py-pytest", type="run")
depends_on("py-fortranformat", type="run")

with when("+xnrl"):
depends_on("py-xnrl", type="run")

# There is no need for install() since there is no code.

0 comments on commit 3b22b34

Please sign in to comment.