diff --git a/2763.patch b/2763.patch new file mode 100644 index 0000000..00262a7 --- /dev/null +++ b/2763.patch @@ -0,0 +1,42 @@ +From d8fa7bf9d41b7a3e7a548d09be52e957cd4a55de Mon Sep 17 00:00:00 2001 +From: Oliver Beckstein +Date: Mon, 15 Jun 2020 17:31:16 -0700 +Subject: [PATCH] removed matplotlib.use('agg') from tests + +- fix #2191 +diff --git a/MDAnalysisTests-0.20.1/MDAnalysisTests/__init__.py b/MDAnalysisTests-0.20.1/MDAnalysisTests/__init__.py +index e41c7c5808..7a7fef347f 100644 +--- a/MDAnalysisTests-0.20.1/MDAnalysisTests/__init__.py ++++ b/MDAnalysisTests-0.20.1/MDAnalysisTests/__init__.py +@@ -118,14 +118,10 @@ + os.environ['DUECREDIT_ENABLE'] = 'yes' + + # Any tests that plot with matplotlib need to run with the simple agg backend +-# because on Travis there is no DISPLAY set. This doesn't warn if we import +-# files from the tests after loading matplotlib. This will remove unnecessary +-# user warnings. +-try: +- import matplotlib +- matplotlib.use('agg', warn=False) +-except ImportError: +- pass ++# because on Travis there is no DISPLAY set. ++# ++# Instead of using matplotlib.use() we set MPLBACKEND=agg in the CI environment. ++# See https://matplotlib.org/3.2.1/tutorials/introductory/usage.html#backends + + from MDAnalysisTests.util import ( + block_import, +diff --git a/MDAnalysisTests-0.20.1/MDAnalysisTests/visualization/test_streamlines.py b/MDAnalysisTests-0.20.1/MDAnalysisTests/visualization/test_streamlines.py +index 8e446a0e72..333d8fda49 100644 +--- a/MDAnalysisTests-0.20.1/MDAnalysisTests/visualization/test_streamlines.py ++++ b/MDAnalysisTests-0.20.1/MDAnalysisTests/visualization/test_streamlines.py +@@ -29,8 +29,6 @@ + from MDAnalysis.coordinates.XTC import XTCWriter + from MDAnalysisTests.datafiles import Martini_membrane_gro + import pytest +-import matplotlib +-matplotlib.use('agg') + import matplotlib.pyplot as plt + import os + diff --git a/python-MDAnalysis.spec b/python-MDAnalysis.spec index 000abe9..f815293 100644 --- a/python-MDAnalysis.spec +++ b/python-MDAnalysis.spec @@ -3,7 +3,7 @@ Name: python-%{pname} Version: 0.20.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Analyze and manipulate molecular dynamics trajectories License: GPLv2+ and BSD and MIT and CC-BY-ND # BSD: @@ -24,6 +24,8 @@ Source2: https://github.com/%{pname}/mdanalysis/files/1935925/pypidoc.zip # force rebuild of cythonized intermediate sources Patch1: %{name}-cython.patch Patch2: %{name}-flags.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1853117 +Patch3: 2763.patch # 32-bit archs: https://github.com/MDAnalysis/mdanalysis/issues/2342 # ppc64le, aarch64: https://github.com/MDAnalysis/mdanalysis/issues/2343 ExcludeArch: i686 armv7hl s390x ppc64le aarch64 @@ -108,6 +110,7 @@ This package contains the documentation %setup -q -n %{pname}-%{version} -a 1 %patch1 -p1 -b .cython %patch2 -p1 -b .flags +%patch3 -p1 # force rebuild of Egg Metadata rm -r %{pname}.egg-info rm -r %{pname}Tests-%{version}/%{pname}Tests.egg-info @@ -182,6 +185,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib}:%{buildroot}%{python3_sitearch} \ %doc doc/html/* %changelog +* Thu Jul 02 2020 Christoph Junghans - 0.20.1-4 +- Fix build with matplotlib 3.3.0rc1 (bug #1853117) + * Tue May 26 2020 Miro HronĨok - 0.20.1-3 - Rebuilt for Python 3.9