easyblock = "PythonPackage"

name = 'pyTables'
version = '3.2.2'

homepage = 'http://www.pytables.org'
description = """PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope
 with extremely large amounts of data. PyTables is built on top of the HDF5 library, using the Python language and the
 NumPy package. It features an object-oriented interface that, combined with C extensions for the performance-critical
 parts of the code (generated using Cython), makes it a fast, yet extremely easy to use tool for interactively browse,
 process and search very large amounts of data. One important feature of PyTables is that it optimizes memory and disk
 resources so that data takes much less space (specially if on-flight compression is used) than other solutions such as
 relational or object oriented databases."""

toolchain = {'name': 'intel', 'version': '2015b'}
toolchainopts = {'usempi': True}

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

patches = ['pyTables-%(version)s-fix-libs.patch']

python = 'Python'
pythonver = '2.7.10'
pythonshortver = '.'.join(pythonver.split('.')[0:2])
versionsuffix = '-%s-%s' % (python, pythonver)

dependencies = [
    (python, pythonver),
    ('numpy', '1.10.4', versionsuffix),
    ('numexpr', '2.4.6', versionsuffix),
    ('HDF5', '1.8.13'),
]

sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['pt2to3', 'ptdump', 'ptrepack']],
    'dirs': ['lib/python%s/site-packages' % pythonshortver],
}

options = {'modulename': 'tables'}

moduleclass = 'data'
