summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/piranha/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/piranha/package.py')
-rw-r--r--var/spack/repos/builtin/packages/piranha/package.py25
1 files changed, 6 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/piranha/package.py b/var/spack/repos/builtin/packages/piranha/package.py
index 8d684ce277..4bc4d5f894 100644
--- a/var/spack/repos/builtin/packages/piranha/package.py
+++ b/var/spack/repos/builtin/packages/piranha/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Piranha(Package):
+class Piranha(CMakePackage):
"""Piranha is a computer-algebra library for the symbolic manipulation of
sparse multivariate polynomials and other closely-related symbolic objects
(such as Poisson series)."""
@@ -40,7 +40,7 @@ class Piranha(Package):
description='Build the Python bindings')
# Build dependencies
- depends_on('cmake@3.0:', type='build')
+ depends_on('cmake@3.2.0:', type='build')
extends('python', when='+pyranha')
depends_on('python@2.6:', type='build', when='+pyranha')
@@ -53,21 +53,8 @@ class Piranha(Package):
depends_on('gmp') # mpir is a drop-in replacement for this
depends_on('mpfr') # Could also be built against mpir
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
-
- # Python bindings
- options.extend([
- '-DBUILD_PYRANHA=%s' % (
- 'ON' if '+python' in spec else 'OFF'),
+ def cmake_args(self):
+ return [
+ '-DBUILD_PYRANHA=%s' % ('ON' if '+python' in self.spec else 'OFF'),
'-DBUILD_TESTS:BOOL=ON',
- ])
-
- with working_dir('spack-build', create=True):
- cmake('..', *options)
-
- make()
- make('install')
- if self.run_tests:
- make('test')
+ ]