Simplify ifdeffery a bit

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-02-25 20:41:46 -05:00
parent 8c9cc20e2a
commit 732ad8bbfe

View File

@ -26,6 +26,18 @@
# CocoaAgg MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG # CocoaAgg MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG
%global backend TkAgg %global backend TkAgg
%if "%{backend}" == "TkAgg"
%global backend_subpackage tk
%else
% if "%{backend}" == "Qt4Agg"
%global backend_subpackage qt4
% else
% if "%{backend}" == "Qt5Agg"
%global backend_subpackage qt5
% endif
% endif
%endif
# https://fedorahosted.org/fpc/ticket/381 # https://fedorahosted.org/fpc/ticket/381
%global with_bundled_fonts 1 %global with_bundled_fonts 1
@ -94,20 +106,7 @@ Requires: stix-fonts
%endif %endif
Requires: %{name}-data = %{version}-%{release} Requires: %{name}-data = %{version}-%{release}
# GTKAgg does not require extra subpackages, but does not work with python3 %{?backend_subpackage:Requires: %{name}-%{backend_subpackage}%{?_isa} = %{version}-%{release}}
%if "%{backend}" == "TkAgg"
Requires: %{name}-tk%{?_isa} = %{version}-%{release}
%else
% if "%{backend}" == "Qt4Agg"
Requires: %{name}-qt4%{?_isa} = %{version}-%{release}
% else
% if %{with_qt5}
% if "%{backend}" == "Qt5Agg"
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
% endif
% endif
% endif
%endif
%description %description
Matplotlib is a python 2D plotting library which produces publication Matplotlib is a python 2D plotting library which produces publication
@ -227,19 +226,8 @@ Requires: stix-math-fonts
Requires: stix-fonts Requires: stix-fonts
%endif %endif
Requires: %{name}-data = %{version}-%{release} Requires: %{name}-data = %{version}-%{release}
%if "%{backend}" == "TkAgg"
Requires: python3-matplotlib-tk%{?_isa} = %{version}-%{release} Requires: python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}
%else
% if "%{backend}" == "Qt4Agg"
Requires: python3-matplotlib-qt4%{?_isa} = %{version}-%{release}
% else
% if %{with_qt5}
% if "%{backend}" == "Qt5Agg"
Requires: python3-matplotlib-qt5%{?_isa} = %{version}-%{release}
% endif
% endif
% endif
%endif
%description -n python3-matplotlib %description -n python3-matplotlib
Matplotlib is a python 2D plotting library which produces publication Matplotlib is a python 2D plotting library which produces publication