diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/paraview/package.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index bb8b140b74..30b00ad7d5 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -51,7 +51,8 @@ class Paraview(CMakePackage, CudaPackage): description='Use module kits') conflicts('+python', when='+python3') - conflicts('+python', when='@5.6:') + # Python 2 support dropped with 5.9.0 + conflicts('+python', when='@5.9:') conflicts('+python3', when='@:5.5') conflicts('+shared', when='+cuda') # Legacy rendering dropped in 5.5 @@ -110,6 +111,11 @@ class Paraview(CMakePackage, CudaPackage): depends_on('zlib') depends_on('cmake@3.3:', type='build') + # Can't contretize with python2 and py-setuptools@45.0.0: + depends_on('py-setuptools@:44.99.99', when='+python') + # Can't contretize with python2 and py-pillow@7.0.0: + depends_on('py-pillow@:6', when='+python') + patch('stl-reader-pv440.patch', when='@4.4.0') # Broken gcc-detection - improved in 5.1.0, redundant later @@ -232,13 +238,20 @@ class Paraview(CMakePackage, CudaPackage): '-DPARAVIEW_QT_VERSION=%s' % spec['qt'].version[0], ]) + # CMake flags for python have changed with newer ParaView versions + # Make sure Spack uses the right cmake flags if '+python' in spec or '+python3' in spec: + py_use_opt = 'USE' if spec.satisfies('@5.8:') else 'ENABLE' + py_ver_opt = 'PARAVIEW' if spec.satisfies('@5.7:') else 'VTK' + py_ver_val = 3 if '+python3' in spec else 2 cmake_args.extend([ - '-DPARAVIEW_ENABLE_PYTHON:BOOL=ON', + '-DPARAVIEW_%s_PYTHON:BOOL=ON' % py_use_opt, '-DPYTHON_EXECUTABLE:FILEPATH=%s' % spec['python'].command.path, - '-DVTK_USE_SYSTEM_MPI4PY:BOOL=%s' % variant_bool('+mpi') + '-DVTK_USE_SYSTEM_MPI4PY:BOOL=%s' % variant_bool('+mpi'), + '-D%s_PYTHON_VERSION:STRING=%d' % (py_ver_opt, py_ver_val) ]) + else: cmake_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=OFF') |