easyblock = 'CMakeMake'

name = 'NEST'
version = '2.12.0'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://www.nest-simulator.org/'
description = """NEST is a simulator for spiking neural network models
 that focuses on the dynamics, size and structure of neural systems rather
 than on the exact morphology of individual neurons."""

toolchain = {'name': 'foss', 'version': '2015b'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/nest/nest-simulator/releases/download/v%(version)s/']
sources = ['nest-%(version)s.tar.gz']
checksums = ['bac578f38bb0621618ee9d5f2f1febfee60cddc000ff32e51a5f5470bb3df40d']

configopts = '-DREADLINE_ROOT_DIR=$EBROOTLIBREADLINE -DCMAKE_INSTALL_LIBDIR=lib -Dwith-mpi=OFF'

dependencies = [
    ('Python', '2.7.9'),
    ('libreadline', '6.3'),
    ('GSL', '2.1'),
    ('libtool', '2.4.6'),
    ('ncurses', '5.9'),
]

builddependencies = [
    ('CMake', '3.4.1'),
    ('Doxygen', '1.8.10'),
    ('pkg-config', '0.27.1'),
]

modextrapaths = {
    'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_paths = {
    'files': ['bin/nest', 'lib/libnest.%s' % SHLIB_EXT, 'lib/libmodels.%s' % SHLIB_EXT],
    'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

moduleclass = 'bio'
