easyblock = 'PythonBundle'

name = 'SciPy-bundle'
version = '2023.02'

homepage = 'https://python.org/'
description = "Bundle of Python packages for scientific software"

toolchain = {'name': 'gfbf', 'version': '2022b'}
toolchainopts = {'pic': True, 'lowopt': True}

builddependencies = [
    ('hypothesis', '6.68.2'),
    ('UnZip', '6.0'),
    # scipy >= 1.9.0 uses Meson/Ninja
    ('Meson', '0.64.0'),
    ('Ninja', '1.11.1'),
    ('pkgconf', '1.9.3'),   # required by scipy
]

dependencies = [
    ('Python', '3.10.8'),
    ('pybind11', '2.10.3'),  # required by scipy
]

# order is important!
exts_list = [
    ('numpy', '1.24.2', {
        'patches': [
            'numpy-1.20.3_fix-fortran-compiler-error.patch',
            'numpy-1.22.3_disable-broken-override-test.patch',
            'numpy-1.24.2_fix-znver2-test-failure.patch',
        ],
        'checksums': [
            {'numpy-1.24.2.tar.gz': '003a9f530e880cb2cd177cba1af7220b9aa42def9c4afc2a2fc3ee6be7eb2b22'},
            {'numpy-1.20.3_fix-fortran-compiler-error.patch':
             '016e0d02ffabe013248c4fd203a4456edee76839f747c05daf92ac1fe9925189'},
            {'numpy-1.22.3_disable-broken-override-test.patch':
             '9c589bb073b28b25ff45eb3c63c57966aa508dd8b318d0b885b6295271e4983c'},
            {'numpy-1.24.2_fix-znver2-test-failure.patch':
             '04aece1e0d62af592791a7704e1d5c1c57a8b2ab53e933c9c12f439b9e1b8f7e'},
        ],
    }),
    ('ply', '3.11', {
        'checksums': ['00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3'],
    }),
    ('gast', '0.5.3', {
        'checksums': ['cfbea25820e653af9c7d1807f659ce0a0a9c64f2439421a7bba4f0983f532dea'],
    }),
    ('beniget', '0.4.1', {
        'checksums': ['75554b3b8ad0553ce2f607627dad3d95c60c441189875b98e097528f8e23ac0c'],
    }),
    ('pythran', '0.12.1', {
        'checksums': ['702c2701187cfb38f66c0c20cc85d04d0e156d260a8d92892da65947faa5360e'],
    }),
    ('scipy', '1.10.1', {
        'patches': [
            'scipy-1.10.1_disable-tests.patch',
            'scipy-1.10.1_xfail-aarch64_test_maxiter_worsening.patch',
            'scipy-1.10.1_fix-lobpcg-test.patch',
            'scipy-1.10.1_fix-test_det_and_ortho.patch',
        ],
        'checksums': [
            {'scipy-1.10.1.tar.gz': '2cf9dfb80a7b4589ba4c40ce7588986d6d5cebc5457cad2c2880f6bc2d42f3a5'},
            {'scipy-1.10.1_disable-tests.patch': '5d36d416fb7ea9297514c3988d9f506793e39dc4c0daedccf6733c3dd7e3dcc0'},
            {'scipy-1.10.1_xfail-aarch64_test_maxiter_worsening.patch':
             '48177d6af51cf3e3d46aed8425807f0a65a498f7558f475032e0ad846559a23e'},
            {'scipy-1.10.1_fix-lobpcg-test.patch': 'eb4c576959108df0b1749705e64fe42e79edcf5aa8f6b4d7908f9b136d0d6648'},
            {'scipy-1.10.1_fix-test_det_and_ortho.patch':
             'beb7516659c2458f91029ee0562da2ff7cf8875f2cfafeeef473e7c7b60e65fe'},
        ],
        'enable_slow_tests': True,
        'ignore_test_result': False,
    }),
    ('numexpr', '2.8.4', {
        'checksums': ['d5432537418d18691b9115d615d6daa17ee8275baef3edf1afbbf8bc69806147'],
    }),
    ('Bottleneck', '1.3.5', {
        'checksums': ['2c0d27afe45351f6f421893362621804fa7dea14fe29a78eaa52d4323f646de7'],
    }),
    ('pandas', '1.5.3', {
        'preinstallopts': "export PANDAS_CI=0 && ",
        'checksums': ['74a3fd7e5a7ec052f183273dc7b0acd3a863edf7520f5d3a1765c04ffdb3b0b1'],
    }),
    ('mpmath', '1.2.1', {
        'checksums': ['79ffb45cf9f4b101a807595bcb3e72e0396202e0b1d25d689134b48c4216a81a'],
    }),
    ('deap', '1.3.3', {
        'checksums': ['8772f1b0fff042d5e516b0aebac2c706243045aa7d0de8e0b8658f380181cf31'],
        'modulename': 'deap.base',
    }),
]

moduleclass = 'lang'
