easyblock = "PythonPackage"

name = 'Viper'
version = '1.0.0'

homepage = 'https://launchpad.net/fenics-viper'
description = """Viper is a minimalistic scientific plotter and run-time visualization module. 
 Viper has support for visualizing meshes and solutions in DOLFIN."""

toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'}

majorversion = "%s.x" % ".".join(version.split('.')[:-1])
source_urls = ['https://launchpad.net/fenics-viper/%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)]

# hack, 'import viper' fails because VTK and numpy dependencies are missing
# see https://github.com/easybuilders/easybuild-easyconfigs/issues/100
options = {'modulename': 'os'}

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

moduleclass = 'vis'
