easyblock = 'CMakeMake'

name = 'CDAT'
version = '8.1'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://cdat.llnl.gov/'
description = """CDAT is a powerful and complete front-end to a rich set of visual-data 
 exploration and analysis capabilities well suited for data analysis problems."""

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

source_urls = ['https://github.com/CDAT/cdat/archive/']
sources = ['v%(version)s.tar.gz']

builddependencies = [('CMake', '3.13.3')]
dependencies = [
    ('Python', '3.7.2'),
    ('ELIC_Python', '1', versionsuffix),
]

separate_build_dir = True

configopts = "-DCDAT_BUILD_MODE=LEAN -DCDAT_BUILD_CMOR=ON -DCDAT_BUILD_PARALLEL=ON"

sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['bufr_copy', 'bufr_dump', 'bufr_filter', 'bufr_ls',
                                     'codes_count', 'codes_info', 'codes_split_file',
                                     'grib_copy', 'grib_dump', 'grib_filter', 'grib_ls']],
    'dirs': [],
}

moduleclass = 'tools'
