From 3011289e7ce990e15d5efae5795044e1e690ee83af6124acc31680f438dcad32 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 Nov 2019 14:21:01 +0000 Subject: [PATCH 1/2] - Add patch pytest4.patch to make the test suite compatible with pytest4+ (yes, THIS is the only change necessary!). gh#Kozea/pygal#340 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygal?expand=0&rev=11 --- pytest4.patch | 11 +++++++++++ python-pygal.changes | 7 +++++++ python-pygal.spec | 8 +++++--- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 pytest4.patch diff --git a/pytest4.patch b/pytest4.patch new file mode 100644 index 0000000..cd804cf --- /dev/null +++ b/pytest4.patch @@ -0,0 +1,11 @@ +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,7 +1,7 @@ + [wheel] + universal = 1 + +-[pytest] ++[tools:pytest] + flake8-ignore = + *.py E731 E402 + pygal/__init__.py F401 diff --git a/python-pygal.changes b/python-pygal.changes index 70745ac..5674717 100644 --- a/python-pygal.changes +++ b/python-pygal.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 6 15:16:36 CET 2019 - Matej Cepl + +- Add patch pytest4.patch to make the test suite compatible with + pytest4+ (yes, THIS is the only change necessary!). + gh#Kozea/pygal#340 + ------------------------------------------------------------------- Fri Jul 19 12:31:24 UTC 2019 - Tomáš Chvátal diff --git a/python-pygal.spec b/python-pygal.spec index 5a57b16..404bd53 100644 --- a/python-pygal.spec +++ b/python-pygal.spec @@ -27,6 +27,9 @@ URL: http://pygal.org/ Source: https://files.pythonhosted.org/packages/source/p/pygal/pygal-%{version}.tar.gz Source10: https://raw.githubusercontent.com/Kozea/pygal/%{version}/COPYING Patch0: python38.patch +# PATCH-FIX-UPSTREAM pytest4.patch gh#Kozea/pygal#340 mcepl@suse.com +# yes, THIS is what makes this test suite pytest4+ compatible! +Patch1: pytest4.patch BuildRequires: %{python_module Flask} BuildRequires: %{python_module lxml} BuildRequires: %{python_module pyquery} @@ -43,8 +46,7 @@ Recommends: python-CairoSVG %endif # SECTION test requirements BuildRequires: %{python_module pytest-runner} -# https://github.com/Kozea/pygal/pull/340 -BuildRequires: %{python_module pytest < 4.0} +BuildRequires: %{python_module pytest} # /SECTION %python_subpackages @@ -54,7 +56,7 @@ It supports various chart types and CSS styling. %prep %setup -q -n pygal-%{version} -%patch0 -p1 +%autopatch -p1 cp %{SOURCE10} . %build From 257931ff6742392f98c7a275b48c7bf97aa6be1b3678ce39ba85700bf1d34dca Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 Nov 2019 14:27:57 +0000 Subject: [PATCH 2/2] Fix SPEC OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygal?expand=0&rev=12 --- pytest4.patch | 15 ++++++++++----- python-pygal.spec | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pytest4.patch b/pytest4.patch index cd804cf..9145600 100644 --- a/pytest4.patch +++ b/pytest4.patch @@ -1,11 +1,16 @@ --- a/setup.cfg +++ b/setup.cfg -@@ -1,7 +1,7 @@ +@@ -1,13 +1,6 @@ [wheel] universal = 1 -[pytest] -+[tools:pytest] - flake8-ignore = - *.py E731 E402 - pygal/__init__.py F401 +-flake8-ignore = +- *.py E731 E402 +- pygal/__init__.py F401 +- pygal/_compat.py F821 F401 +- docs/conf.py ALL +- + [egg_info] + tag_build = + tag_date = 0 diff --git a/python-pygal.spec b/python-pygal.spec index 404bd53..9165b8a 100644 --- a/python-pygal.spec +++ b/python-pygal.spec @@ -57,6 +57,7 @@ It supports various chart types and CSS styling. %prep %setup -q -n pygal-%{version} %autopatch -p1 + cp %{SOURCE10} . %build