summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Stam <33101855+EthanS94@users.noreply.github.com>2020-11-09 12:02:00 -0700
committerGitHub <noreply@github.com>2020-11-09 13:02:00 -0600
commite73e7cf0ad9888847024368666c95766c8f0bc76 (patch)
tree7873f237e253f6d4d9f4a7bc6afee58fdd04133b
parent4092c90b57a4698c5833b0a0049b28307edfea55 (diff)
downloadspack-e73e7cf0ad9888847024368666c95766c8f0bc76.tar.gz
spack-e73e7cf0ad9888847024368666c95766c8f0bc76.tar.bz2
spack-e73e7cf0ad9888847024368666c95766c8f0bc76.tar.xz
spack-e73e7cf0ad9888847024368666c95766c8f0bc76.zip
ParaView: correct path for PARAVIEW_VTK_DIR (#19770)
* ParaView: correct path for PARAVIEW_VTK_DIR * Update formatting
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index b9da3ce06d..18b3c36e24 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -157,7 +157,10 @@ class Paraview(CMakePackage, CudaPackage):
@property
def paraview_subdir(self):
"""The paraview subdirectory name as paraview-major.minor"""
- return 'paraview-{0}'.format(self.spec.version.up_to(2))
+ if self.spec.version == Version('develop'):
+ return 'paraview-5.9'
+ else:
+ return 'paraview-{0}'.format(self.spec.version.up_to(2))
def setup_dependent_build_environment(self, env, dependent_spec):
if os.path.isdir(self.prefix.lib64):
@@ -165,8 +168,13 @@ class Paraview(CMakePackage, CudaPackage):
else:
lib_dir = self.prefix.lib
env.set('ParaView_DIR', self.prefix)
- env.set('PARAVIEW_VTK_DIR',
- join_path(lib_dir, 'cmake', self.paraview_subdir))
+
+ if self.spec.version <= Version('5.7.0'):
+ env.set('PARAVIEW_VTK_DIR',
+ join_path(lib_dir, 'cmake', self.paraview_subdir))
+ else:
+ env.set('PARAVIEW_VTK_DIR',
+ join_path(lib_dir, 'cmake', self.paraview_subdir, 'vtk'))
def setup_run_environment(self, env):
# paraview 5.5 and later
@@ -179,8 +187,13 @@ class Paraview(CMakePackage, CudaPackage):
lib_dir = self.prefix.lib
env.set('ParaView_DIR', self.prefix)
- env.set('PARAVIEW_VTK_DIR',
- join_path(lib_dir, 'cmake', self.paraview_subdir))
+
+ if self.spec.version <= Version('5.7.0'):
+ env.set('PARAVIEW_VTK_DIR',
+ join_path(lib_dir, 'cmake', self.paraview_subdir))
+ else:
+ env.set('PARAVIEW_VTK_DIR',
+ join_path(lib_dir, 'cmake', self.paraview_subdir, 'vtk'))
if self.spec.version <= Version('5.4.1'):
lib_dir = join_path(lib_dir, self.paraview_subdir)