We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e551c9a commit d8729aaCopy full SHA for d8729aa
wrappers/python/setup.py
@@ -14,10 +14,16 @@ def get_cython_version():
14
ImportError: Can't load cython or find version
15
"""
16
import Cython.Compiler.Main
17
- match = re.search('^([0-9]+)\.([0-9]+)',
18
- Cython.Compiler.Main.Version.version)
+
+ try:
19
+ # old way, fails for me
20
+ version = Cython.Compiler.Main.Version.version
21
+ except AttributeError:
22
+ version = Cython.Compiler.Main.version
23
24
+ match = re.search('^([0-9]+)\.([0-9]+)', version)
25
try:
- return map(int, match.groups())
26
+ return [int(g) for g in match.groups()]
27
except AttributeError:
28
raise ImportError
29
0 commit comments