easyblock = 'PythonBundle'

name = 'ELIC_Python'
version = '1'

homepage = 'https://gogs.elic.ucl.ac.be'
description = """This repo provides additional Python and R extensions for ELIC ecosystem."""

toolchain = {'name': 'foss', 'version': '2025b'}

dependencies = [
    ('Python', '3.13.5'),
    ('Python-bundle-PyPI', '2025.07'),
    ('SciPy-bundle', '2025.07'),
    ('matplotlib', '3.10.5'),
    ('GDAL', '3.11.3'),
    ('CDO', '2.5.3'),
    ('NCO', '5.3.6'),
    ('ncview', '2.1.11'),
    ('Jupyter-bundle', '20251112'),
    ('netcdf4-python', '1.7.2'),
    ('Cartopy', '0.25.0'),
    ('dask', '2025.9.1'),
    ('zarr', '3.1.5'),
    ('plotly.py', '6.5.0'),
    ('ESMPy', '8.9.0'),
    ('geopandas', '1.1.2'),
    ('h5netcdf', '1.7.3'),
    ('statsmodels', '0.14.6'), 
    ('basemap', '2.0.0'),
]

exts_defaultclass = 'PythonPackage'
exts_default_options = {
    'source_tmpl': '%(name)s-%(version)s.tar.gz',
}

postinstallcmds = [
    "mkdir %(installdir)s/bin",
    "mkdir %(installdir)s/lib",
    "cd %(installdir)s && " +
    #'pip install --upgrade pip && ' +
    'pip install xesmf wget --prefix="%(installdir)s" '
    #'pip install --upgrade pip '
]

modextrapaths = {
    'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages',
    'PYTHONUSERBASE': '',
    #'TK_LIBRARY': '$PYTHONPATH/../../../../../Tk/8.6.14-GCCcore-13.3.0/lib/tk8.6',
    #'TCL_LIBRARY': '$PYTHONPATH/../../../../../Tcl/8.6.14-GCCcore-13.3.0/lib/tcl8.6',
}

moduleclass = 'numlib'
