From 75fe01d8a9ca518c42a93b58901608c194d86286b3afdab80ccded9a5137c1ce Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 17 Dec 2022 14:37:24 +0000 Subject: [PATCH 1/2] - Add 2046-fix-cli-doc-test.patch to fix failing tests (gh#serge-sans-paille/pythran#2046). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pythran?expand=0&rev=13 --- 2046-fix-cli-doc-test.patch | 30 ++++++++++++++++++++++++++++++ python-pythran.changes | 6 ++++++ python-pythran.spec | 4 ++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 2046-fix-cli-doc-test.patch diff --git a/2046-fix-cli-doc-test.patch b/2046-fix-cli-doc-test.patch new file mode 100644 index 0000000..1e11feb --- /dev/null +++ b/2046-fix-cli-doc-test.patch @@ -0,0 +1,30 @@ +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:: diff --git a/python-pythran.changes b/python-pythran.changes index d2008bb..ff10fe4 100644 --- a/python-pythran.changes +++ b/python-pythran.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Dec 17 14:32:56 UTC 2022 - Matej Cepl + +- Add 2046-fix-cli-doc-test.patch to fix failing tests + (gh#serge-sans-paille/pythran#2046). + ------------------------------------------------------------------- Fri Nov 25 01:54:50 UTC 2022 - Matej Cepl diff --git a/python-pythran.spec b/python-pythran.spec index 03a3e8b..5589e20 100644 --- a/python-pythran.spec +++ b/python-pythran.spec @@ -53,6 +53,8 @@ URL: https://github.com/serge-sans-paille/pythran # Tests are only availble in github archive Source0: https://github.com/serge-sans-paille/pythran/archive/refs/tags/%{version}.tar.gz#/pythran-%{version}-gh.tar.gz Source99: python-pythran-rpmlintrc +# PATCH-FIX-UPSTREAM 2046-fix-cli-doc-test.patch gh#serge-sans-paille/pythran#2044 mcepl@suse.com +Patch0: 2046-fix-cli-doc-test.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -127,8 +129,6 @@ sed -i -e 's/-O0/-O1/g' -e 's/-Werror/-w/g' pythran/tests/__init__.py export CFLAGS="%{optflags}" # crashes the xdist workers donttest="test_operator_intersection" -# gh#serge-sans-paille/pythran#2044 -donttest="$donttest or test_toolchain or test_cli" %pytest -n auto -k "not ($donttest)" -m "not module" %endif From 4cb5ff030cb6092836f4b8d4d4249958f85ba25c75af127f4f2b222921d64140 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 27 Dec 2022 14:31:44 +0000 Subject: [PATCH 2/2] Accepting request 1045277 from home:bnavigator:branches:devel:languages:python:numeric factory-maintainer: bad bot! OBS-URL: https://build.opensuse.org/request/show/1045277 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pythran?expand=0&rev=14 --- 2046-fix-cli-doc-test.patch | 30 ------------------------------ python-pythran.changes | 6 ++++++ python-pythran.spec | 4 ++-- 3 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 2046-fix-cli-doc-test.patch diff --git a/2046-fix-cli-doc-test.patch b/2046-fix-cli-doc-test.patch deleted file mode 100644 index 1e11feb..0000000 --- a/2046-fix-cli-doc-test.patch +++ /dev/null @@ -1,30 +0,0 @@ -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:: diff --git a/python-pythran.changes b/python-pythran.changes index ff10fe4..0c120c2 100644 --- a/python-pythran.changes +++ b/python-pythran.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Dec 25 11:01:09 UTC 2022 - Ben Greiner + +- Revert. 2046-fix-cli-doc-test.patch did not fix the tests. + gh#serge-sans-paille/pythran#2046 + ------------------------------------------------------------------- Sat Dec 17 14:32:56 UTC 2022 - Matej Cepl diff --git a/python-pythran.spec b/python-pythran.spec index 5589e20..974f8db 100644 --- a/python-pythran.spec +++ b/python-pythran.spec @@ -53,8 +53,6 @@ URL: https://github.com/serge-sans-paille/pythran # Tests are only availble in github archive Source0: https://github.com/serge-sans-paille/pythran/archive/refs/tags/%{version}.tar.gz#/pythran-%{version}-gh.tar.gz Source99: python-pythran-rpmlintrc -# PATCH-FIX-UPSTREAM 2046-fix-cli-doc-test.patch gh#serge-sans-paille/pythran#2044 mcepl@suse.com -Patch0: 2046-fix-cli-doc-test.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -129,6 +127,8 @@ sed -i -e 's/-O0/-O1/g' -e 's/-Werror/-w/g' pythran/tests/__init__.py export CFLAGS="%{optflags}" # crashes the xdist workers donttest="test_operator_intersection" +# gh#serge-sans-paille/pythran#2044 NOT FIXED by gh#serge-sans-paille/pythran#2046 +donttest="$donttest or test_toolchain or test_cli" %pytest -n auto -k "not ($donttest)" -m "not module" %endif