# IT4Innovations
# JK 2022

easyblock = 'CMakeMakeCp'

name = 'PySCF'
version = '2.0.1'

homepage = 'http://www.pyscf.org'
description = "PySCF is an open-source collection of electronic structure modules powered by Python."

toolchain = {'name': 'foss', 'version': '2021a'}

source_urls = ['https://github.com/pyscf/pyscf/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['6a152860787351aae52dc1ef2399bd9564fa314dca070312cfc0f2c3fc7412cf']

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

dependencies = [
    ('Python', '3.9.5'),
    ('SciPy-bundle', '2021.05'),  # for numpy, scipy
    ('h5py', '3.2.1'),
    ('libcint', '4.4.0'),
    ('libxc', '5.1.5'),
    ('XCFun', '2.1.1'),
]

start_dir = 'pyscf/lib'

separate_build_dir = True

configopts = "-DBUILD_LIBCINT=OFF -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF"

prebuildopts = "export PYSCF_INC_DIR=$EBROOTQCINT/include:$EBROOTLIBXC/lib && "

files_to_copy = ['pyscf']

sanity_check_paths = {
    'files': ['pyscf/__init__.py'],
    'dirs': ['pyscf/data', 'pyscf/lib'],
}

sanity_check_commands = ["python -c 'import pyscf'"]

modextrapaths = {'PYTHONPATH': ''}

moduleclass = 'chem'
