easyblock = 'PythonPackage'

name = 'basemap'
version = '1.0.7'

homepage = 'http://matplotlib.org/basemap/'
description = """The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python"""

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

sources = [SOURCE_TAR_GZ]
source_urls = ['https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-%(version)s']

prebuildopts = 'GEOS_DIR=$EBROOTGEOS'
preinstallopts = prebuildopts

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

dependencies = [
    ('Python', pythonver),
    ('matplotlib', '1.5.0', versionsuffix),
    ('GEOS', '3.5.0', versionsuffix),
    ('PIL', '1.1.7', versionsuffix),
]

sanity_check_paths = {
    'files':  ['lib/python%s/site-packages/_geoslib.%s' % (pythonshortver, SHLIB_EXT)],
    'dirs':  ['lib/python%s/site-packages/mpl_toolkits/basemap' % pythonshortver]
}

options = {'modulename': 'mpl_toolkits.basemap'}

moduleclass = 'vis'
