summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2024-02-07 08:22:11 +0100
committerGitHub <noreply@github.com>2024-02-07 08:22:11 +0100
commit5c86a3cca24dcd7bf9249594c5d128cac3395074 (patch)
treed7e83cbffb0518ed0ec7287a2cea8455dc30d04c
parentea53008604b83c347d45c8433f7e7aeef5239119 (diff)
downloadspack-5c86a3cca24dcd7bf9249594c5d128cac3395074.tar.gz
spack-5c86a3cca24dcd7bf9249594c5d128cac3395074.tar.bz2
spack-5c86a3cca24dcd7bf9249594c5d128cac3395074.tar.xz
spack-5c86a3cca24dcd7bf9249594c5d128cac3395074.zip
lammps: fix self-referential dependencies (#42521)
-rw-r--r--var/spack/repos/builtin/packages/lammps/package.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
index 8588f5fdf6..3c71d96778 100644
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -632,9 +632,10 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
depends_on("py-numpy", when="+python", type=("build", "run"))
depends_on("py-mpi4py", when="+python+mpi", type=("build", "run"))
depends_on("py-setuptools@42:", when="@20220217:+python", type=("build", "run"))
- depends_on("n2p2@2.1.4:", when="+user-hdnnp")
- depends_on("n2p2@2.1.4:", when="+ml-hdnnp")
- depends_on("n2p2+shared", when="+lib ^n2p2")
+ for _n2p2_cond in ("+user-hdnnp", "+ml-hdnnp"):
+ with when(_n2p2_cond):
+ depends_on("n2p2@2.1.4:")
+ depends_on("n2p2+shared", when="+lib")
depends_on("vtk", when="+user-vtk")
depends_on("vtk", when="+vtk")
depends_on("hipcub", when="~kokkos +rocm")