From d62fd120e8783617c59cbf3719b0cc9c65eb041176fcfd980e413967aea87f04 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 10 Sep 2025 09:12:42 +0000 Subject: [PATCH] - Update to 1.4.1 * Rename main branch references by :user:`mwtoews` in (#356) * Fixing an incorrect reassignment in nearest_v and intersection_v by @Atilleusz in (#358) * Add spatialindex version to tests, add common pytest configuration by @mwtoews in (#360) * Refactor array-loading methods, add tests by @mwtoews in (#361) * Minor refactor of code blocks in docs by @mwtoews in (#362) * Resolve some issues in the batch API by @FreddieWitherden in (#367) * Fix #369 (load libspatialindex without changing cwd) by @remicres in (#370) * arm64 wheels on Windows by @w8sl in (#378) and (#371) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Rtree?expand=0&rev=12 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + Rtree-opensuse-noarch.patch | 64 ++++++++++++++++++++++++++++++ python-Rtree-rpmlintrc | 2 + python-Rtree.changes | 59 ++++++++++++++++++++++++++++ python-Rtree.spec | 78 +++++++++++++++++++++++++++++++++++++ rtree-1.4.1.tar.gz | 3 ++ 7 files changed, 230 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Rtree-opensuse-noarch.patch create mode 100644 python-Rtree-rpmlintrc create mode 100644 python-Rtree.changes create mode 100644 python-Rtree.spec create mode 100644 rtree-1.4.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Rtree-opensuse-noarch.patch b/Rtree-opensuse-noarch.patch new file mode 100644 index 0000000..58365ed --- /dev/null +++ b/Rtree-opensuse-noarch.patch @@ -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}, + ) diff --git a/python-Rtree-rpmlintrc b/python-Rtree-rpmlintrc new file mode 100644 index 0000000..0302807 --- /dev/null +++ b/python-Rtree-rpmlintrc @@ -0,0 +1,2 @@ +# pure python package does not link but access it via ctypes +addFilter("explicit-lib-dependency libspatialindex") diff --git a/python-Rtree.changes b/python-Rtree.changes new file mode 100644 index 0000000..a517b47 --- /dev/null +++ b/python-Rtree.changes @@ -0,0 +1,59 @@ +------------------------------------------------------------------- +Wed Sep 10 05:53:17 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 1.4.1 + * Rename main branch references by :user:`mwtoews` in (#356) + * Fixing an incorrect reassignment in nearest_v and intersection_v + by @Atilleusz in (#358) + * Add spatialindex version to tests, add common pytest configuration + by @mwtoews in (#360) + * Refactor array-loading methods, add tests by @mwtoews in (#361) + * Minor refactor of code blocks in docs by @mwtoews in (#362) + * Resolve some issues in the batch API by @FreddieWitherden in (#367) + * Fix #369 (load libspatialindex without changing cwd) + by @remicres in (#370) + * arm64 wheels on Windows by @w8sl in (#378) and (#371) + +------------------------------------------------------------------- +Tue Jun 3 07:16:33 UTC 2025 - John Paul Adrian Glaubitz + +- 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 + +- Lowercase metadata directory name. + +------------------------------------------------------------------- +Fri Feb 14 03:17:29 UTC 2025 - Steve Kowalik + +- 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 + +- 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 + +- 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 + +- 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. diff --git a/python-Rtree.spec b/python-Rtree.spec new file mode 100644 index 0000000..03a1d60 --- /dev/null +++ b/python-Rtree.spec @@ -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.1 +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. +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 diff --git a/rtree-1.4.1.tar.gz b/rtree-1.4.1.tar.gz new file mode 100644 index 0000000..82e9218 --- /dev/null +++ b/rtree-1.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6b1b3550881e57ebe530cc6cffefc87cd9bf49c30b37b894065a9f810875e46 +size 52425