Spack packages now PEP8 compliant.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Paraview(Package):
|
||||
homepage = 'http://www.paraview.org'
|
||||
url = 'http://www.paraview.org/files/v5.0/ParaView-v'
|
||||
@@ -52,23 +53,22 @@ class Paraview(Package):
|
||||
depends_on('cmake', type='build')
|
||||
depends_on('bzip2')
|
||||
depends_on('freetype')
|
||||
#depends_on('hdf5+mpi', when='+mpi')
|
||||
#depends_on('hdf5~mpi', when='~mpi')
|
||||
# depends_on('hdf5+mpi', when='+mpi')
|
||||
# depends_on('hdf5~mpi', when='~mpi')
|
||||
depends_on('jpeg')
|
||||
depends_on('libpng')
|
||||
depends_on('libtiff')
|
||||
depends_on('libxml2')
|
||||
#depends_on('netcdf')
|
||||
#depends_on('netcdf-cxx')
|
||||
#depends_on('protobuf') # version mismatches?
|
||||
#depends_on('sqlite') # external version not supported
|
||||
# depends_on('netcdf')
|
||||
# depends_on('netcdf-cxx')
|
||||
# depends_on('protobuf') # version mismatches?
|
||||
# depends_on('sqlite') # external version not supported
|
||||
depends_on('zlib')
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle ParaView version-based custom URLs."""
|
||||
return self._url_str % (version.up_to(2), version)
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('spack-build', create=True):
|
||||
def feature_to_bool(feature, on='ON', off='OFF'):
|
||||
@@ -80,34 +80,46 @@ def nfeature_to_bool(feature):
|
||||
return feature_to_bool(feature, on='OFF', off='ON')
|
||||
|
||||
feature_args = std_cmake_args[:]
|
||||
feature_args.append('-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % feature_to_bool('+qt'))
|
||||
feature_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=%s' % feature_to_bool('+python'))
|
||||
feature_args.append(
|
||||
'-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % feature_to_bool('+qt'))
|
||||
feature_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=%s' %
|
||||
feature_to_bool('+python'))
|
||||
if '+python' in spec:
|
||||
feature_args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s/bin/python' % spec['python'].prefix)
|
||||
feature_args.append('-DPARAVIEW_USE_MPI:BOOL=%s' % feature_to_bool('+mpi'))
|
||||
feature_args.append(
|
||||
'-DPYTHON_EXECUTABLE:FILEPATH=%s/bin/python'
|
||||
% spec['python'].prefix)
|
||||
feature_args.append('-DPARAVIEW_USE_MPI:BOOL=%s' %
|
||||
feature_to_bool('+mpi'))
|
||||
if '+mpi' in spec:
|
||||
feature_args.append('-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix)
|
||||
feature_args.append('-DVTK_ENABLE_TCL_WRAPPING:BOOL=%s' % feature_to_bool('+tcl'))
|
||||
feature_args.append('-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % feature_to_bool('+osmesa'))
|
||||
feature_args.append('-DVTK_USE_X:BOOL=%s' % nfeature_to_bool('+osmesa'))
|
||||
feature_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' % feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL'))
|
||||
feature_args.append(
|
||||
'-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix)
|
||||
feature_args.append(
|
||||
'-DVTK_ENABLE_TCL_WRAPPING:BOOL=%s' % feature_to_bool('+tcl'))
|
||||
feature_args.append('-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' %
|
||||
feature_to_bool('+osmesa'))
|
||||
feature_args.append('-DVTK_USE_X:BOOL=%s' %
|
||||
nfeature_to_bool('+osmesa'))
|
||||
feature_args.append(
|
||||
'-DVTK_RENDERING_BACKEND:STRING=%s' %
|
||||
feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL'))
|
||||
|
||||
feature_args.extend(std_cmake_args)
|
||||
|
||||
if 'darwin' in self.spec.architecture:
|
||||
feature_args.append('-DVTK_USE_X:BOOL=OFF')
|
||||
feature_args.append('-DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON')
|
||||
feature_args.append(
|
||||
'-DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON')
|
||||
|
||||
cmake('..',
|
||||
'-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix,
|
||||
'-DBUILD_TESTING:BOOL=OFF',
|
||||
'-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_HDF5:BOOL=OFF',
|
||||
'-DVTK_USE_SYSTEM_JPEG:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF',
|
||||
'-DVTK_USE_SYSTEM_TIFF:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_ZLIB:BOOL=ON',
|
||||
*feature_args)
|
||||
'-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix,
|
||||
'-DBUILD_TESTING:BOOL=OFF',
|
||||
'-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_HDF5:BOOL=OFF',
|
||||
'-DVTK_USE_SYSTEM_JPEG:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF',
|
||||
'-DVTK_USE_SYSTEM_TIFF:BOOL=ON',
|
||||
'-DVTK_USE_SYSTEM_ZLIB:BOOL=ON',
|
||||
*feature_args)
|
||||
make()
|
||||
make('install')
|
||||
|
Reference in New Issue
Block a user