BUG Make sure bin/cython imports the right Cython module
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sat, 2 Apr 2011 10:56:46 +0000 (12:56 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sat, 2 Apr 2011 10:56:46 +0000 (12:56 +0200)
bin/cygdb
bin/cython

index 7f2d57f5d606a0c5eff5e1dbabae9c2de1b3b2c1..a980f6a02e68f071d7ad53f02433b40bb8ae02cc 100755 (executable)
--- a/bin/cygdb
+++ b/bin/cygdb
@@ -1,6 +1,12 @@
 #!/usr/bin/env python
 
 import sys
+import os
+
+# Make sure we import the right Cython
+binpath, _ = os.path.split(os.path.realpath(__file__))
+cythonpath, _ = os.path.split(binpath)
+sys.path.insert(0, cythonpath)
 
 from Cython.Debugger import Cygdb as cygdb
 
index 2acad0d0e74b732609493eda83dd6bd7cb0c499e..094beed47a56d61ebc6d603cd877cbe98dd74b3c 100755 (executable)
@@ -4,5 +4,13 @@
 #   Cython -- Main Program, Unix
 #
 
+import os
+import sys
+
+# Make sure we import the right Cython
+binpath, _ = os.path.split(os.path.realpath(__file__))
+cythonpath, _ = os.path.split(binpath)
+sys.path.insert(0, cythonpath)
+
 from Cython.Compiler.Main import main
 main(command_line = 1)