easyblock = 'PythonPackage'

name = 'Instant'
version = '1.6.0'

homepage = 'https://bitbucket.org/fenics-project/instant'
description = """Instant is a Python module that allows for instant inlining of C and C++ code in Python.
 It is a small Python module built on top of SWIG and Distutils."""

toolchain = {'name': 'intel', 'version': '2015b'}

source_urls = ['https://bitbucket.org/fenics-project/instant/downloads/']
sources = [SOURCELOWER_TAR_GZ]

pyver = '2.7.11'
versionsuffix = '-Python-%s' % pyver

dependencies = [
    ('Python', pyver),
    ('SWIG', '3.0.8', versionsuffix),
    ('CMake', '3.4.1'),  # runtime dep!
]

# compiler-related variables *must* be set, since Instant does runtime compilation and remembers $CFLAGS/$CXXFLAGS
modextravars = {
    'CC': 'icc',
    'CXX': 'icpc',
}

pyshortver = '.'.join(pyver.split('.')[:2])
sanity_check_paths = {
    'files': [],
    'dirs': ['bin', 'lib/python%s/site-packages' % pyshortver]
}

moduleclass = 'devel'
