Skip to content

Python3 #429

@mortlind

Description

@mortlind

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions