Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 #429

Closed
mortlind opened this issue Dec 22, 2014 · 0 comments
Closed

Python3 #429

mortlind opened this issue Dec 22, 2014 · 0 comments
Milestone

Comments

@mortlind
Copy link

Building, installing, and successfully using the Python wrapper with Python3 is possible, if the map() call in setup.py is replaced by list comprehension.

diff --git a/wrappers/python/setup.py b/wrappers/python/setup.py
index 40a0f93..f440cc2 100755
--- a/wrappers/python/setup.py
+++ b/wrappers/python/setup.py
@@ -17,7 +17,7 @@ def get_cython_version():
     match = re.search('^([0-9]+)\.([0-9]+)',
                       Cython.Compiler.Main.Version.version)
     try:
-        return map(int, match.groups())
+        return [int(g) for g in match.groups()]
     except AttributeError:
         raise ImportError
@piedar piedar added this to the v0.5.2 milestone Dec 26, 2014
@piedar piedar closed this as completed in d8729aa Jan 7, 2015
yarikoptic added a commit to yarikoptic/libfreenect that referenced this issue Feb 14, 2015
* commit 'v0.5.2-2-g68073c3':
  Return int from freenect_get_ir_brightness() - fixes OpenKinect#433
  Add ability to control IR projector brightness - fixes OpenKinect#433
  Update CMakeLists.txt for v0.5.2
  Let CMake find OpenGL/GLUT automatically
  python: Fix version detection python: Use list comprehension so setup.py runs on python3 - fixes OpenKinect#429
  examples: Do not require all dependencies; skip building examples with missing dependencies win32: Compiles as pure C
  win32: Fix c_sync build
  win32: Fix compiler errors
  Add freenect-camtest example for headless testing - fixes OpenKinect#428
  Update README.md
  Fix compiler warning by anonymizing enum; touch up indentation
  Negotiate maximum USB packet length
  fixed environment variable for Darwin
  OpenNI2-FreenectDriver: Expose USB VID/PID to OpenNI - fixes OpenKinect#422
  Add support for near mode (K4W only)
  Adds zbuffer to the mapping of rgb to depth
  clear rgb pixels without depth data for map_rgb_to_depth
  add freenect_map_rgb_to_depth helper function (untested)
yarikoptic added a commit to yarikoptic/libfreenect that referenced this issue Feb 14, 2015
* dfsg:
  Return int from freenect_get_ir_brightness() - fixes OpenKinect#433
  Add ability to control IR projector brightness - fixes OpenKinect#433
  Update CMakeLists.txt for v0.5.2
  Let CMake find OpenGL/GLUT automatically
  python: Fix version detection python: Use list comprehension so setup.py runs on python3 - fixes OpenKinect#429
  examples: Do not require all dependencies; skip building examples with missing dependencies win32: Compiles as pure C
  win32: Fix c_sync build
  win32: Fix compiler errors
  Add freenect-camtest example for headless testing - fixes OpenKinect#428
  Update README.md
  Fix compiler warning by anonymizing enum; touch up indentation
  Negotiate maximum USB packet length
  fixed environment variable for Darwin
  OpenNI2-FreenectDriver: Expose USB VID/PID to OpenNI - fixes OpenKinect#422
  Add support for near mode (K4W only)
  Adds zbuffer to the mapping of rgb to depth
  clear rgb pixels without depth data for map_rgb_to_depth
  add freenect_map_rgb_to_depth helper function (untested)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants