summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorDan Lipsa <dan.lipsa@kitware.com>2019-06-17 09:30:29 -0400
committerChuck Atkins <chuck.atkins@kitware.com>2019-06-17 09:30:29 -0400
commit83c795958022d9c130c6b3a8651c1e7ed1a86187 (patch)
tree4246fd837f94310fa19dfbc3c71241eef973c5d3 /var
parent6e067a05c700b59ec379d2e573a2874d6cb4d935 (diff)
downloadspack-83c795958022d9c130c6b3a8651c1e7ed1a86187.tar.gz
spack-83c795958022d9c130c6b3a8651c1e7ed1a86187.tar.bz2
spack-83c795958022d9c130c6b3a8651c1e7ed1a86187.tar.xz
spack-83c795958022d9c130c6b3a8651c1e7ed1a86187.zip
Fix condition to enable mpi4py. (#11707)
* Fix condition to enable mpi4py. * flake8 * Catalyst as paraview for mpi4py. * Catalyst needs numpy and mpi4py. * Remove leftover enable python.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/catalyst/package.py17
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py7
2 files changed, 19 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/catalyst/package.py b/var/spack/repos/builtin/packages/catalyst/package.py
index 03f4609b60..1937661d60 100644
--- a/var/spack/repos/builtin/packages/catalyst/package.py
+++ b/var/spack/repos/builtin/packages/catalyst/package.py
@@ -60,6 +60,12 @@ class Catalyst(CMakePackage):
depends_on('mpi')
depends_on('python@2.7:2.8', when='+python', type=('build', 'link', 'run'))
depends_on('python@3:', when='+python3', type=('build', 'link', 'run'))
+
+ depends_on('py-numpy', when='+python', type=('build', 'run'))
+ depends_on('py-numpy', when='+python3', type=('build', 'run'))
+ depends_on('py-mpi4py', when='+python+mpi', type=('build', 'run'))
+ depends_on('py-mpi4py', when='+python3+mpi', type=('build', 'run'))
+
depends_on('gl@3.2:', when='+rendering')
depends_on('mesa+osmesa', when='+rendering+osmesa')
depends_on('glx', when='+rendering~osmesa')
@@ -206,12 +212,17 @@ class Catalyst(CMakePackage):
'-DVTK_USE_X:BOOL=%s' % nvariant_bool('+osmesa'),
'-DVTK_USE_OFFSCREEN:BOOL=%s' % variant_bool('+osmesa'),
'-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % variant_bool('+osmesa'),
- '-DPARAVIEW_ENABLE_PYTHON:BOOL=%s' % variant_bool('+python')
]
if '+python' in spec or '+python3' in spec:
- cmake_args.append(
+ cmake_args.extend([
+ '-DPARAVIEW_ENABLE_PYTHON:BOOL=ON',
'-DPYTHON_EXECUTABLE:FILEPATH=%s' %
- spec['python'].command.path)
+ spec['python'].command.path,
+ '-DVTK_USE_SYSTEM_MPI4PY:BOOL=%s' % variant_bool('+mpi')
+ ])
+ else:
+ cmake_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=OFF')
+
return cmake_args
def cmake(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index f49eec86a5..ec9cc7238d 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -193,7 +193,6 @@ class Paraview(CMakePackage):
'-DVTK_USE_SYSTEM_HDF5:BOOL=%s' % variant_bool('+hdf5'),
'-DVTK_USE_SYSTEM_JPEG:BOOL=ON',
'-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON',
- '-DVTK_USE_SYSTEM_MPI4PY:BOOL=%s' % variant_bool('+python+mpi'),
'-DVTK_USE_SYSTEM_NETCDF:BOOL=ON',
'-DVTK_USE_SYSTEM_EXPAT:BOOL=ON',
'-DVTK_USE_SYSTEM_TIFF:BOOL=ON',
@@ -211,8 +210,12 @@ class Paraview(CMakePackage):
if '+python' in spec or '+python3' in spec:
cmake_args.extend([
'-DPARAVIEW_ENABLE_PYTHON:BOOL=ON',
- '-DPYTHON_EXECUTABLE:FILEPATH=%s' % spec['python'].command.path
+ '-DPYTHON_EXECUTABLE:FILEPATH=%s' %
+ spec['python'].command.path,
+ '-DVTK_USE_SYSTEM_MPI4PY:BOOL=%s' % variant_bool('+mpi')
])
+ else:
+ cmake_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=OFF')
if '+mpi' in spec:
cmake_args.extend([