easyblock = 'PythonBundle'

name = 'SciPy-bundle'
version = '2020.11'

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

toolchain = {'name': 'foss', 'version': '2021b-o'}
toolchainopts = {'pic': True, 'lowopt': True}

builddependencies = [('hypothesis', '6.13.1')]

dependencies = [
    ('Python', '3.8.6'),
    ('pybind11', '2.6.0'),  # required by scipy
]

use_pip = True

exts_default_options = {'source_urls': [PYPI_SOURCE]}

# order is important!
exts_list = [
    ('numpy', '1.20.3', {
        'sources': [SOURCE_ZIP],
        'patches': [
            'numpy-1.20.3_skip-ppc-long-complex-test.patch',
            'numpy-1.20.3_xfail-test-nan.patch',
            'numpy-1.20.3_fix-target-test-ccompiler-opt.patch',
        ],
        'checksums': [
            'e55185e51b18d788e49fe8305fd73ef4470596b33fc2c1ceb304566b99c71a69',  # numpy-1.20.3.zip
            # numpy-1.20.3_skip-ppc-long-complex-test.patch
            '2f9a12e3a352b39076db84a7622fc8f4796abd3cb7f97f71958a495e864659a4',
            'f0ce961f7d79551598e23050d92f46e827e300f6a7e5a6112e58efcc10385d4d',  # numpy-1.20.3_xfail-test-nan.patch
            # numpy-1.20.3_fix-target-test-ccompiler-opt.patch
            '3d84e8b7d48387778974a5f6ae342a690ab5989547206b6add9d9667f8d7572a',
        ],
    }),
    ('scipy', '1.5.4', {
        'checksums': ['4a453d5e5689de62e5d38edf40af3f17560bfd63c9c5bd228c18c1f99afa155b'],
    }),
    ('mpi4py', '3.0.3', {
        'checksums': ['012d716c8b9ed1e513fcc4b18e5af16a8791f51e6d1716baccf988ad355c5a1f'],
    }),
    ('pandas', '1.1.4', {
        'checksums': ['a979d0404b135c63954dea79e6246c45dd45371a88631cdbb4877d844e6de3b6'],
    }),
    ('mpmath', '1.1.0', {
        'checksums': ['fc17abe05fbab3382b61a123c398508183406fa132e0223874578e20946499f6'],
    }),
    ('deap', '1.3.1', {
        'checksums': ['11f54493ceb54aae10dde676577ef59fc52d52f82729d5a12c90b0813c857a2f'],
    }),
]

sanity_pip_check = True

moduleclass = 'lang'
