easyblock = 'CMakeMake'

name = 'libcint'
version = '4.4.0'

homepage = 'https://github.com/sunqm/libcint'
description = """libcint is an open source library for analytical Gaussian integrals."""

toolchain = {'name': 'intel', 'version': '2020b'}

source_urls = ['https://github.com/sunqm/libcint/archive/']
sources = ['v%(version)s.tar.gz']
patches = ['%(name)s-%(version)s_remove_pyscftest.patch']
checksums = [
    '39a831e9131395e7ac312608981495aed3e44d0511b0700b2a1fb163b32c89c1',  # v4.4.0.tar.gz
    '6449297a6aee30fef3d6a268aa892dea8dd5c3ca9669a50ae694ab9bcf17842d',  # libcint-4.4.0_remove_pyscftest.patch
]

builddependencies = [
    ('CMake', '3.20.1'),
    # Python with numpy only required for 'make test'
    ('Python', '3.8.6'),
    ('SciPy-bundle', '2020.11'),
]

separate_build_dir = False  # Must use the same directory for tests

configopts = '-DWITH_RANGE_COULOMB=on -DWITH_COULOMB_ERF=on -DWITH_F12=on -DENABLE_TEST=on'

buildopts = "VERBOSE=1"

runtest = 'test '

sanity_check_paths = {
    'files': ['include/cint.h', 'lib/libcint.%s' % SHLIB_EXT],
    'dirs': [],
}

moduleclass = 'chem'
