easyblock = "PythonPackage"

name = 'UFL'
version = '1.0.0'

homepage = 'https://launchpad.net/ufl'
description = """The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations
 of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions
 for weak forms in a notation close to mathematical notation."""


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

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

local_python = "Python"
local_pythonversion = '2.7.3'
local_pythonshortversion = ".".join(local_pythonversion.split(".")[:-1])

versionsuffix = "-%s-%s" % (local_python, local_pythonversion)

dependencies = [(local_python, local_pythonversion)]

sanity_check_paths = {
    'files': [
        'bin/%s' %
        x for x in [
            "form2ufl",
            "ufl2py",
            "ufl-analyse",
            "ufl-convert",
            "ufl-version"]],
    'dirs': [
        'lib/local_python%s/site-packages/ufl' %
        local_pythonshortversion]}

moduleclass = 'cae'
