easyblock = 'PythonBundle'

name = 'ESMPy'
version = '8.7.0'

homepage = 'https://earthsystemmodeling.org/esmpy'
description = "Earth System Modeling Framework (ESMF) Python Interface"

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

dependencies = [
    ('Python', '3.12.3'),
    ('SciPy-bundle', '2024.05'),  # for numpy, mpi4py
    ('ESMF', version),
    ('hatchling', '1.24.2'),
]

download_dep_fail = True

use_pip = True

sanity_pip_check = True

exts_list = [
    ('pytest-json-report', '1.5.0', {
        'modulename': 'pytest_jsonreport',
        'checksums': ['2dde3c647851a19b5f3700729e8310a6e66efb2077d674f27ddea3d34dc615de'],
    }),
    ('setuptools-git-versioning', '2.0.0', {
        'checksums': ['85b5fbe7bda8e9c24bbd9e587a9d4b91129417f4dd3e11e3c0d5f3f835fc4d4d'],
    }),
    ('pytest_metadata', '3.1.1', {
        'checksums': ['d2a29b0355fbc03f168aa96d41ff88b1a3b44a3b02acbe491801c98a048017c8'],
    }),
    (name, version, {
        'source_tmpl': 'v%(version)s.tar.gz',
        'source_urls': ['https://github.com/esmf-org/esmf/archive/'],
        'checksums': ['d7ab266e2af8c8b230721d4df59e61aa03c612a95cc39c07a2d5695746f21f56'],
        'start_dir': 'src/addon/esmpy',
        'prebuildopts': 'export ESMFMKFILE="$EBROOTESMF/lib/esmf.mk" && ',
    }),
]

#modextrapaths = {
#    'ESMFMKFILE': '../../ESMF/%(version)s-foss-2024a/lib/esmf.mk',
#}

moduleclass = 'geo'
