diff options
author | William Stein <wstein@gmail.com> | 2007-07-28 13:43:42 -0700 |
---|---|---|
committer | William Stein <wstein@gmail.com> | 2007-07-28 13:43:42 -0700 |
commit | 90b64b51306688e1a111a660582f5c273dbda1f2 (patch) | |
tree | 38d3ff7b0595d36bf27d042fca3f0b44fb13f84c /USAGE.txt | |
parent | c4fa206b9579bb739a1cf9ceb7980b47a9b9c5e2 (diff) | |
download | cython-90b64b51306688e1a111a660582f5c273dbda1f2.tar.gz |
More Pyrex/SageX --> Cython changes
Diffstat (limited to 'USAGE.txt')
-rw-r--r-- | USAGE.txt | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -1,11 +1,11 @@ -Pyrex - Usage Instructions +Cython - Usage Instructions ========================== -Building Pyrex extensions using distutils +Building Cython extensions using distutils ----------------------------------------- -Pyrex comes with an experimental distutils extension for compiling -Pyrex modules, contributed by Graham Fawcett of the University of +Cython comes with an experimental distutils extension for compiling +Cython modules, contributed by Graham Fawcett of the University of Windsor (fawcett@uwindsor.ca). The Demos directory contains a setup.py file demonstrating its use. To @@ -30,17 +30,17 @@ Try out the extensions with: python run_numeric_demo.py -Building Pyrex extensions by hand +Building Cython extensions by hand --------------------------------- -You can also invoke the Pyrex compiler on its own to translate a .pyx +You can also invoke the Cython compiler on its own to translate a .pyx file to a .c file. On Unix, - pyrexc filename.pyx + cython filename.pyx On other platforms, - python pyrexc.py filename.pyx + python cython.py filename.pyx It's then up to you to compile and link the .c file using whatever procedure is appropriate for your platform. The file @@ -51,19 +51,25 @@ one particular Unix system. Command line options -------------------- -The pyrexc command supports the following options: +The cython command supports the following options: Short Long Argument Description ----------------------------------------------------------------------------- - -v --version Display version number of pyrex compiler + -v --version Display version number of cython compiler -l --create-listing Write error messages to a .lis file -I --include-dir <directory> Search for include files in named - directory (may be repeated) + directory (may be repeated) -o --output-file <filename> Specify name of generated C file (only - one source file allowed if this is used) + one source file allowed if this is used) + -p, --embed-positions If specified, the positions in Cython files of each + function definition is embedded in its docstring. + -z, --pre-import <module> If specified, assume undeclared names in this + module. Emulates the behavior of putting + "from <module> import *" at the top of the file. -Anything else is taken as the name of a Pyrex source file and compiled -to a C source file. Multiple Pyrex source files can be specified + +Anything else is taken as the name of a Cython source file and compiled +to a C source file. Multiple Cython source files can be specified (unless -o is used), in which case each source file is treated as the source of a distinct extension module and compiled separately to produce its own C file. |