From 97206cb60a1780f1746d73fc2ff5ae8ca64a5aae Mon Sep 17 00:00:00 2001 From: "Daryl W. Grunau" Date: Wed, 30 May 2018 09:35:39 -0600 Subject: [PATCH] paraview: set PARAVIEW_VTK_DIR in spack_env and run_env (#8308) --- var/spack/repos/builtin/packages/paraview/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 907d98eada..0bd2d85b11 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -96,6 +96,15 @@ def url_for_version(self, version): else: return self._urlfmt.format(version.up_to(2), version, '') + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + if os.path.isdir(self.prefix.lib64): + lib_dir = self.prefix.lib64 + else: + lib_dir = self.prefix.lib + paraview_version = 'paraview-%s' % self.spec.version.up_to(2) + spack_env.set('PARAVIEW_VTK_DIR', + join_path(lib_dir, 'cmake', paraview_version)) + def setup_environment(self, spack_env, run_env): if os.path.isdir(self.prefix.lib64): lib_dir = self.prefix.lib64 @@ -106,6 +115,8 @@ def setup_environment(self, spack_env, run_env): paraview_version)) run_env.prepend_path('LD_LIBRARY_PATH', join_path(lib_dir, paraview_version)) + run_env.set('PARAVIEW_VTK_DIR', + join_path(lib_dir, 'cmake', paraview_version)) if '+python' in self.spec: run_env.prepend_path('PYTHONPATH', join_path(lib_dir, paraview_version))