Add missing doc variant to fenics package (#4473)
This commit is contained in:
parent
27e6e8715e
commit
dc911661ca
@ -25,7 +25,7 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Fenics(Package):
|
||||
class Fenics(CMakePackage):
|
||||
"""FEniCS is organized as a collection of interoperable components
|
||||
that together form the FEniCS Project. These components include
|
||||
the problem-solving environment DOLFIN, the form compiler FFC, the
|
||||
@ -35,9 +35,10 @@ class Fenics(Package):
|
||||
|
||||
homepage = "http://fenicsproject.org/"
|
||||
url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-1.6.0.tar.gz"
|
||||
|
||||
base_url = "https://bitbucket.org/fenics-project/{pkg}/downloads/{pkg}-{version}.tar.gz"
|
||||
|
||||
python_components = ['ufl', 'ffc', 'fiat', 'instant']
|
||||
|
||||
variant('hdf5', default=True, description='Compile with HDF5')
|
||||
variant('parmetis', default=True, description='Compile with ParMETIS')
|
||||
variant('scotch', default=True, description='Compile with Scotch')
|
||||
@ -56,6 +57,8 @@ class Fenics(Package):
|
||||
description='Enables the build of shared libraries')
|
||||
variant('debug', default=False,
|
||||
description='Builds a debug version of the libraries')
|
||||
variant('doc', default=False,
|
||||
description='Builds the documentation')
|
||||
|
||||
# not part of spack list for now
|
||||
# variant('petsc4py', default=True, description='Uses PETSc4py')
|
||||
@ -68,7 +71,7 @@ class Fenics(Package):
|
||||
|
||||
extends('python')
|
||||
|
||||
depends_on('eigen@3.2.0:', type='build')
|
||||
depends_on('eigen@3.2.0:')
|
||||
depends_on('boost+filesystem+program_options+system+iostreams+timer+regex+chrono')
|
||||
|
||||
depends_on('mpi', when='+mpi')
|
||||
@ -88,7 +91,7 @@ class Fenics(Package):
|
||||
depends_on('py-numpy', type=('build', 'run'))
|
||||
depends_on('py-sympy', type=('build', 'run'))
|
||||
depends_on('swig@3.0.3:', type=('build', 'run'))
|
||||
depends_on('cmake@2.8.12:', type=('build', 'run'))
|
||||
depends_on('cmake@2.8.12:', type='build')
|
||||
|
||||
depends_on('py-setuptools', type='build')
|
||||
depends_on('py-sphinx@1.0.1:', when='+doc', type='build')
|
||||
@ -140,14 +143,14 @@ class Fenics(Package):
|
||||
def cmake_is_on(self, option):
|
||||
return 'ON' if option in self.spec else 'OFF'
|
||||
|
||||
def install(self, spec, prefix):
|
||||
for package in ['ufl', 'ffc', 'fiat', 'instant']:
|
||||
with working_dir(join_path('depends', package)):
|
||||
setup_py('install', '--prefix=%s' % prefix)
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
cmake_args = [
|
||||
return [
|
||||
'-DCMAKE_BUILD_TYPE:STRING={0}'.format(
|
||||
'Debug' if '+debug' in spec else 'RelWithDebInfo'),
|
||||
'-DDOLFIN_ENABLE_DOCS:BOOL={0}'.format(
|
||||
self.cmake_is_on('+doc')),
|
||||
'-DBUILD_SHARED_LIBS:BOOL={0}'.format(
|
||||
self.cmake_is_on('+shared')),
|
||||
'-DDOLFIN_SKIP_BUILD_TESTS:BOOL=ON',
|
||||
@ -189,10 +192,14 @@ def install(self, spec, prefix):
|
||||
self.cmake_is_on('zlib')),
|
||||
]
|
||||
|
||||
cmake_args.extend(std_cmake_args)
|
||||
@run_after('build')
|
||||
def build_python_components(self):
|
||||
for package in self.python_components:
|
||||
with working_dir(join_path('depends', package)):
|
||||
setup_py('build')
|
||||
|
||||
with working_dir('build', create=True):
|
||||
cmake('..', *cmake_args)
|
||||
|
||||
make()
|
||||
make('install')
|
||||
@run_after('install')
|
||||
def install_python_components(self):
|
||||
for package in self.python_components:
|
||||
with working_dir(join_path('depends', package)):
|
||||
setup_py('install', '--prefix={0}'.format(self.prefix))
|
||||
|
Loading…
Reference in New Issue
Block a user