py-rtree: add new version, fix runtime env (#24862)

This commit is contained in:
Adam J. Stewart 2021-07-19 05:22:03 -05:00 committed by GitHub
parent b074dc17b1
commit be90bdc355
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 10 deletions

View File

@ -10,6 +10,15 @@ class Libspatialindex(CMakePackage):
"""C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API."""
homepage = "https://libspatialindex.org/"
url = "https://github.com/libspatialindex/libspatialindex/tarball/1.8.5"
url = "https://github.com/libspatialindex/libspatialindex/archive/refs/tags/1.8.5.tar.gz"
version('1.8.5', sha256='271f0d1425c527fd7d8b4be45b27e9383b244047b5918225877105616e7c0ad2')
version('1.9.3', sha256='7b44340a3edc55c11abfc453bb60f148b29f569cef9e1148583e76132e9c7379')
version('1.8.5', sha256='93cce77269612f45287b521d5afdfb245be2b93b8b6438d92f8b9e0bdb37059d')
depends_on('cmake@3.5.0:', type='build')
@property
def libs(self):
return find_libraries(
['libspatialindex_c'], root=self.prefix, recursive=True, shared=True
)

View File

@ -7,18 +7,21 @@
class PyRtree(PythonPackage):
"""Python interface to the RTREE.4 Library."""
homepage = "http://toblerity.org/rtree/"
"""R-Tree spatial index for Python GIS."""
homepage = "https://github.com/Toblerity/rtree"
pypi = "Rtree/Rtree-0.8.3.tar.gz"
version('0.9.7', sha256='be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e')
version('0.8.3', sha256='6cb9cf3000963ea6a3db777a597baee2bc55c4fc891e4f1967f262cc96148649')
depends_on('python@3:', when='@0.9.4:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('libspatialindex')
depends_on('py-wheel', when='@0.9.4:', type='build')
depends_on('libspatialindex@1.8.5:')
def setup_build_environment(self, env):
lib = self.spec['libspatialindex'].prefix.lib
env.set('SPATIALINDEX_LIBRARY',
join_path(lib, 'libspatialindex.%s' % dso_suffix))
env.set('SPATIALINDEX_C_LIBRARY',
join_path(lib, 'libspatialindex_c.%s' % dso_suffix))
env.set('SPATIALINDEX_C_LIBRARY', self.spec['libspatialindex'].libs[0])
def setup_run_environment(self, env):
self.setup_build_environment(env)