Add a WafPackage base class (#3975)
* Add a WafPackage base class * Correct comment in docstring * Be more specific about the Python versions supported
This commit is contained in:

committed by
Todd Gamblin

parent
b3ce04cba3
commit
2511520b32
@@ -25,7 +25,7 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyPy2cairo(Package):
|
||||
class PyPy2cairo(WafPackage):
|
||||
"""Pycairo is a set of Python bindings for the cairo graphics library."""
|
||||
|
||||
homepage = "https://www.cairographics.org/pycairo/"
|
||||
@@ -35,10 +35,15 @@ class PyPy2cairo(Package):
|
||||
|
||||
extends('python')
|
||||
|
||||
depends_on('cairo')
|
||||
depends_on('python', type=('build', 'run'))
|
||||
depends_on('cairo@1.10.0:')
|
||||
depends_on('pixman')
|
||||
depends_on('pkg-config', type='build')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('waf', 'configure', '--prefix={0}'.format(prefix))
|
||||
python('waf', 'build')
|
||||
python('waf', 'install')
|
||||
# TODO: Add a 'test' deptype
|
||||
# depends_on('py-pytest', type='test')
|
||||
|
||||
def installtest(self):
|
||||
with working_dir('test'):
|
||||
pytest = which('py.test')
|
||||
pytest()
|
||||
|
Reference in New Issue
Block a user