Skip to content

Commit a0cf42e

Browse files
author
Test User
committed
Bug fix in var/spack/repos/builtin/packages/met/package.py: add missing rpath for Python libraries to all binaries built by met (post-install)
1 parent 1a0befe commit a0cf42e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

var/spack/repos/builtin/packages/met/package.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class Met(AutotoolsPackage):
6363
depends_on("py-numpy", when="+python", type=("build", "run"))
6464
depends_on("py-xarray", when="+python", type=("build", "run"))
6565
depends_on("py-pandas", when="+python", type=("build", "run"))
66+
depends_on("[email protected]:", when="platform=linux", type="build")
6667

6768
patch("openmp_shape_patch.patch", when="@10.1.0")
6869

@@ -182,6 +183,11 @@ def configure_args(self):
182183

183184
return args
184185

186+
@run_after("install", when="platform=linux")
187+
def fixup_rpaths(self):
188+
# set rpaths of binaries Python's lib directory
189+
rpaths = self.spec["python"].libs.directories
185190

186-
# def setup_run_environment(self, env):
187-
# env.set('MET_BASE', self.prefix)
191+
for binary in find(self.prefix.bin, "*"):
192+
patchelf = Executable("patchelf")
193+
patchelf("--add-rpath", ":".join(rpaths), binary)

0 commit comments

Comments
 (0)