easyblock = 'PythonPackage'

name = 'mympingpong'
version = '0.8.0'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://github.com/hpcugent/mympingpong'
description = """A mpi4py based random pair pingpong network stress test."""

toolchain = {'name': 'intel', 'version': '2017a'}

source_urls = [PYPI_SOURCE]
sources = [SOURCE_TAR_GZ]
checksums = ['ebc056374a071e49cd13c49c4d5274cf4eee6eb68a7c9033ba2929db27b8bfac']

dependencies = [
    ('Python', '2.7.13'),
    ('vsc-base', '2.5.8', '', True),
    ('vsc-mympirun', '4.0.2', '', True),
    ('matplotlib', '2.0.2', versionsuffix),
    ('h5py', '2.7.1', versionsuffix),
    ('mpi4py', '2.0.0', versionsuffix + '-timed-pingpong'),
    ('lxml', '4.0.0', versionsuffix),
    ('hwloc', '1.11.8'),
]

preinstallopts = "sed -i 's/mpi4py < 2.0.0/mpi4py/g' setup.py && "

options = {'modulename': 'vsc.mympingpong'}

sanity_check_paths = {
    'files': ['bin/mympingpong', 'bin/mympingponganalysis'],
    'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

moduleclass = 'perf'
