easyblock = "PythonPackage"

name = 'phono3py'
version = '1.11.9.1'

homepage = 'http://phonopy.sourceforge.net/phono3py/index.html'
description = """This software calculates phonon-phonon interaction related properties"""

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

sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://sourceforge.net/projects/phonopy/files/phono3py/']
#patches = ['phono3py-1.11.9.1-mkl.patch']

# notice the hash hack to override setup.py
prebuildopts = 'local_python setup.py build #'
# another hack
preinstallopts = 'local_python setup.py install --prefix=%(installdir)s #'
skipsteps = ['test']
options = {'modulename': 'phonopy'}

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

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

dependencies = [
    (local_python, local_pythonversion),
    ('LAPACKE', '3.5.0', '', ('LAPACK', '3.5.0')),
    ('h5py', '2.4.0', '-Python-2.7.9-serial')
]

moduleclass = 'phys'
