[Cython] cython --create-listing fails
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, when running: $ cython --create-listing -o build/temp.linux-x86_64-2.7/pybiklib/gldraw_c.c build/temp.linux-x86_64-2.7/pybiklib/gldraw_c.pyx I get the error: Traceback (most recent call last): File "/usr/bin/cython", line 8, in main(command_line = 1) File "/usr/lib/pymodules/python2.7/Cython/Compiler/Main.py", line 662, in main result = compile(sources, options) File "/usr/lib/pymodules/python2.7/Cython/Compiler/Main.py", line 637, in compile return compile_multiple(source, options) File "/usr/lib/pymodules/python2.7/Cython/Compiler/Main.py", line 609, in compile_multiple result = run_pipeline(source, options) File "/usr/lib/pymodules/python2.7/Cython/Compiler/Main.py", line 472, in run_pipeline context.setup_errors(options, result) File "/usr/lib/pymodules/python2.7/Cython/Compiler/Main.py", line 399, in setup_errors result.listing_file = Utils.replace_suffix(source, ".lis") NameError: global name 'source' is not defined I'm using Cython 0.15.1 . The patch is against git as it seems the code there is same but tested only for 0.15.1. B.C. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQUGjJAAoJEEDg0A3D0GN4Yj0QAKYHfo1C7bwl8a2pZi+DPrrE N0T5KAzu3RjYgacw0MpC5hb+L1X6J5Yi3BAdIp4ertCY6xeKD6+lQt2q+zHK0De3 0CI4ivnh+yH/x5hvjRjDprrpotKc/tre0BWMpKpchw2ohZ21PRDmxpOsjFzTmyC0 V8TO0AG0hzpabzI9qNZRwyBz/GOzfFwyumKBDOv/z/2n2LDDBO+k10orfXrfhjdI uFE6m1YAA4vK0apTi0F6GokJNq+vqT2pRNEzO/Fsek7kRxoNCAUrbzL0aKMj8wsz M4wIUq8TE3R2d5cvEt+ibQK0+7OydoKoaiCd3BfumVsj5SBRio/GcMetJA1lThUn W8e1yPtzPO/GlSatdvRiIJFzyzlX1ZVAfFXD419Gq0/X23/GK+j9k1rHQzg8e3+j 7yVph3DLfZfnQqmBpD3Xl4NCp7zYq7QgfdsB1GNzub/PEatfcv2DVLlnCDCTKgGu j5/r/0dwrOkb1q3SGtONo/dAovSi0oIbW3Wfe4ebB8S1HVo9pFpPDIqc1g3xXRA2 laqc7vBAcE5ZfS5/uDmW74PMV1khDeDkhmhoEGSQbFTSSC40DwufvyBAPMyzjjvf 9JAvOp5FS9RS0020KPKIlOtxQXA+CrJSIbaQZu6m/nmH17a60QnW8kwZ799/Pqgd IsacvSJvpYKHtQbg9JCJ =Hav4 -END PGP SIGNATURE- diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 43f9610..1b72cec 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -345,7 +345,7 @@ class Context(object): def setup_errors(self, options, result): Errors.reset() # clear any remaining error state if options.use_listing_file: -result.listing_file = Utils.replace_suffix(source, ".lis") +result.listing_file = Utils.replace_suffix(result.main_source_file, ".lis") path = result.listing_file else: path = None ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
[Cython] usage does not match the options
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I found that the options shown by "cython -h" are different to the options parsed by cython. Usage: --warning-error Parser: --warning-errors The parser does not recognize "-q" and "-quiet" (Patch attached) There are other options that are not in the usage: -+ -z, --pre-import --convert-range --no-c-in-traceback --disable-function-redefinition --old-style-globals --debug -h, --help B.C. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQUIG1AAoJEEDg0A3D0GN4lN0QAKicvLAAcVqvJ6+12ErOSLxx hzvJcIvjR9EBys3QMzq6+wfGY8JdzWA4ofn6VI+xtLkFDt9NhlpvB64UN1TUy1Nm zj5IopRVV9VuKAvWxHoxk7QsuR2PmOd3ZR7d+v4xOxncfKmp1NNYYwuSvF9o232M gdABJ3U34hGXhWTtVt21WkFqBgIQFnuWsCCzOokNL/rYuUEu1/AalFgy6Eko8xs8 V55bGXAFEgNCGJb/DPWglsTqoS3XJO4Wr7nt/N7ca6ejHo6Q0acA8GEcBikXM7kA KI7swe/FwcNzz3FR0JflhbnzVltrR/bVGuhtjdElH2CNfSeX0lLIeihl9qmANYiZ oGnl5n2Wmx/jUaFiEVmXa1ry+0xaNU10n7lv9zfAJYHt4xzF0HOmyudmviU34SVi 2w+SVPdBNH/08R0C3JPkcrLxN3L9RkXWzv6+bEsdtTGrWycQyXSLpVJn66OtAeKl LoBJw2wzfibazKIWO7PuNW4VTz5Mcn4m8NG/ujEpw3WUE97mqRZRm9cp3opaeIjh uZeWLUsEgn2GEMAwVrg10ILdverD08RX7ovyUqKCP84W03MV5fBHQISNAW2rS1ig KXf1zm0lYr+W1MN9BnGQtqUTFSzxpnNJZ4KhDio+kAMc4bqbSk6R2ste2XXbS6/j JGCc02zjM7TtSuw33oeJ =8zfk -END PGP SIGNATURE- diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index 06d295f..65fba1d 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -20,7 +20,6 @@ Options: -o, --output-fileSpecify name of generated C file -t, --timestamps Only compile newer source files -f, --forceCompile all source files (overrides implied -t) - -q, --quietDon'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. @@ -38,7 +37,7 @@ Options: -2 Compile based on Python-2 syntax and code semantics. -3 Compile based on Python-3 syntax and code semantics. --fast-failAbort the compilation on the first error - --warning-error, -Werror Make all warnings into errors + --warning-errors, -Werror Make all warnings into errors --warning-extra, -Wextra Enable extra warnings -X, --directive =[,___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] usage does not match the options
On Wed, Sep 12, 2012 at 5:36 AM, B. Clausius wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > I found that the options shown by "cython -h" are different to the > options parsed by cython. > > Usage: --warning-error > Parser: --warning-errors > The parser does not recognize "-q" and "-quiet" > (Patch attached) Thanks. Pushed. https://github.com/cython/cython/commit/eae1ada81dd15528b26f3d802a31f04cdd4a22f6 (Generally we prefer pull requests, but we're not that picky when people are helping out...) > There are other options that are not in the usage: > -+ > -z, --pre-import > --convert-range > --no-c-in-traceback > --disable-function-redefinition > --old-style-globals > --debug > -h, --help Yeah, none of these should be advertised. - Robert ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel