cython.py: Always put Cython in sys.path
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Wed, 6 Apr 2011 18:50:26 +0000 (20:50 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Wed, 6 Apr 2011 18:50:26 +0000 (20:50 +0200)
cython.py

index c8987bbcfa1b23de3691399f1b793e218bbed4e8..cf07a8bcd83cff1d3ee22eb1b481b73520ed734b 100644 (file)
--- a/cython.py
+++ b/cython.py
@@ -4,6 +4,13 @@
 
 if __name__ == '__main__':
 
+    import os
+    import sys
+    
+    # Make sure we import the right Cython
+    cythonpath, _ = os.path.split(os.path.realpath(__file__))
+    sys.path.insert(0, cythonpath)
+
     from Cython.Compiler.Main import main
     main(command_line = 1)