#6 Update to 1.0.0 and use pyproject-rpm-macros
Merged 2 years ago by music. Opened 2 years ago by music.
rpms/ music/python-Rtree v1.0.0  into  rawhide

file modified
+1
@@ -5,3 +5,4 @@ 

  /Rtree-0.9.3.tar.gz

  /Rtree-0.9.4.tar.gz

  /Rtree-0.9.7.tar.gz

+ /Rtree-1.0.0.tar.gz

@@ -1,409 +0,0 @@ 

- From 2e610c5da1aca8ef1b109fe8fe8236f7c19b0a8a Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Mon, 21 Feb 2022 09:44:39 -0500

- Subject: [PATCH 1/7] =?UTF-8?q?Correct=20(uint32=5Ft*)=E2=86=94(size=5Ft*)?=

-  =?UTF-8?q?=20prototype=20mismatch?=

- MIME-Version: 1.0

- Content-Type: text/plain; charset=UTF-8

- Content-Transfer-Encoding: 8bit

- 

- In the ctypes binding for Index_CreateWithStream, change the last

- parameter from ctypes.POINTER(ctypes.c_uint32) to

- ctypes.POINTER(ctypes.c_size_t) for consistency with libspatialindex.

- 

- This fixes the test failure on 64-bit big-endian architectures that

- prompted #220. Other inconsistencies noted in that issue will be fixed

- in additional commits.

- 

- https://github.com/Toblerity/rtree/issues/220#issue-1145043392

- ---

-  rtree/core.py | 2 +-

-  1 file changed, 1 insertion(+), 1 deletion(-)

- 

- diff --git a/rtree/core.py b/rtree/core.py

- index ae647f7b..95be034f 100644

- --- a/rtree/core.py

- +++ b/rtree/core.py

- @@ -99,7 +99,7 @@ def free_error_msg_ptr(result, func, cargs):

-                              ctypes.POINTER(ctypes.POINTER(ctypes.c_double)),

-                              ctypes.POINTER(ctypes.c_uint32),

-                              ctypes.POINTER(ctypes.POINTER(ctypes.c_ubyte)),

- -                            ctypes.POINTER(ctypes.c_uint32))

- +                            ctypes.POINTER(ctypes.c_size_t))

-  

-  rt.Index_CreateWithStream.argtypes = [ctypes.c_void_p, NEXTFUNC]

-  rt.Index_CreateWithStream.restype = ctypes.c_void_p

- 

- From b2a2c80fc8aa50ef02fb48a04b6a1b43aed7cd90 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Mon, 21 Feb 2022 09:50:30 -0500

- Subject: [PATCH 2/7] =?UTF-8?q?Set=20=E2=80=A6.argtypes=20=3D=20[]=20on=20?=

-  =?UTF-8?q?all=20=E2=80=A6(void)=20functions?=

- MIME-Version: 1.0

- Content-Type: text/plain; charset=UTF-8

- Content-Transfer-Encoding: 8bit

- 

- In the libspatialite API, Error_GetLastErrorNum,

- Error_GetLastErrorMethod, and Error_GetErrorCount all take no parameters

- “…(void)”. Add “….argtypes = []” to the ctypes bindings for

- Error_GetLastErrorNum and Error_GetLastErrorMethod to match the other

- two. This tells ctypes that they should have no parameters, “…(void)” in

- C, rather than unspecified parameters, “…()” in C.'

- 

- https://github.com/Toblerity/rtree/issues/220#issuecomment-1046256119

- ---

-  rtree/core.py | 2 ++

-  1 file changed, 2 insertions(+)

- 

- diff --git a/rtree/core.py b/rtree/core.py

- index 95be034f..180a9773 100644

- --- a/rtree/core.py

- +++ b/rtree/core.py

- @@ -74,12 +74,14 @@ def free_error_msg_ptr(result, func, cargs):

-  # load the shared library by looking in likely places

-  rt = finder.load()

-  

- +rt.Error_GetLastErrorNum.argtypes = []

-  rt.Error_GetLastErrorNum.restype = ctypes.c_int

-  

-  rt.Error_GetLastErrorMsg.argtypes = []

