summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-sip/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/py-sip/package.py')
-rw-r--r--var/spack/repos/builtin/packages/py-sip/package.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py
index fc481eabdf..7bb1c24a9c 100644
--- a/var/spack/repos/builtin/packages/py-sip/package.py
+++ b/var/spack/repos/builtin/packages/py-sip/package.py
@@ -21,25 +21,33 @@ class PySip(Package):
version('4.16.7', '32abc003980599d33ffd789734de4c36')
version('4.16.5', '6d01ea966a53e4c7ae5c5e48c40e49e5')
- extends('python')
+ variant('module', default='sip', description='Name of private SIP module',
+ values=str, multi=False)
- # https://www.riverbankcomputing.com/static/Docs/sip/installation.html
- phases = ['configure', 'build', 'install']
+ extends('python')
depends_on('flex', type='build', when='@develop')
depends_on('bison', type='build', when='@develop')
+ # https://www.riverbankcomputing.com/static/Docs/sip/installation.html
+ phases = ['configure', 'build', 'install']
+
@run_before('configure')
def prepare(self):
if self.spec.satisfies('@develop'):
python('build.py', 'prepare')
def configure(self, spec, prefix):
- python('configure.py',
- '--bindir={0}'.format(prefix.bin),
- '--destdir={0}'.format(site_packages_dir),
- '--incdir={0}'.format(python_include_dir),
- '--sipdir={0}'.format(prefix.share.sip))
+ args = [
+ '--sip-module={0}'.format(spec.variants['module'].value),
+ '--bindir={0}'.format(prefix.bin),
+ '--destdir={0}'.format(site_packages_dir),
+ '--incdir={0}'.format(python_include_dir),
+ '--sipdir={0}'.format(prefix.share.sip),
+ '--stubsdir={0}'.format(site_packages_dir),
+ ]
+
+ python('configure.py', *args)
def build(self, spec, prefix):
make()