easyblock = "PythonPackage"

name = 'yaff'
version = '1.0'

homepage = 'http://molmod.github.io/yaff/'
description = """Yaff stands for 'Yet another force field'. It is a pythonic force-field code."""

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

source_urls = ['http://users.ugent.be/~tovrstra/yaff']
sources = [SOURCE_TAR_GZ]

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

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

dependencies = [
    (python, pythonversion),
    ('h5py', '2.1.3', versionsuffix),
    ('matplotlib', '1.2.1', versionsuffix),
    ('Cython', '0.19.1', versionsuffix),
    ('molmod', '1.0', versionsuffix),
]

# disable tests that require X11 by specifying "backend: agg" in matplotlibrc
runtest = 'export MATPLOTLIBRC=$PWD; echo "backend: agg" > $MATPLOTLIBRC/matplotlibrc; '
runtest += 'python setup.py build_ext -i; nosetests -v'

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

moduleclass = 'chem'
