From af902b506b2162d6d8bff345be4d060398c8a45b Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Sat, 2 Apr 2011 12:56:46 +0200 Subject: [PATCH] BUG Make sure bin/cython imports the right Cython module --- bin/cygdb | 6 ++++++ bin/cython | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/bin/cygdb b/bin/cygdb index 7f2d57f5..a980f6a0 100755 --- 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 diff --git a/bin/cython b/bin/cython index 2acad0d0..094beed4 100755 --- a/bin/cython +++ b/bin/cython @@ -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) -- 2.26.2