easyblock = 'ConfigureMake'

name = 'GEOS'
version = '3.8.1'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://trac.osgeo.org/geos'
description = """GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS)"""

toolchain = {'name': 'GCC', 'version': '10.2.0'}

source_urls = ['https://download.osgeo.org/geos/']
sources = [SOURCELOWER_TAR_BZ2]
checksums = ['4258af4308deb9dbb5047379026b4cd9838513627cb943a44e16c40e42ae17f7']

dependencies = [('Python', '2.7.18')]

builddependencies = [('SWIG', '4.0.2')]

configopts = '--enable-python'

modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'}

sanity_check_paths = {
    'files': ['bin/geos-config', 'lib/libgeos.%s' % SHLIB_EXT, 'lib/libgeos.a', 'include/geos.h'],
    'dirs': ['lib/python%(pyshortver)s/site-packages/geos'],
}

moduleclass = 'math'
