easyblock = 'ConfigureMake'

name = 'PyGObject'
version = '3.28.3'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://www.pygtk.org/'
description = """Python Bindings for GLib/GObject/GIO/GTK+"""

toolchain = {'name': 'foss', 'version': '2018b'}

source_urls = [FTPGNOME_SOURCE]
sources = [SOURCELOWER_TAR_XZ]
checksums = ['3bac63c86bb963aa401f97859464aa90']

dependencies = [
    ('Python', '3.6.6'),
    ('GLib', '2.54.3'),
    ('GObject-Introspection', '1.54.1', versionsuffix),
    ('PyCairo', '1.18.0', versionsuffix),
]

preconfigopts = "env PYTHON=python3"

modextrapaths = {
    'PYTHONPATH': [
        'lib/python%(pyshortver)s/site-packages',
        'lib/python%(pyshortver)s/site-packages/gtk-2.0',
        'lib64/python%(pyshortver)s/site-packages',
        'lib64/python%(pyshortver)s/site-packages/gtk-2.0',
    ],
}

sanity_check_paths = {
    'files': ['lib/python%(pyshortver)s/site-packages/gi/_gi_cairo.cpython-36m-x86_64-linux-gnu.so'],
    'dirs': ['include/pygobject-3.0'],
}

sanity_check_commands = [
    ('python3', "-c 'import gi'"),
    ('python3', "-c 'from gi.repository import Gio'"),
]

moduleclass = 'vis'