-  rt.Error_GetLastErrorMsg.restype = ctypes.POINTER(ctypes.c_char)

-  rt.Error_GetLastErrorMsg.errcheck = free_error_msg_ptr

-  

- +rt.Error_GetLastErrorMethod.argtypes = []

-  rt.Error_GetLastErrorMethod.restype = ctypes.POINTER(ctypes.c_char)

-  rt.Error_GetLastErrorMethod.errcheck = free_returned_char_p

-  

- 

- From 0b729154141b47f13b4f9bfd0c81c5152a64cb40 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Mon, 21 Feb 2022 09:59:37 -0500

- Subject: [PATCH 3/7] =?UTF-8?q?Correct=20c=5Fuint/c=5Fuint32=E2=86=94c=5Fs?=

-  =?UTF-8?q?ize=5Ft=20prototype=20mismatches?=

- MIME-Version: 1.0

- Content-Type: text/plain; charset=UTF-8

- Content-Transfer-Encoding: 8bit

- 

- In SIDX_NewBuffer and Index_InsertTPData bindings, fix use of c_uint

- (unsigned int) or c_uint32 (uint32_t) for value parameters that should be

- c_size_t (size_t) for consistency with the libspatialite C API.

- 

- https://github.com/Toblerity/rtree/issues/220#issuecomment-1046256534

- ---

-  rtree/core.py | 4 ++--

-  1 file changed, 2 insertions(+), 2 deletions(-)

- 

- diff --git a/rtree/core.py b/rtree/core.py

- index 180a9773..606786b1 100644

- --- a/rtree/core.py

- +++ b/rtree/core.py

- @@ -518,7 +518,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_GetIndexID.restype = ctypes.c_int64

-  rt.IndexProperty_GetIndexID.errcheck = check_value

-  

- -rt.SIDX_NewBuffer.argtypes = [ctypes.c_uint]

- +rt.SIDX_NewBuffer.argtypes = [ctypes.c_size_t]

-  rt.SIDX_NewBuffer.restype = ctypes.c_void_p

-  rt.SIDX_NewBuffer.errcheck = check_void

-  

- @@ -541,7 +541,7 @@ def free_error_msg_ptr(result, func, cargs):

-                                        ctypes.c_double,

-                                        ctypes.c_uint32,

-                                        ctypes.POINTER(ctypes.c_ubyte),

- -                                      ctypes.c_uint32]

- +                                      ctypes.c_size_t]

-      rt.Index_InsertTPData.restype = ctypes.c_int

-      rt.Index_InsertTPData.errcheck = check_return

-  

- 

- From cd063c406cbdd7e9348fbc2f8a970c47eb34fd05 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Mon, 21 Feb 2022 10:03:21 -0500

- Subject: [PATCH 4/7] Always use c_int to wrap enums

- MIME-Version: 1.0

- Content-Type: text/plain; charset=UTF-8

- Content-Transfer-Encoding: 8bit

- 

- Change IndexProperty_SetIndexType to use c_int instead of c_int32 for

- the “enum RTIndexType” parameter, and change

- IndexProperty_SetIndexVariant and IndexProperty_SetIndexStorage to use

- c_int instead of c_uint32 for their “enum RTIndexVariant” and

- “enum RTStorageType” parameters, respectively.

- 

- This aligns these prototypes with the prevailing of c_int in these

- bindings to wrap enums, elsewhere in the bindings for these particular

- enum types, and even in the getters corresponding to these three

- particular setters.

- 

- https://github.com/Toblerity/rtree/issues/220#issuecomment-1046256648

- ---

-  rtree/core.py | 6 +++---

-  1 file changed, 3 insertions(+), 3 deletions(-)

- 

- diff --git a/rtree/core.py b/rtree/core.py

- index 606786b1..a75d9b8b 100644

- --- a/rtree/core.py

- +++ b/rtree/core.py

- @@ -295,7 +295,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_Destroy.restype = None

-  rt.IndexProperty_Destroy.errcheck = check_void_done

-  

- -rt.IndexProperty_SetIndexType.argtypes = [ctypes.c_void_p, ctypes.c_int32]

