Blob Blame History Raw
diff -up libfreenect-0.6.2/src/fwfetcher.py.py3 libfreenect-0.6.2/src/fwfetcher.py
--- libfreenect-0.6.2/src/fwfetcher.py.py3	2021-02-12 00:51:27.000000000 +0100
+++ libfreenect-0.6.2/src/fwfetcher.py	2021-03-04 14:35:02.568905434 +0100
@@ -1,5 +1,3 @@
-#!/usr/bin/env python2
-
 from __future__ import absolute_import, division, print_function
 
 import hashlib
@@ -10,10 +8,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.6.2/wrappers/python/CMakeLists.txt.py3 libfreenect-0.6.2/wrappers/python/CMakeLists.txt
--- libfreenect-0.6.2/wrappers/python/CMakeLists.txt.py3	2021-02-12 00:51:27.000000000 +0100
+++ libfreenect-0.6.2/wrappers/python/CMakeLists.txt	2021-03-04 14:32:52.382237690 +0100
@@ -21,7 +21,7 @@ find_program(CYTHON_EXECUTABLE cython)
 # 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}'))"
+    -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"
   OUTPUT_VARIABLE Python${Python_BUILD_VERSION}_SITELIB OUTPUT_STRIP_TRAILING_WHITESPACE)
 
 # Figure out numpy include path
@@ -56,7 +56,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