# IT4Innovations 2021
# JK

easyblock = 'CMakeMake'

name = 'spirit'
version = '2.1.1'
versionsuffix = '-CUDA-10.2.89'

homepage = 'https://spirit-code.github.io/'
description = """Spirit is a platform-independent framework for spin dynamics, written in C++11. It combines the traditional cluster work, using using the command-line, with modern visualisation capabilites in order to maximize scientists' productivity."""

toolchain = {'name':'GCC', 'version':'10.3.0'}

source_urls = ['https://github.com/spirit-code/spirit/archive/refs/tags/']
sources = ['%(version)s.tar.gz']

builddependencies = [
	('CMake', '3.16.2', '', True)
]

dependencies = [
	('CUDA', '10.2.89', '', True),
	('Qt5', '5.13.1', '', True),
]

configopts = ' -D SPIRIT_USE_CUDA=ON '

preinstallopts = ' mkdir -p %(installdir)s/lib/python/ && '
preinstallopts += ' cp -r %(builddir)s/%(name)s-%(version)s/core/python/* %(installdir)s/lib/python/ && '

modextrapaths = {
    'PYTHONPATH': 'lib/python/',
}

moduleclass = 'chem'
