forked from pool/python-pythran
- 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
This commit is contained in:
parent
9b82a25a73
commit
75fe01d8a9
30
2046-fix-cli-doc-test.patch
Normal file
30
2046-fix-cli-doc-test.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From c6bc9aa1e0dcc0a94fe9bd1c938a180c46ca60f2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
||||||
|
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::
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 17 14:32:56 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- 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 <mcepl@suse.com>
|
Fri Nov 25 01:54:50 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -53,6 +53,8 @@ URL: https://github.com/serge-sans-paille/pythran
|
|||||||
# Tests are only availble in github archive
|
# 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
|
Source0: https://github.com/serge-sans-paille/pythran/archive/refs/tags/%{version}.tar.gz#/pythran-%{version}-gh.tar.gz
|
||||||
Source99: python-pythran-rpmlintrc
|
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: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
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}"
|
export CFLAGS="%{optflags}"
|
||||||
# crashes the xdist workers
|
# crashes the xdist workers
|
||||||
donttest="test_operator_intersection"
|
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"
|
%pytest -n auto -k "not ($donttest)" -m "not module"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user