- +rt.IndexProperty_SetIndexType.argtypes = [ctypes.c_void_p, ctypes.c_int]

-  rt.IndexProperty_SetIndexType.restype = ctypes.c_int

-  rt.IndexProperty_SetIndexType.errcheck = check_return

-  

- @@ -311,7 +311,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_GetDimension.restype = ctypes.c_int

-  rt.IndexProperty_GetDimension.errcheck = check_value

-  

- -rt.IndexProperty_SetIndexVariant.argtypes = [ctypes.c_void_p, ctypes.c_uint32]

- +rt.IndexProperty_SetIndexVariant.argtypes = [ctypes.c_void_p, ctypes.c_int]

-  rt.IndexProperty_SetIndexVariant.restype = ctypes.c_int

-  rt.IndexProperty_SetIndexVariant.errcheck = check_return

-  

- @@ -319,7 +319,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_GetIndexVariant.restype = ctypes.c_int

-  rt.IndexProperty_GetIndexVariant.errcheck = check_value

-  

- -rt.IndexProperty_SetIndexStorage.argtypes = [ctypes.c_void_p, ctypes.c_uint32]

- +rt.IndexProperty_SetIndexStorage.argtypes = [ctypes.c_void_p, ctypes.c_int]

-  rt.IndexProperty_SetIndexStorage.restype = ctypes.c_int

-  rt.IndexProperty_SetIndexStorage.errcheck = check_return

-  

- 

- From 42a3373abff402e6e06b0e2a74090329bec43bf4 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Mon, 21 Feb 2022 10:13:17 -0500

- Subject: [PATCH 5/7] =?UTF-8?q?Fix=20int=E2=86=94uint32=5Ft=20prototype=20?=

-  =?UTF-8?q?mismatches=20in=20property=20getters?=

- MIME-Version: 1.0

- Content-Type: text/plain; charset=UTF-8

- Content-Transfer-Encoding: 8bit

- 

- Fix a number of ctypes bindings for index property getters in which the

- return type was given as c_int (int), but the libspatialite API has

- c_uint32 (uint32_t).

- 

- https://github.com/Toblerity/rtree/issues/220#issuecomment-1046256746

- ---

-  rtree/core.py | 26 +++++++++++++-------------

-  1 file changed, 13 insertions(+), 13 deletions(-)

- 

- diff --git a/rtree/core.py b/rtree/core.py

- index a75d9b8b..42007e2b 100644

- --- a/rtree/core.py

- +++ b/rtree/core.py

- @@ -308,7 +308,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetDimension.errcheck = check_return

-  

-  rt.IndexProperty_GetDimension.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetDimension.restype = ctypes.c_int

- +rt.IndexProperty_GetDimension.restype = ctypes.c_uint32

-  rt.IndexProperty_GetDimension.errcheck = check_value

-  

-  rt.IndexProperty_SetIndexVariant.argtypes = [ctypes.c_void_p, ctypes.c_int]

- @@ -332,7 +332,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetIndexCapacity.errcheck = check_return

-  

-  rt.IndexProperty_GetIndexCapacity.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetIndexCapacity.restype = ctypes.c_int

- +rt.IndexProperty_GetIndexCapacity.restype = ctypes.c_uint32

-  rt.IndexProperty_GetIndexCapacity.errcheck = check_value

-  

-  rt.IndexProperty_SetLeafCapacity.argtypes = [ctypes.c_void_p, ctypes.c_uint32]

- @@ -340,7 +340,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetLeafCapacity.errcheck = check_return

-  

-  rt.IndexProperty_GetLeafCapacity.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetLeafCapacity.restype = ctypes.c_int

- +rt.IndexProperty_GetLeafCapacity.restype = ctypes.c_uint32

-  rt.IndexProperty_GetLeafCapacity.errcheck = check_value

-  

-  rt.IndexProperty_SetPagesize.argtypes = [ctypes.c_void_p, ctypes.c_uint32]

- @@ -348,7 +348,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetPagesize.errcheck = check_return

-  

-  rt.IndexProperty_GetPagesize.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetPagesize.restype = ctypes.c_int

