Make TkAgg the default backend
This commit is contained in:
parent
8736c81a32
commit
7731b0f8b4
@ -15,12 +15,16 @@
|
|||||||
%global with_wx 1
|
%global with_wx 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# the default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo
|
||||||
|
# CocoaAgg MacOSX Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG
|
||||||
|
%global backend TkAgg
|
||||||
|
|
||||||
# https://fedorahosted.org/fpc/ticket/381
|
# https://fedorahosted.org/fpc/ticket/381
|
||||||
%global with_bundled_fonts 1
|
%global with_bundled_fonts 1
|
||||||
|
|
||||||
Name: python-matplotlib
|
Name: python-matplotlib
|
||||||
Version: 1.3.1
|
Version: 1.3.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Python 2D plotting library
|
Summary: Python 2D plotting library
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
# qt4_editor backend is MIT
|
# qt4_editor backend is MIT
|
||||||
@ -80,6 +84,15 @@ 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
|
||||||
|
%if "%{backend}" == "TkAgg"
|
||||||
|
Requires: %{name}-tk%{?_isa} = %{version}-%{release}
|
||||||
|
%else
|
||||||
|
% if "%{backend}" == "Qt4Agg"
|
||||||
|
Requires: %{name}-qt4%{?_isa} = %{version}-%{release}
|
||||||
|
% endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Matplotlib is a python 2D plotting library which produces publication
|
Matplotlib is a python 2D plotting library which produces publication
|
||||||
quality figures in a variety of hardcopy formats and interactive
|
quality figures in a variety of hardcopy formats and interactive
|
||||||
@ -140,7 +153,6 @@ BuildRequires: dvipng
|
|||||||
|
|
||||||
%package data
|
%package data
|
||||||
Summary: Data used by python-matplotlib
|
Summary: Data used by python-matplotlib
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
%if %{with_bundled_fonts}
|
%if %{with_bundled_fonts}
|
||||||
Requires: %{name}-data-fonts = %{version}-%{release}
|
Requires: %{name}-data-fonts = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
@ -184,6 +196,13 @@ 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}
|
||||||
|
%else
|
||||||
|
% if "%{backend}" == "Qt4Agg"
|
||||||
|
Requires: python3-matplotlib-qt4%{?_isa} = %{version}-%{release}
|
||||||
|
% 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
|
||||||
@ -222,6 +241,7 @@ Requires: python3-tkinter
|
|||||||
|
|
||||||
# Copy setup.cfg to the builddir
|
# Copy setup.cfg to the builddir
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
sed -i 's/\(backend = \).*/\1%{backend}/' setup.cfg
|
||||||
|
|
||||||
# Keep this until next version, and increment if changing from
|
# Keep this until next version, and increment if changing from
|
||||||
# USE_FONTCONFIG to False or True so that cache is regenerated
|
# USE_FONTCONFIG to False or True so that cache is regenerated
|
||||||
@ -310,7 +330,7 @@ popd
|
|||||||
%if %{run_tests}
|
%if %{run_tests}
|
||||||
%check
|
%check
|
||||||
# This should match the default backend
|
# This should match the default backend
|
||||||
echo "backend : GTKAgg" > matplotlibrc
|
echo "backend : %{backend}" > matplotlibrc
|
||||||
MPLCONFIGDIR=$PWD \
|
MPLCONFIGDIR=$PWD \
|
||||||
MATPLOTLIBDATA=$RPM_BUILD_ROOT%{_datadir}/matplotlib/mpl-data \
|
MATPLOTLIBDATA=$RPM_BUILD_ROOT%{_datadir}/matplotlib/mpl-data \
|
||||||
PYTHONPATH=$RPM_BUILD_ROOT%{python_sitearch} \
|
PYTHONPATH=$RPM_BUILD_ROOT%{python_sitearch} \
|
||||||
@ -417,6 +437,10 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} \
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 11 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.3.1-3
|
||||||
|
- Make TkAgg the default backend
|
||||||
|
- Remove python2 dependency from -data subpackage
|
||||||
|
|
||||||
* Mon Jan 27 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.3.1-2
|
* Mon Jan 27 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.3.1-2
|
||||||
- Correct environment for and enable %%check
|
- Correct environment for and enable %%check
|
||||||
- Install system wide matplotlibrc under /etc
|
- Install system wide matplotlibrc under /etc
|
||||||
|
Loading…
Reference in New Issue
Block a user