cython.py 520 Bytes
Newer Older
1 2
#!/usr/bin/env python

William Stein's avatar
William Stein committed
3
#
4
#   Cython -- Main Program, generic
William Stein's avatar
William Stein committed
5 6
#

7 8
if __name__ == '__main__':

9 10
    import os
    import sys
11

12 13 14 15
    # Make sure we import the right Cython
    cythonpath, _ = os.path.split(os.path.realpath(__file__))
    sys.path.insert(0, cythonpath)

16 17 18 19
    from Cython.Compiler.Main import main
    main(command_line = 1)

else:
20 21 22 23
    # Void cython.* directives.
    from Cython.Shadow import *
    ## and bring in the __version__
    from Cython import __version__
24
    from Cython import load_ipython_extension