libfreenect/libfreenect-0.7.5-py3.patch
Dominik 'Rathann' Mierzejewski ee4496ce03 address review findings
- fixed duplicate files warning
- made file lists more explicit
- corrected License tag
- added missing Provides: for bundled parson
- added executable bit to fwfetcher.py script and fixed shebang
- avoid timestamps in generated docs for reproducibility
2025-11-26 18:58:53 +01:00

61 lines
2.5 KiB
Diff

diff -up libfreenect-0.7.5/src/fwfetcher.py.py3 libfreenect-0.7.5/src/fwfetcher.py
--- libfreenect-0.7.5/src/fwfetcher.py.py3 2024-01-06 17:57:12.000000000 +0100
+++ libfreenect-0.7.5/src/fwfetcher.py 2025-11-25 00:20:24.085725755 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
from __future__ import absolute_import, division, print_function
@@ -10,10 +10,10 @@ import sys
import time
import zipfile
-try:
+if sys.version_info[0] > 2:
# Python 3
from urllib.request import Request, URLError, urlopen
-except ImportError:
+else:
# Python 2
from urllib2 import Request, URLError, urlopen
diff -up libfreenect-0.7.5/wrappers/python/CMakeLists.txt.py3 libfreenect-0.7.5/wrappers/python/CMakeLists.txt
--- libfreenect-0.7.5/wrappers/python/CMakeLists.txt.py3 2024-01-06 17:57:12.000000000 +0100
+++ libfreenect-0.7.5/wrappers/python/CMakeLists.txt 2025-11-11 09:48:50.045686564 +0100
@@ -19,10 +19,7 @@ find_program(CYTHON_EXECUTABLE cython)
# Figure out installation path
# CMake populates this var automatically but we need to specify prefix
-execute_process(COMMAND
- ${Python${Python_BUILD_VERSION}_EXECUTABLE}
- -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=False, standard_lib=False, prefix='${CMAKE_INSTALL_PREFIX}'))"
- OUTPUT_VARIABLE Python${Python_BUILD_VERSION}_SITELIB OUTPUT_STRIP_TRAILING_WHITESPACE)
+set(Python${Python_BUILD_VERSION}_SITELIB "${Python${Python_BUILD_VERSION}_SITEARCH}")
# Figure out numpy include path
# todo: CMake >= 3.14 populates this var automatically when using COMPONENTS NumPy
@@ -73,7 +70,10 @@ target_include_directories(cython${Pytho
# Install the extension
install(TARGETS cython${Python_BUILD_VERSION}_freenect
- DESTINATION ${Python${Python_BUILD_VERSION}_SITELIB})
+ DESTINATION ${Python${Python_BUILD_VERSION}_SITELIB}
+ ARCHIVE DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES}
+ LIBRARY DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES}
+ )
# TODO: decide on what to do with demo_ scripts and were to install
# them
diff -up libfreenect-0.7.5/wrappers/python/setup.py.py3 libfreenect-0.7.5/wrappers/python/setup.py
--- libfreenect-0.7.5/wrappers/python/setup.py.py3 2024-01-06 17:57:12.000000000 +0100
+++ libfreenect-0.7.5/wrappers/python/setup.py 2025-11-11 09:48:50.045794539 +0100
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from distutils.core import setup
-from distutils.extension import Extension
+from setuptools import setup
+from setuptools import Extension
import re
import numpy as np