- +rt.IndexProperty_GetPagesize.restype = ctypes.c_uint32

-  rt.IndexProperty_GetPagesize.errcheck = check_value

-  

-  rt.IndexProperty_SetLeafPoolCapacity.argtypes = \

- @@ -357,7 +357,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetLeafPoolCapacity.errcheck = check_return

-  

-  rt.IndexProperty_GetLeafPoolCapacity.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetLeafPoolCapacity.restype = ctypes.c_int

- +rt.IndexProperty_GetLeafPoolCapacity.restype = ctypes.c_uint32

-  rt.IndexProperty_GetLeafPoolCapacity.errcheck = check_value

-  

-  rt.IndexProperty_SetIndexPoolCapacity.argtypes = \

- @@ -366,7 +366,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetIndexPoolCapacity.errcheck = check_return

-  

-  rt.IndexProperty_GetIndexPoolCapacity.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetIndexPoolCapacity.restype = ctypes.c_int

- +rt.IndexProperty_GetIndexPoolCapacity.restype = ctypes.c_uint32

-  rt.IndexProperty_GetIndexPoolCapacity.errcheck = check_value

-  

-  rt.IndexProperty_SetRegionPoolCapacity.argtypes = \

- @@ -375,7 +375,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetRegionPoolCapacity.errcheck = check_return

-  

-  rt.IndexProperty_GetRegionPoolCapacity.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetRegionPoolCapacity.restype = ctypes.c_int

- +rt.IndexProperty_GetRegionPoolCapacity.restype = ctypes.c_uint32

-  rt.IndexProperty_GetRegionPoolCapacity.errcheck = check_value

-  

-  rt.IndexProperty_SetPointPoolCapacity.argtypes = \

- @@ -384,7 +384,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetPointPoolCapacity.errcheck = check_return

-  

-  rt.IndexProperty_GetPointPoolCapacity.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetPointPoolCapacity.restype = ctypes.c_int

- +rt.IndexProperty_GetPointPoolCapacity.restype = ctypes.c_uint32

-  rt.IndexProperty_GetPointPoolCapacity.errcheck = check_value

-  

-  rt.IndexProperty_SetBufferingCapacity.argtypes = \

- @@ -393,7 +393,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetBufferingCapacity.errcheck = check_return

-  

-  rt.IndexProperty_GetBufferingCapacity.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetBufferingCapacity.restype = ctypes.c_int

- +rt.IndexProperty_GetBufferingCapacity.restype = ctypes.c_uint32

-  rt.IndexProperty_GetBufferingCapacity.errcheck = check_value

-  

-  rt.IndexProperty_SetEnsureTightMBRs.argtypes = \

- @@ -402,7 +402,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetEnsureTightMBRs.errcheck = check_return

-  

-  rt.IndexProperty_GetEnsureTightMBRs.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetEnsureTightMBRs.restype = ctypes.c_int

- +rt.IndexProperty_GetEnsureTightMBRs.restype = ctypes.c_uint32

-  rt.IndexProperty_GetEnsureTightMBRs.errcheck = check_value

-  

-  rt.IndexProperty_SetOverwrite.argtypes = [ctypes.c_void_p, ctypes.c_uint32]

- @@ -410,7 +410,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetOverwrite.errcheck = check_return

-  

-  rt.IndexProperty_GetOverwrite.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetOverwrite.restype = ctypes.c_int

- +rt.IndexProperty_GetOverwrite.restype = ctypes.c_uint32

-  rt.IndexProperty_GetOverwrite.errcheck = check_value

-  

-  rt.IndexProperty_SetNearMinimumOverlapFactor.argtypes = \

- @@ -419,7 +419,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetNearMinimumOverlapFactor.errcheck = check_return

-  

-  rt.IndexProperty_GetNearMinimumOverlapFactor.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetNearMinimumOverlapFactor.restype = ctypes.c_int

- +rt.IndexProperty_GetNearMinimumOverlapFactor.restype = ctypes.c_uint32

-  rt.IndexProperty_GetNearMinimumOverlapFactor.errcheck = check_value

-  

-  rt.IndexProperty_SetWriteThrough.argtypes = [ctypes.c_void_p, ctypes.c_uint32]

