Fix build error with cython 3
This commit is contained in:
parent
8d93c5893e
commit
1ef45bc200
2 changed files with 27 additions and 0 deletions
21
libfreenect-0.7.0-cython3.patch
Normal file
21
libfreenect-0.7.0-cython3.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -up ./wrappers/python/freenect.pyx.cython3 ./wrappers/python/freenect.pyx
|
||||
--- ./wrappers/python/freenect.pyx.cython3 2023-08-07 20:46:10.771514185 -0400
|
||||
+++ ./wrappers/python/freenect.pyx 2023-08-07 20:54:34.791037845 -0400
|
||||
@@ -322,7 +322,7 @@ cpdef open_device(CtxPtr ctx, int index)
|
||||
|
||||
_depth_cb, _video_cb = None, None
|
||||
|
||||
-cdef void depth_cb(freenect_device *dev, void *data, uint32_t timestamp) with gil:
|
||||
+cdef void depth_cb(freenect_device *dev, void *data, uint32_t timestamp) noexcept with gil:
|
||||
cdef freenect_frame_mode mode = freenect_get_current_depth_mode(dev)
|
||||
if not mode.is_valid:
|
||||
return
|
||||
@@ -333,7 +333,7 @@ cdef void depth_cb(freenect_device *dev,
|
||||
pydata = _depth_cb_np(data, &mode)
|
||||
_depth_cb(dev_out, pydata, timestamp)
|
||||
|
||||
-cdef void video_cb(freenect_device *dev, void *data, uint32_t timestamp) with gil:
|
||||
+cdef void video_cb(freenect_device *dev, void *data, uint32_t timestamp) noexcept with gil:
|
||||
cdef freenect_frame_mode mode = freenect_get_current_video_mode(dev)
|
||||
if not mode.is_valid:
|
||||
return
|
||||
|
|
@ -21,6 +21,8 @@ Patch3: %{name}-0.4.2-libdir.patch
|
|||
Patch4: secarch.patch
|
||||
# Fix the installation path for python libs
|
||||
Patch5: %{name}-0.7.0-py3.patch
|
||||
# Fix for cython3
|
||||
Patch6: %{name}-0.7.0-cython3.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake3
|
||||
|
|
@ -102,6 +104,7 @@ rm -rf platform/windows
|
|||
%patch -P 3 -p0 -b .libdir
|
||||
%patch -P 4 -p1 -b .secarch
|
||||
%patch -P 5 -p1 -b .py3
|
||||
%patch -P 6 -p1 -b .cython3
|
||||
|
||||
%build
|
||||
%cmake3 \
|
||||
|
|
@ -180,6 +183,9 @@ mv %{buildroot}%{_libdir}/OpenNI2-FreenectDriver %{buildroot}%{_libdir}/openni2/
|
|||
%{_libdir}/openni2
|
||||
|
||||
%changelog
|
||||
* Mon Aug 07 2023 Rich Mattes <richmattes@gmail.com> - 0.7.0-4
|
||||
- Fix build error with cython 3
|
||||
|
||||
* Mon Aug 07 2023 Sérgio Basto <sergio@serjux.com> - 0.7.0-4
|
||||
- Rebuild for opencv 4.8.0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue