easyblock = "PythonPackage"

name = 'FFC'
version = '1.0.0'

homepage = 'https://launchpad.net/ffc'
description = """FEniCS Form Compiler (FFC) works as a compiler for multilinear forms by generating
 code (C++) for the evaluation of a multilinear form given in mathematical notation."""

toolchain = {'name': 'ictce', 'version': '4.0.6'}

majorversion = "%s.x" % ".".join(version.split('.')[:-1])
source_urls = ['https://launchpad.net/FFC/%s/%s/+download/' % (majorversion, version)]
sources = [SOURCELOWER_TAR_GZ]

python = "Python"
pythonversion = '2.7.3'
pythonshortversion = ".".join(pythonversion.split(".")[:-1])

versionsuffix = "-%s-%s" % (python, pythonversion)

dependencies = [
    (python, pythonversion),
    ('UFL', '1.0.0', versionsuffix),
    ('FIAT', '1.0.0', versionsuffix),
    ('UFC', '2.0.5', versionsuffix),
    ('Viper', '1.0.0', versionsuffix),
]

sanity_check_paths = {
    'files': ['bin/ffc'],
    'dirs': ['lib/python%s/site-packages/ffc' % pythonshortversion]
}

moduleclass = 'math'