- @@ -427,7 +427,7 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.IndexProperty_SetWriteThrough.errcheck = check_return

-  

-  rt.IndexProperty_GetWriteThrough.argtypes = [ctypes.c_void_p]

- -rt.IndexProperty_GetWriteThrough.restype = ctypes.c_int

- +rt.IndexProperty_GetWriteThrough.restype = ctypes.c_uint32

-  rt.IndexProperty_GetWriteThrough.errcheck = check_value

-  

-  rt.IndexProperty_SetFillFactor.argtypes = [ctypes.c_void_p, ctypes.c_double]

- 

- From 70338ed3bf65c9d396781f9aa43a842eb01bd33f Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Mon, 21 Feb 2022 10:15:50 -0500

- Subject: [PATCH 6/7] Fix incomplete binding for Index_TPIntersects_count

- 

- Add argument types and error checking callback.

- 

- https://github.com/Toblerity/rtree/issues/220#issuecomment-1046256780

- ---

-  rtree/core.py | 2 ++

-  1 file changed, 2 insertions(+)

- 

- diff --git a/rtree/core.py b/rtree/core.py

- index 42007e2b..040c2170 100644

- --- a/rtree/core.py

- +++ b/rtree/core.py

- @@ -594,6 +594,8 @@ def free_error_msg_ptr(result, func, cargs):

-                                              ctypes.c_double,

-                                              ctypes.c_uint32,

-                                              ctypes.POINTER(ctypes.c_uint64)]

- +    rt.Index_TPIntersects_count.restype = ctypes.c_int

- +    rt.Index_TPIntersects_count.errcheck = check_return

-  

