From c6bc9aa1e0dcc0a94fe9bd1c938a180c46ca60f2 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 25 Nov 2022 22:12:55 +0100 Subject: [PATCH] Fix cli doc test Should fix #2044, I don't understand why this was validating before --- docs/CLI.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) --- a/docs/CLI.rst +++ b/docs/CLI.rst @@ -64,11 +64,12 @@ That's some heavily templated code ;-) P Pythran can also generate raw C++ code, using the ``-e`` switch:: - $> printf 'msg = \"hello world\"\ndef foo(): print(msg)' > cli_foo.py - $> pythran -e cli_foo.py -o cli_foo.hpp - $> printf '#include \"cli_foo.hpp\"\nusing namespace __pythran_cli_foo ; int main() { foo()(); return 0 ; }' > cli_foo.cpp - $> `pythran-config --compiler --cflags` -std=c++11 cli_foo.cpp -o cli_foo - $> ./cli_foo + $> printf 'msg = \"hello world\"\ndef bar(): print(msg)' > cli_bar.py + $> pythran -e cli_bar.py -o cli_bar.hpp + No pythran specification, nothing will be exported + $> printf '#include \"cli_bar.hpp\"\nusing namespace __pythran_cli_bar ; int main() { bar()(); return 0 ; }' > cli_bar.cpp + $> `pythran-config --compiler --cflags` -std=c++11 cli_bar.cpp -o cli_bar + $> ./cli_bar hello world To know more options about Pythran, you can check::