import Options
usage = """\
-Cython (http://cython.org) is for compiling code written in the Cython
-language. Cython is based on Pyrex by Greg Ewing.
+Cython (http://cython.org) is a compiler for code written in the
+Cython language. Cython is based on Pyrex by Greg Ewing.
-Usage: cython [options] sourcefile...
+Usage: cython [options] sourcefile.pyx ...
Options:
-v, --version Display version number of cython compiler
#
-# Pyrex Top Level
+# Cython Top Level
#
import os, sys
if sys.version_info[:2] < (2, 2):
- print >>sys.stderr, "Sorry, Pyrex requires Python 2.2 or later"
+ print >>sys.stderr, "Sorry, Cython requires Python 2.2 or later"
sys.exit(1)
import os
class CompilationOptions:
"""
- Options to the Pyrex compiler:
+ Options to the Cython compiler:
show_version boolean Display version number
use_listing_file boolean Generate a .lis file
class CompilationResult:
"""
- Results from the Pyrex compiler:
+ Results from the Cython compiler:
c_file string or None The generated C source file
h_file string or None The generated C header file
"""
compile(source, options = default_options)
- Compile the given Pyrex implementation file and return
+ Compile the given Cython implementation file and return
a CompilationResult object describing what was produced.
"""
if not options:
options = default_options
sources = args
if options.show_version:
- print >>sys.stderr, "Pyrex version %s" % Version.version
+ print >>sys.stderr, "Cython version %s" % Version.version
context = Context(options.include_path)
for source in sources:
try: