# # Cython - Command Line Parsing # import sys import Options usage = """\ 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.pyx ... Options: -V, --version Display version number of cython compiler -l, --create-listing Write error messages to a listing file -I, --include-dir Search for include files in named directory (multiply include directories are allowed). -o, --output-file Specify name of generated C file -r, --recursive Recursively find and compile dependencies -t, --timestamps Only compile newer source files (implied with -r) -f, --force Compile all source files (overrides implied -t) -q, --quiet Don't print module names in recursive mode -v, --verbose Be verbose, print file names on multiple compilation -p, --embed-positions If specified, the positions in Cython files of each function definition is embedded in its docstring. -z, --pre-import If specified, assume undeclared names in this module. Emulates the behavior of putting "from import *" at the top of the file. --incref-local-binop Force local an extra incref on local variables before performing any binary operations. --cleanup Release interned objects on python exit, for memory debugging. Level indicates aggressiveness, default 0 releases nothing. -w, --working Sets the working directory for Cython (the directory modules are searched from) -D, --no-docstrings Remove docstrings. -a, --annotate Produce a colorized HTML version of the source. --line-directives Produce #line directives pointing to the .pyx source --cplus Output a c++ rather than c file. -X, --directive =[, 1: sys.stderr.write( "cython: Only one source file allowed together with .o files\n") if options.use_listing_file and len(sources) > 1: sys.stderr.write( "cython: Only one source file allowed when using -o\n") sys.exit(1) if len(sources) == 0 and not options.show_version: bad_usage() return options, sources