Interesting it’s not documented well, it definitely should be.

It corresponds to this compiler option:

https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#Cython.Compiler.Options.annotate


When you turn that option on or pass -a or —annotate to the compiler,
cython generates a sidecar html file you can open in a browswer. The
document initially just contains the cython source code, with each line
highlighted shades of yellow to indicate the amount of python overhead that
line invokes. You can also click on each line to see the corresponding
generated C. It’s very helpful to understand how changes in cython syntax
or even compiler options can influence the performance and level of safety
of the generated C code (usually in an inverse relationship).

On Sat, Feb 1, 2020 at 8:41 AM John Skaller2 <skal...@internode.on.net>
wrote:

>
>
> > On 2 Feb 2020, at 02:23, Stefan Behnel <stefan...@behnel.de> wrote:
> >
> > John Skaller2 schrieb am 01.02.20 um 15:32:
> >> My problem is trying to read the generated code.
> >
> > You might be looking for "cython -a".
>
> OK. I see these:
>
> ~/felix>../cython/cython.py
> usage: cython.py [-h] [-V] [-l] [-I INCLUDE_PATH] [-o OUTPUT_FILE] [-t]
> [-f]
>                  [-v] [-p] [--cleanup GENERATE_CLEANUP_CODE] [-w
> WORKING_PATH]
>                  [--gdb] [--gdb-outdir GDB_OUTDIR] [-D] [-a]
>                  [--annotate-fullc]
>                  [--annotate-coverage ANNOTATE_COVERAGE_XML]
>                  [--line-directives] [-+] [--embed] [-2] [-3] [--3str]
>                  [--lenient] [--capi-reexport-cincludes] [--fast-fail]
>                  [-Werror] [-Wextra] [-X NAME=VALUE,...] [-E
> NAME=VALUE,...]
>                  [sources [sources ...]]
> cython.py: error: cython: Need at least one source file
>
> What does -a do? I couldn’t find complete docs on the compiler switches
> although some are explained in the user guide.
>
> —
> John Skaller
> skal...@internode.on.net
>
>
>
>
>
> _______________________________________________
> cython-devel mailing list
> cython-devel@python.org
> https://mail.python.org/mailman/listinfo/cython-devel
>
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to