1
0

Accepting request 908606 from devel:languages:python:numeric

OBS-URL: https://build.opensuse.org/request/show/908606
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=89
This commit is contained in:
Dominique Leuenberger 2021-07-28 17:19:34 +00:00 committed by Git OBS Bridge
commit 38ac3b328c
3 changed files with 34 additions and 1 deletions

25
inkscape11.patch Normal file
View File

@ -0,0 +1,25 @@
From 093fdeccef7e8195a31dfabfd4a4b5f1b07c96d5 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
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,

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 27 12:09:25 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Fix tests with inkscape11.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 7 10:02:08 UTC 2021 - Antonio Larrosa <alarrosa@suse.com> Wed Jul 7 10:02:08 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -1,5 +1,5 @@
# #
# spec file for package python-matplotlib # spec file
# #
# Copyright (c) 2021 SUSE LLC # 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 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 # 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 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 Cycler >= 0.10}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module kiwisolver >= 1.0.1} BuildRequires: %{python_module kiwisolver >= 1.0.1}
@ -251,6 +253,7 @@ for %{name} plotting package
%setup -q -n matplotlib-%{version} %setup -q -n matplotlib-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1
#copy freetype to the right location, so that matplotlib will not try to download it #copy freetype to the right location, so that matplotlib will not try to download it
mkdir -p ~/.cache/matplotlib/ mkdir -p ~/.cache/matplotlib/
SHA=($(sha256sum %{SOURCE98})) SHA=($(sha256sum %{SOURCE98}))