File: deb_python_versions

package info (click to toggle)
libfreenect 1%3A0.5.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,156 kB
  • sloc: ansic: 7,417; cpp: 7,265; cs: 2,062; python: 992; ruby: 873; java: 730; xml: 49; sh: 27; makefile: 23
file content (39 lines) | stat: -rw-r--r-- 1,635 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- a/wrappers/python/CMakeLists.txt
+++ b/wrappers/python/CMakeLists.txt
@@ -2,21 +2,32 @@
 # Python extension builder
 ######################################################################################
 
-include(FindPythonInterp)
-include(FindPythonLibs)
+# yoh(Debian):
+# We are just building for a single version and all the magic there often leads to
+# breakages, so let's figure the paths for a single default Python out "manually"
+
+#include(FindPythonInterp)
+#include(FindPythonLibs)
 
 find_program(CYTHON_EXECUTABLE cython)
+find_program(PYTHON_EXECUTABLE python)
 
 # Figure out installation path
 execute_process(COMMAND
-  ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}')"
+  ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}'))"
   OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
 
+# Include headers
+execute_process(COMMAND
+  ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())"
+  OUTPUT_VARIABLE PYTHON_INCLUDE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
+
 # Figure out numpy include path
 execute_process(COMMAND
-  ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
+  ${PYTHON_EXECUTABLE} -c "import numpy; print(numpy.get_include())"
   OUTPUT_VARIABLE NUMPY_INCLUDE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
 
+
 # How to Cython the .pyx file
 add_custom_command(OUTPUT freenect.c
   COMMAND ${CYTHON_EXECUTABLE} -o freenect.c "${CMAKE_CURRENT_SOURCE_DIR}/freenect.pyx")