easyblock = 'Binary'

name = 'ELIC'
version = '0.2'
versionsuffix = '-Python-%(pyver)s'

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

toolchain = {'name': 'foss', 'version': '2018b'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/ESMValGroup/ESMValTool/archive/']
sources = [{'filename': 'ESMValTool.tar.gz', 'download_filename': 'v2.0a1.tar.gz'}]

dependencies = [
    ('Python', '3.6.6'),
    ('ELIC', '0.1', versionsuffix),
]

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

exts_classmap = {
    'BayesianTools': 'RPackage'
}
exts_list = [
    # Python deps, order is important!
    ('certifi', '2019.3.9', {
        'source_urls': ['https://pypi.python.org/packages/source/c/certifi/'],
    }),
    #('salem', '0.2.4', {
    #    'modulename': 'salem',
    #    'source_tmpl': 'v%(version)s.tar.gz',
    #    'source_urls': ['https://github.com/fmaussion/salem/archive'],
    #}),
    ################################
    #('scitools-iris', '2.2.0', {
    #    'modulename': 'iris',
    #    'source_tmpl': 'v%(version)s.tar.gz',
    #    'source_urls': ['https://github.com/SciTools/iris/archive/'],
    #    'checksums': ['e4b52e43da16b72af9ccbcb4d53bc401'],
    #}),
    ################################
    # R extension
    ('BayesianTools', '0.1.6', {
        'source_tmpl': '%(name)s_%(version)s.tar.gz',
        'source_urls': [
            'http://cran.r-project.org/src/contrib/Archive/sf',
            'http://cran.r-project.org/src/contrib/',
            'http://cran.freestatistics.org/src/contrib',
        ],
    }),
]

sanity_check_paths = {
    'files': ['ESMValTool.tar.gz'],
    'dirs': [],
}

modextrapaths = {
    'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages',
    'PYTHONUSERBASE': '',
    #'R_LIBS': '',
}

moduleclass = 'numlib'
