From aa183fc4b8d986bb22165f4f9cbf71fea19570010d3bd3f9adf01e023ef2e47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 27 Jul 2021 12:49:17 +0000 Subject: [PATCH] Accepting request 908596 from home:mcalabkova:branches:devel:languages:python:numeric - Fix tests with inkscape11.patch OBS-URL: https://build.opensuse.org/request/show/908596 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-matplotlib?expand=0&rev=54 --- inkscape11.patch | 25 +++++++++++++++++++++++++ python-matplotlib.changes | 5 +++++ python-matplotlib.spec | 5 ++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 inkscape11.patch diff --git a/inkscape11.patch b/inkscape11.patch new file mode 100644 index 0000000..0bc737d --- /dev/null +++ b/inkscape11.patch @@ -0,0 +1,25 @@ +From 093fdeccef7e8195a31dfabfd4a4b5f1b07c96d5 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Wed, 21 Jul 2021 22:18:54 -0400 +Subject: [PATCH] Fix tests with Inkscape 1.1. + +The change is imperceptible, so just increase the tolerance. + +Fixes #20617. +--- + lib/matplotlib/tests/test_axes.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py +index 2211962cdf01..a885afe70c91 100644 +--- a/lib/matplotlib/tests/test_axes.py ++++ b/lib/matplotlib/tests/test_axes.py +@@ -1372,7 +1372,7 @@ def test_markevery_line(): + ax.legend() + + +-@image_comparison(['markevery_linear_scales'], remove_text=True) ++@image_comparison(['markevery_linear_scales'], remove_text=True, tol=0.001) + def test_markevery_linear_scales(): + cases = [None, + 8, diff --git a/python-matplotlib.changes b/python-matplotlib.changes index a0ca064..b615646 100644 --- a/python-matplotlib.changes +++ b/python-matplotlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 27 12:09:25 UTC 2021 - Markéta Machová + +- Fix tests with inkscape11.patch + ------------------------------------------------------------------- Wed Jul 7 10:02:08 UTC 2021 - Antonio Larrosa diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 3d1a8f0..8c2ab9c 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -1,5 +1,5 @@ # -# spec file for package python-matplotlib +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -45,6 +45,8 @@ Source99: https://downloads.sourceforge.net/project/freetype/freetype2/2.6 Patch0: 0001-FIX-Pillow-asarray-bug.patch # PATCH-FIX-UPSTREAM 0002-Dont-modify-arrays-when-masking-values-for-log.patch - Fix from upstream for numpy 1.21.0 Patch1: 0002-Dont-modify-arrays-when-masking-values-for-log.patch +# PATCH-FIX-UPSTREAM https://github.com/matplotlib/matplotlib/commit/73b7abf14c77014ab2436e7691e19cbee5864f4b Fix tests with Inkscape 1.1. +Patch2: inkscape11.patch BuildRequires: %{python_module Cycler >= 0.10} BuildRequires: %{python_module devel} BuildRequires: %{python_module kiwisolver >= 1.0.1} @@ -251,6 +253,7 @@ for %{name} plotting package %setup -q -n matplotlib-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 #copy freetype to the right location, so that matplotlib will not try to download it mkdir -p ~/.cache/matplotlib/ SHA=($(sha256sum %{SOURCE98}))