Py3: fix import of Cython.Compiler.Version in setup.py
authorStefan Behnel <scoder@users.berlios.de>
Fri, 24 Apr 2009 11:38:19 +0000 (13:38 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 24 Apr 2009 11:38:19 +0000 (13:38 +0200)
Cython/Shadow.py
Cython/__init__.py
setup.py

index 2b81aec109531a929a527482603539a9fb5fd8de..17d781e0957f096011c5c67560fc0001f01ede49 100644 (file)
@@ -150,9 +150,12 @@ class typedef(CythonType):
         
 
 
-py_int = int
-py_long = long
 py_float = float
+py_int = int
+try:
+    py_long = long
+except NameError: # Py3
+    py_long = int
 
 
 # Predefined types
index 5ef285c09faad7113958951caa39efc6d5d697b3..f9f635d1f92ae0e1f8feb83fb7277a543aa5acaf 100644 (file)
@@ -1,2 +1,2 @@
 # Void cython.* directives (for case insensitive operating systems). 
-from Shadow import *
+from Cython.Shadow import *
index 93aa07eb1d3ce7476d006971a1275fa56bff71c5..a78af98a1239e1261fbf0803a17122bb75319df7 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -2,10 +2,7 @@ from distutils.core import setup, Extension
 from distutils.sysconfig import get_python_lib
 import os, os.path
 import sys
-try:
-    from Cython.Compiler.Version import version
-except ImportError:
-    version = None
+from Cython.Compiler.Version import version
 
 compiler_dir = os.path.join(get_python_lib(prefix=''), 'Cython/Compiler')
 if sys.platform == "win32":