- Update to 1.4.0

* Python 3.9+ is now required (#321)
  * Add support for array-based bulk insert with NumPy (#340)
  * Upgrade binary wheels with libspatialindex-2.1.0 (#353)
  * Rename project and other build components to “rtree” (#350)
- Refresh Rtree-opensuse-noarch.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Rtree?expand=0&rev=10
This commit is contained in:
2025-06-03 14:02:37 +00:00
committed by Git OBS Bridge
commit 28221fb54f
9 changed files with 220 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
Rtree-0.9.7.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e
size 44877

View File

@@ -0,0 +1,64 @@
diff -Nru rtree-1.4.0.orig/setup.py rtree-1.4.0/setup.py
--- rtree-1.4.0.orig/setup.py 2025-03-06 00:23:54.000000000 +0100
+++ rtree-1.4.0/setup.py 2025-06-03 09:15:31.930380106 +0200
@@ -4,60 +4,11 @@
from setuptools import setup
from setuptools.command.install import install
from setuptools.dist import Distribution
-from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
# current working directory of this setup.py file
_cwd = Path(__file__).resolve().parent
-
-class bdist_wheel(_bdist_wheel): # type: ignore[misc]
- def finalize_options(self) -> None:
- _bdist_wheel.finalize_options(self)
- self.root_is_pure = False
-
-
-class BinaryDistribution(Distribution): # type: ignore[misc]
- """Distribution which always forces a binary package with platform name"""
-
- def has_ext_modules(foo) -> bool:
- return True
-
-
-class InstallPlatlib(install): # type: ignore[misc]
- def finalize_options(self) -> None:
- """
- Copy the shared libraries and header files into the wheel. Note that
- this will *only* check in `rtree/lib` and `include` rather than
- anywhere on the system so if you are building a wheel you *must* copy
- or symlink the `.so`/`.dll`/`.dylib` files into `rtree/lib` and
- `.h` into `rtree/include`.
- """
- install.finalize_options(self)
- if self.distribution.has_ext_modules():
- self.install_lib = self.install_platlib
-
- # source files to copy
- source_dir = _cwd / "rtree"
-
- # destination for the files in the build directory
- target_dir = Path(self.build_lib) / "rtree"
-
- # copy lib tree
- source_lib = source_dir / "lib"
- if source_lib.is_dir():
- target_lib = target_dir / "lib"
- self.copy_tree(str(source_lib), str(target_lib))
-
- # copy include tree
- source_include = source_dir / "include"
- if source_include.is_dir():
- target_include = target_dir / "include"
- self.copy_tree(str(source_include), str(target_include))
-
-
# See pyproject.toml for other project metadata
setup(
name="rtree",
- distclass=BinaryDistribution,
- cmdclass={"bdist_wheel": bdist_wheel, "install": InstallPlatlib},
)

2
python-Rtree-rpmlintrc Normal file
View File

@@ -0,0 +1,2 @@
# pure python package does not link but access it via ctypes
addFilter("explicit-lib-dependency libspatialindex")

43
python-Rtree.changes Normal file
View File

@@ -0,0 +1,43 @@
-------------------------------------------------------------------
Tue Jun 3 07:16:33 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.4.0
* Python 3.9+ is now required (#321)
* Add support for array-based bulk insert with NumPy (#340)
* Upgrade binary wheels with libspatialindex-2.1.0 (#353)
* Rename project and other build components to “rtree” (#350)
- Refresh Rtree-opensuse-noarch.patch
-------------------------------------------------------------------
Tue Mar 25 08:01:23 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Lowercase metadata directory name.
-------------------------------------------------------------------
Fri Feb 14 03:17:29 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
- Stop using libdir macro, which now doesn't return /usr/lib64.
-------------------------------------------------------------------
Tue Sep 17 11:34:46 UTC 2024 - Nico Krapp <nico.krapp@suse.com>
- Update to 1.3.0
* Upgrade binary wheels with libspatialindex-2.0.0 (#316)
* Fix binary wheels for musllinux (#316)
* Update code style, replace isort and black with ruff, modern numpy rng (#319)
* Remove libsidx version testing (#313)
-------------------------------------------------------------------
Wed May 19 10:29:54 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Use a more sophisticated approach in order to find the correct
runtime dependency for libspatialindex
-------------------------------------------------------------------
Mon May 17 22:22:43 UTC 2021 - Ben Greiner <code@bnavigator.de>
- initial specfile for 0.9.7
- New requirement for spyder 5.0.3
- add Rtree-opensuse-noarch.patch: we don't put spatialindex into a
wheel, so the module is kept pure.

78
python-Rtree.spec Normal file
View File

@@ -0,0 +1,78 @@
#
# spec file for package python-Rtree
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-Rtree
Version: 1.4.0
Release: 0
Summary: R-Tree spatial index for Python GIS
License: MIT
URL: https://github.com/Toblerity/rtree
Source: https://files.pythonhosted.org/packages/source/R/Rtree/rtree-%{version}.tar.gz
Source99: python-Rtree-rpmlintrc
# PATCH-FIX-OPENSUSE Rtree-opensuse-noarch.patch -- we don't put spatialindex into a wheel so the module is kept pure. <code@bnavigator.de>
Patch0: Rtree-opensuse-noarch.patch
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
# only for the shlib requirement, no headers needed
BuildRequires: spatialindex-devel
BuildRequires: python-rpm-macros
# Since this is noarch, _libdir doesn't work for 64 bit arches
Requires: %(rpm -q --queryformat "%%{NAME}" -f $(readlink -f /usr/lib*/libspatialindex.so))
Provides: python-rtree = %{version}-%{release}
BuildArch: noarch
%python_subpackages
%description
A ctypes Python wrapper of libspatialindex that provides a number of advanced
spatial indexing features for the spatially curious Python user.
* Nearest neighbor search
* Intersection search
* Multi-dimensional indexes
* Clustered indexes (store Python pickles directly with index entries)
* Bulk loading
* Deletion
* Disk serialization
* Custom storage implementation (to implement spatial indexing in ZODB,
for example)
%prep
%autosetup -p1 -n rtree-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc README.md
%license LICENSE.txt
%{python_sitelib}/rtree
%{python_sitelib}/rtree-%{version}.dist-info
%changelog

3
rtree-1.3.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b36e9dd2dc60ffe3d02e367242d2c26f7281b00e1aaf0c39590442edaaadd916
size 48190

3
rtree-1.4.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d97c7c5dcf25f6c0599c76d9933368c6a8d7238f2c1d00e76f1a69369ca82a0
size 50789