diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-11-19 15:23:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 15:23:54 +0100 |
commit | 5333925dd7a4245b761c73e557e30b7eb62b88c1 (patch) | |
tree | 6e6941ad9355b0ba840917259fe6035a4e4680df /var | |
parent | 2db99e1ff6b8855075e33aecb4e502b14dbd5052 (diff) | |
download | spack-5333925dd7a4245b761c73e557e30b7eb62b88c1.tar.gz spack-5333925dd7a4245b761c73e557e30b7eb62b88c1.tar.bz2 spack-5333925dd7a4245b761c73e557e30b7eb62b88c1.tar.xz spack-5333925dd7a4245b761c73e557e30b7eb62b88c1.zip |
sensei: fix install rpath for python extension (#47670)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/sensei/package.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/sensei/package.py b/var/spack/repos/builtin/packages/sensei/package.py index a00e944ea8..ab59e1983a 100644 --- a/var/spack/repos/builtin/packages/sensei/package.py +++ b/var/spack/repos/builtin/packages/sensei/package.py @@ -88,11 +88,13 @@ class Sensei(CMakePackage): # HDF5 depends_on("hdf5", when="+hdf5") - depends_on("python@3:", when="+python", type=("build", "run")) - extends("python", when="+python") - depends_on("py-numpy", when="+python", type=("build", "run")) - depends_on("py-mpi4py@:3", when="+python", type=("build", "run")) - depends_on("swig", when="+python", type="build") + with when("+python"): + extends("python") + depends_on("python@3:", type=("build", "link", "run")) + depends_on("py-numpy", type=("build", "run")) + depends_on("py-mpi4py@:3", type=("build", "run")) + depends_on("swig", type="build") + depends_on("cmake@3.6:", when="@3:", type="build") depends_on("pugixml") depends_on("mpi") @@ -161,4 +163,13 @@ class Sensei(CMakePackage): args.append(self.define("SENSEI_PYTHON_VERSION", 3)) args.append(self.define_from_variant(f"{prefix}ENABLE_CATALYST_PYTHON", "catalyst")) + # lib/libsensei.so links to lib/pythonX.Y/site-packages/sensei/_PythonAnalysis.so, so + # register the install rpath. + install_rpaths = [ + self.spec.prefix.lib, + self.spec.prefix.lib64, + join_path(python_platlib, "sensei"), + ] + args.append(self.define("CMAKE_INSTALL_RPATH", install_rpaths)) + return args |