From 4e3179c9e2b631ab0c43421014610ee5d972f62b Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Mon, 1 Feb 2021 08:10:34 +0100 Subject: [PATCH] Conditionalize the WX backend And disable it on RHEL 8+ as WX is not available there. --- python-matplotlib.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 2935347..f287859 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -10,6 +10,13 @@ %bcond_without qt4 %endif +# No WX for EL8/ELN/EL9 +%if 0%{?rhel} >= 8 +%bcond_with wx +%else +%bcond_without wx +%endif + # the default backend; one of GTK3Agg GTK3Cairo MacOSX Qt4Agg Qt5Agg TkAgg # WXAgg Agg Cairo PS PDF SVG %global backend TkAgg @@ -42,7 +49,7 @@ Name: python-matplotlib Version: 3.3.4 %global Version 3.3.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 2D plotting library # qt4_editor backend is MIT # ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is Public Domain @@ -254,6 +261,7 @@ Requires: python3-tkinter %description -n python3-matplotlib-tk %{summary} +%if %{with wx} %package -n python3-matplotlib-wx Summary: WX backend for python3-matplotlib BuildRequires: python3-wxpython4 @@ -262,6 +270,7 @@ Requires: python3-wxpython4 %description -n python3-matplotlib-wx %{summary} +%endif %package -n python3-matplotlib-doc Summary: Documentation files for python-matplotlib @@ -429,11 +438,17 @@ PYTHONDONTWRITEBYTECODE=1 \ %pycached %{python3_sitearch}/matplotlib/backends/_backend_tk.py %{python3_sitearch}/matplotlib/backends/_tkagg.* +%if %{with wx} %files -n python3-matplotlib-wx %pycached %{python3_sitearch}/matplotlib/backends/backend_wx*.py +%endif %changelog +* Mon Feb 01 2021 Tomas Popela - 3.3.4-2 +- Conditionalize the WX backend and disable it on RHEL 8+ as WX is not + available there. + * Thu Jan 28 2021 Elliott Sales de Andrade - 3.3.4-1 - Update to latest version (#1921574)