easyblock = 'Waf'

name = 'PyCairo'
version = '1.10.0'

homepage = 'http://cairographics.org/pycairo/'
description = """Python bindings for the cairo library"""

toolchain = SYSTEM

source_urls = ['http://cairographics.org/releases/']
# py2cairo is the Python 2 local_compatible release
sources = ['py2cairo-%(version)s.tar.bz2']

local_pyver = '2.7.13'
local_pyshortver = '.'.join(local_pyver.split('.')[:2])
versionsuffix = '-Python-%s-base' % local_pyver

configopts = " --nopyc --nopyo "

dependencies = [
    ('Python', local_pyver, '-base'),
    ('numpy', '1.13.0', '-Python-2.7.13-base'),
    ('scipy', '0.19.1', '-Python-2.7.13-base'),
    ('cairo', '1.14.6'),
]

modextrapaths = {
    'PYTHONPATH': [
        'lib/python%s/site-packages' %
        local_pyshortver,
        'lib64/python%s/site-packages' %
        local_pyshortver],
}

sanity_check_paths = {
    'files': ['include/pycairo/pycairo.h', 'lib/pkgconfig/pycairo.pc'],
    'dirs': ['lib/python%s/site-packages/cairo' % local_pyshortver],
}

moduleclass = 'vis'