-      rt.Index_TPNearestNeighbors_id.argtypes = [

-          ctypes.c_void_p,

- 

- From 2c7a33cb09b4a2884d58cef65187444dfa6f65bb Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Tue, 22 Feb 2022 09:16:16 -0500

- Subject: [PATCH 7/7] Work around libspatialite ABI change in 1.9.0

- 

- ---

-  rtree/core.py | 35 ++++++++++++++++++++++++-----------

-  1 file changed, 24 insertions(+), 11 deletions(-)

- 

- diff --git a/rtree/core.py b/rtree/core.py

- index 040c2170..888a8955 100644

- --- a/rtree/core.py

- +++ b/rtree/core.py

- @@ -74,6 +74,10 @@ def free_error_msg_ptr(result, func, cargs):

-  # load the shared library by looking in likely places

-  rt = finder.load()

-  

- +rt.SIDX_Version.argtypes = []

- +rt.SIDX_Version.restype = ctypes.POINTER(ctypes.c_char)

- +rt.SIDX_Version.errcheck = free_returned_char_p  # type: ignore

- +

-  rt.Error_GetLastErrorNum.argtypes = []

-  rt.Error_GetLastErrorNum.restype = ctypes.c_int

-  

- @@ -95,13 +99,26 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.Index_Create.restype = ctypes.c_void_p

-  rt.Index_Create.errcheck = check_void

-  

- -NEXTFUNC = ctypes.CFUNCTYPE(ctypes.c_int,

- -                            ctypes.POINTER(ctypes.c_int64),

- -                            ctypes.POINTER(ctypes.POINTER(ctypes.c_double)),

- -                            ctypes.POINTER(ctypes.POINTER(ctypes.c_double)),

- -                            ctypes.POINTER(ctypes.c_uint32),

- -                            ctypes.POINTER(ctypes.POINTER(ctypes.c_ubyte)),

- -                            ctypes.POINTER(ctypes.c_size_t))

- +_nDataLength_size_t = True

- +try:

- +    _major, _minor, _patch = (

- +        int(part) for part in rt.SIDX_Version().decode("ascii").split(".")

- +    )

- +except (ValueError, UnicodeDecodeError):

- +    pass  # weird version; assume latest ABI

- +else:

- +    if (_major, _minor, _patch) < (1, 9, 0):

- +        # Headers had size_t*, but implementation had uint32_t*

- +        _nDataLength_size_t = False

- +NEXTFUNC = ctypes.CFUNCTYPE(

- +    ctypes.c_int,

- +    ctypes.POINTER(ctypes.c_int64),

- +    ctypes.POINTER(ctypes.POINTER(ctypes.c_double)),

- +    ctypes.POINTER(ctypes.POINTER(ctypes.c_double)),

- +    ctypes.POINTER(ctypes.c_uint32),

- +    ctypes.POINTER(ctypes.POINTER(ctypes.c_ubyte)),

- +    ctypes.POINTER(ctypes.c_size_t if _nDataLength_size_t else ctypes.c_uint32),

- +)

-  

-  rt.Index_CreateWithStream.argtypes = [ctypes.c_void_p, NEXTFUNC]

-  rt.Index_CreateWithStream.restype = ctypes.c_void_p

- @@ -525,10 +542,6 @@ def free_error_msg_ptr(result, func, cargs):

-  rt.SIDX_DeleteBuffer.argtypes = [ctypes.c_void_p]

-  rt.SIDX_DeleteBuffer.restype = None

-  

- -rt.SIDX_Version.argtypes = []

- -rt.SIDX_Version.restype = ctypes.POINTER(ctypes.c_char)

- -rt.SIDX_Version.errcheck = free_returned_char_p

- -

-  # TPR-Tree API

-  try:

-      rt.Index_InsertTPData.argtypes = [ctypes.c_void_p,

@@ -1,12 +0,0 @@ 

- diff -Naur Rtree-0.9.7-original/setup.py Rtree-0.9.7/setup.py

- --- Rtree-0.9.7-original/setup.py	2020-12-24 10:38:19.000000000 -0500

- +++ Rtree-0.9.7/setup.py	2022-02-02 22:09:58.609247483 -0500

- @@ -105,8 +105,6 @@

-      package_data={"rtree": ['lib']},

-      zip_safe=False,

-      include_package_data=True,

- -    distclass=BinaryDistribution,

- -    cmdclass={'bdist_wheel': bdist_wheel, 'install': InstallPlatlib},

-      classifiers=[

-          'Development Status :: 5 - Production/Stable',

-          'Intended Audience :: Developers',

@@ -0,0 +1,12 @@ 

+ diff -Naur Rtree-1.0.0-original/setup.py Rtree-1.0.0/setup.py

+ --- Rtree-1.0.0-original/setup.py	2022-04-04 19:21:43.000000000 -0400

+ +++ Rtree-1.0.0/setup.py	2022-04-06 08:37:34.669665491 -0400

+ @@ -76,7 +76,4 @@

+              )

+  

+  

+ -setup(

+ -    distclass=BinaryDistribution,

+ -    cmdclass={"bdist_wheel": bdist_wheel, "install": InstallPlatlib},

+ -)

+ +setup()

file modified
+38 -46
@@ -1,4 +1,7 @@ 

- %global srcname Rtree

+ Name:           python-Rtree

+ Version:        1.0.0

+ Release:        1%{?dist}

+ Summary:        R-Tree spatial index for Python GIS

  

  # Since the package has a history of arch-dependent bugs (see RHBZ#2055249),

  # the base package is arched to flush out any arch-dependent bugs by ensuring
@@ -7,28 +10,24 @@ 

  # no debuginfo to generate.

  %global debug_package %{nil}

  

- Name:           python-%{srcname}

- Version:        0.9.7

- Release:        4%{?dist}

- Summary:        R-Tree spatial index for Python GIS

- %global _description \

- Rtree is a ctypes Python wrapper of the spatialindex library, that \

- provides a number of advanced spatial indexing features for the \

- spatially curious Python user. These features include: \

- \

- -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)

+ %global _description %{expand: \

+ Rtree is a ctypes Python wrapper of libspatialindex that provides a number of

+ advanced spatial indexing features for the spatially curious Python user. These

+ features include:

+ 

+   • 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)}

  

  License:        LGPLv2

- URL:            https://pypi.python.org/pypi/%{srcname}

- Source0:        https://files.pythonhosted.org/packages/source/R/%{srcname}/%{srcname}-%{version}.tar.gz

+ URL:            https://github.com/Toblerity/rtree

