Commit eebdac3b authored by William Stein's avatar William Stein

More Pyrex --> Cython conversions.

parent 0a930f3f
...@@ -6,10 +6,10 @@ import sys ...@@ -6,10 +6,10 @@ import sys
import Options import Options
usage = """\ usage = """\
Cython (http://cython.org) is for compiling code written in the Cython Cython (http://cython.org) is a compiler for code written in the
language. Cython is based on Pyrex by Greg Ewing. Cython language. Cython is based on Pyrex by Greg Ewing.
Usage: cython [options] sourcefile... Usage: cython [options] sourcefile.pyx ...
Options: Options:
-v, --version Display version number of cython compiler -v, --version Display version number of cython compiler
......
# #
# Pyrex Top Level # Cython Top Level
# #
import os, sys import os, sys
if sys.version_info[:2] < (2, 2): 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) sys.exit(1)
import os import os
...@@ -217,7 +217,7 @@ class Context: ...@@ -217,7 +217,7 @@ class Context:
class CompilationOptions: class CompilationOptions:
""" """
Options to the Pyrex compiler: Options to the Cython compiler:
show_version boolean Display version number show_version boolean Display version number
use_listing_file boolean Generate a .lis file use_listing_file boolean Generate a .lis file
...@@ -243,7 +243,7 @@ class CompilationOptions: ...@@ -243,7 +243,7 @@ class CompilationOptions:
class CompilationResult: class CompilationResult:
""" """
Results from the Pyrex compiler: Results from the Cython compiler:
c_file string or None The generated C source file c_file string or None The generated C source file
h_file string or None The generated C header file h_file string or None The generated C header file
...@@ -267,7 +267,7 @@ def compile(source, options = None, c_compile = 0, c_link = 0): ...@@ -267,7 +267,7 @@ def compile(source, options = None, c_compile = 0, c_link = 0):
""" """
compile(source, options = default_options) 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. a CompilationResult object describing what was produced.
""" """
if not options: if not options:
...@@ -296,7 +296,7 @@ def main(command_line = 0): ...@@ -296,7 +296,7 @@ def main(command_line = 0):
options = default_options options = default_options
sources = args sources = args
if options.show_version: 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) context = Context(options.include_path)
for source in sources: for source in sources:
try: try:
......
...@@ -10,7 +10,7 @@ import stat ...@@ -10,7 +10,7 @@ import stat
import sys import sys
from time import time from time import time
from Pyrex import Plex from Cython import Plex
from Cython.Plex import Scanner from Cython.Plex import Scanner
from Cython.Plex.Errors import UnrecognizedInput from Cython.Plex.Errors import UnrecognizedInput
from Errors import CompileError, error from Errors import CompileError, error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment