libfreenect/libfreenect-0.5.5-py3.patch
2017-03-08 19:07:17 -05:00

47 lines
1.7 KiB
Diff

diff -up ./src/fwfetcher.py.py3 ./src/fwfetcher.py
--- ./src/fwfetcher.py.py3 2016-08-28 09:54:21.000000000 -0400
+++ ./src/fwfetcher.py 2016-12-29 16:52:00.569437210 -0500
@@ -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 ./wrappers/python/CMakeLists.txt.py3 ./wrappers/python/CMakeLists.txt
--- ./wrappers/python/CMakeLists.txt.py3 2016-08-28 09:54:21.000000000 -0400
+++ ./wrappers/python/CMakeLists.txt 2016-12-29 16:49:58.970814941 -0500
@@ -50,7 +50,7 @@ endif()
# Figure out installation path
execute_process(COMMAND
${PYTHON${Python_BUILD_VERSION}_EXECUTABLE}
- -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}'))"
+ -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"
OUTPUT_VARIABLE PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
# Figure out numpy include path
@@ -84,7 +84,10 @@ target_include_directories(cython${Pytho
# Install the extension
install(TARGETS cython${Python_BUILD_VERSION}_freenect
- DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES})
+ DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES}
+ 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