summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Stam <33101855+EthanS94@users.noreply.github.com>2021-03-01 17:00:44 -0700
committerGitHub <noreply@github.com>2021-03-01 16:00:44 -0800
commitb2e0bc1ae711059385449a41a82408224f8b77ce (patch)
treeea280aae8c88f78e38399e31e4df8e0118032681
parentbd944585521ad151f85a91d2716ae795ac3bd936 (diff)
downloadspack-b2e0bc1ae711059385449a41a82408224f8b77ce.tar.gz
spack-b2e0bc1ae711059385449a41a82408224f8b77ce.tar.bz2
spack-b2e0bc1ae711059385449a41a82408224f8b77ce.tar.xz
spack-b2e0bc1ae711059385449a41a82408224f8b77ce.zip
paraview: add python to rpath (#21768)
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 4b7f77e216..c8ac19fd68 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -384,4 +384,13 @@ class Paraview(CMakePackage, CudaPackage):
if '%intel' in spec and spec.version >= Version('5.6'):
cmake_args.append('-DPARAVIEW_ENABLE_MOTIONFX:BOOL=OFF')
+ # Encourage Paraview to use the correct Python libs
+ if spec.satisfies('+python') or spec.satisfies('+python3'):
+ pylibdirs = spec['python'].libs.directories
+ cmake_args.append(
+ "-DCMAKE_INSTALL_RPATH={0}".format(
+ ":".join(self.rpath + pylibdirs)
+ )
+ )
+
return cmake_args