spack/var/spack/repos/spack_repo/builtin/packages/libspatialindex/package.py
Harmen Stoppels b932c14008
builtin: use api v2.0 and update dir structure (#49275)
* Bump the package API of the `builtin` repo to `v2.0`
* Move `var/spack/repos/builtin` -> `var/spack/repos/spack_repo/builtin`
* Move test repos `var/spack/repos/{builtin.mock,tutorial,...}` -> `var/spack/test_repos/`
* Update package dir names to v2 format (`-` -> `_` etc)
* Change absolute imports `from spack.pkg.builtin.my_pkg ...` to relative imports `from ..my_pkg.package ...`

Users who have a repo on top of builtin should change imports from

```python
from spack.pkg.builtin.my_pkg import MyPkg
```

to

```python
from spack_repo.builtin.packages.my_pkg.package import MyPkg
```

and can configure their editors with

```
PYTHONPATH=$spack/lib/spack:$spack/var/spack/repos
```

[skip-verify-checksums]
2025-05-06 12:05:44 +02:00

29 lines
1023 B
Python

# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
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/archive/refs/tags/1.8.5.tar.gz"
license("MIT")
version("2.1.0", sha256="a04513cea04dd20ab2c9d153c14cc45692805ee496b30619103f7929f6fb81bf")
version("1.9.3", sha256="7b44340a3edc55c11abfc453bb60f148b29f569cef9e1148583e76132e9c7379")
version("1.8.5", sha256="93cce77269612f45287b521d5afdfb245be2b93b8b6438d92f8b9e0bdb37059d")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("cmake@3.13:", when="@2:", type="build")
depends_on("cmake@3.5:", type="build")
@property
def libs(self):
return find_libraries(["libspatialindex_c"], root=self.prefix, recursive=True, shared=True)