easyblock = 'CMakeMake'

name = 'ALPS'
version = '2.2.b4'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://www.example.com'
description = """ The ALPS project (Algorithms and Libraries for Physics Simulations) is an open source effort
aiming at providing high-end simulation codes for strongly correlated quantum mechanical systems as well as C++
libraries for simplifying the development of such code."""

toolchain = {'name': 'intel', 'version': '2016a'}

sources = ['%(namelower)s-%(version)s-src.tar.gz']
source_urls = ['http://alps.comp-phys.org/static/software/releases']

patches = ['ALPS-%(version)s-python-embedding.patch']

builddependencies = [('CMake', '3.4.3')]

dependencies = [
    ('zlib', '1.2.8'),
    ('Szip', '2.1'),
    ('Python', '2.7.11'),
    ('Boost', '1.58.0', versionsuffix),
    ('HDF5', '1.8.16'),
    ('matplotlib', '1.5.1', versionsuffix),
]

configopts = '-DFFTW_LIBRARIES=$FFTW_LIB_DIR -DFFTW_INCLUDE_DIR=$FFTW_INC_DIR'

separate_build_dir = True

sanity_check_paths = {
    'files': ['bin/alpspython', 'lib/libalps.%s' % SHLIB_EXT],
    'dirs': ['include/alps', 'lib/python']
}

moduleclass = 'phys'
