easyblock = 'PythonPackage'

name = 'NiBabel'
version = '2.0.1'

homepage = 'https://nipy.github.io/nibabel'
description = """NiBabel provides read/write access to some common medical and neuroimaging file formats,
 including: ANALYZE (plain, SPM99, SPM2 and later), GIFTI, NIfTI1, NIfTI2, MINC1, MINC2, MGH and ECAT
 as well as Philips PAR/REC. We can read and write Freesurfer geometry, and read Freesurfer morphometry and
 annotation files. There is some very limited support for DICOM. NiBabel is the successor of PyNIfTI."""

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

source_urls = [PYPI_LOWER_SOURCE]
sources = [SOURCELOWER_TAR_GZ]

pyver = '2.7.10'
versionsuffix = '-Python-%s' % pyver

dependencies = [
    ('Python', pyver),
    ('PIL', '1.1.7', versionsuffix),
    ('pydicom', '0.9.9', versionsuffix),
]

pyshortver = '.'.join(pyver.split('.')[:2])
sanity_check_paths = {
    'files': ['bin/nib-dicomfs', 'bin/nib-ls', 'bin/nib-nifti-dx', 'bin/parrec2nii'],
    'dirs': ['lib/python%s/site-packages/nibabel' % pyshortver, 'lib/python%s/site-packages/nisext' % pyshortver],
}

moduleclass = 'vis'