+ Source0:        %{pypi_source Rtree}

  

  # Since we are not bundling libspatialite as upstream does for PyPI wheel

  # distribution, do not force setuptools to treat the package as binary/arched
@@ -39,30 +38,21 @@ 

  # patch.

  #

  # https://bugzilla.redhat.com/show_bug.cgi?id=2050010

- Patch0:         Rtree-0.9.7-no-bundled-spatialite.patch

- # Fix test failures on s390x by correcting C API mismatches vs. libspatialite

- #

- # https://bugzilla.redhat.com/show_bug.cgi?id=2055249

- # https://github.com/Toblerity/rtree/issues/220

- # https://github.com/Toblerity/rtree/pull/222

- #

- # Rebased on release 0.9.7:

- Patch1:         https://github.com/musicinmybrain/rtree/pull/1.patch#/Rtree-0.9.7-issue-220-pr-222.patch

+ Patch0:         Rtree-1.0.0-no-bundled-spatialite.patch

  

  BuildRequires:  spatialindex-devel

+ 

  BuildRequires:  python3-devel

- BuildRequires:  python3-setuptools

  

- BuildRequires:  python3-pytest

- BuildRequires:  python3-numpy

- BuildRequires:  python3-wheel

+ # For testing:

+ BuildRequires:  python3dist(pytest)

+ BuildRequires:  python3dist(numpy)

  

  %description %{_description}

  

  

  %package -n python3-rtree

  Summary:        %{summary}

- %{?python_provide:%python_provide python3-rtree}

  

  BuildArch:      noarch

  
@@ -74,19 +64,18 @@ 

  %prep

  %autosetup -n Rtree-%{version} -p1

  

- # Delete junk from tarball.

- rm -rf Rtree.egg-info

- find . -name '*.pyc' -delete

- rm setup.cfg

- rm -rf docs/build

+ 

+ %generate_buildrequires

+ %pyproject_buildrequires

  

  

  %build

- %py3_build

+ %pyproject_wheel

  

  

  %install

- %py3_install

+ %pyproject_install

+ %pyproject_save_files rtree

  

  

  %check
@@ -95,14 +84,17 @@ 

  

  # Note that there is no %%files section for the unversioned python module if we

  # are building for several python runtimes

- %files -n python3-rtree

- %license LICENSE.txt

+ %files -n python3-rtree -f %{pyproject_files}

+ # pyproject_files handles LICENSE.txt; verify with “rpm -qL -p …”

  %doc README.md

- %{python3_sitelib}/rtree

- %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info

  

  

  %changelog

+ * Wed Apr 06 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.0.0-1

+ - Update to 1.0.0

+ - Tidy up spec file macros and other trivia

+ - Use pyproject-rpm-macros

+ 

  * Sat Feb 19 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.9.7-4

  - Ensure tests run on all architectures

  - Fix RHBZ#2055249 with upstream PR#222, which includes fixes for additional C

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (Rtree-0.9.7.tar.gz) = 35b39e29f6d2b9cf4e774191bed69ade515680d07213f0ba74748da11ba916b41c93dfc4f489d7320855f3722ac8b5b58bac4614ea95e6230fcffe33f4332607

+ SHA512 (Rtree-1.0.0.tar.gz) = 9a414cd65b27ba35313dd7185dece83f5d7235867f6f0c72c2902d7ffd72808138dbf30d8fe11c8bbf0ec463072e5f6112d75b5fdd5a1dab7720c56d3632d576

I used a COPR to verify compatibility with all dependent packages in Rawhide. I also checked that none of them has a version requirement that would exclude version 1.0.0. (I found only minimum versions, no ranges or maximum versions.) The only failure, python-geopandas, is due to a pre-existing issue on s390x.

The upstream release notes don’t indicate any breaking changes, so this version could be backported to stable releases if necessary. However, I would be inclined to suggest just merging this for Rawhide if there isn’t a pressing need for any of the changes or fixes in older releases.

Any objection to going ahead and merging this in Rawhide?

Only package I know using rtree is spyder. >=0.9.7 is what I need.

So, go ahead.

Pull-Request has been merged by music

2 years ago