1
0

Accepting request 537215 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/537215
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=56
This commit is contained in:
2017-11-09 12:57:25 +00:00
committed by Git OBS Bridge
parent 0ae8b452de
commit d1a04dc29b
9 changed files with 60 additions and 254 deletions

View File

@@ -23,7 +23,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-matplotlib
Version: 2.0.2
Version: 2.1.0
Release: 0
Summary: Plotting Library for Python
License: SUSE-Matplotlib
@@ -31,16 +31,6 @@ Group: Development/Libraries/Python
Url: http://matplotlib.org
Source: https://files.pythonhosted.org/packages/source/m/matplotlib/matplotlib-%{version}.tar.gz
Source1: matplotlib-setup.cfg
Source2: 166a14473272_contour_manual_colors_and_levels.png
# PATCH-FIX-OPENSUSE 0001-Fix-include-path-for-system-libqhull.patch stefan.bruens@rwth-aachen.de -- avoid using bundled qhull, fixed in mpl 2.1.0
Patch0: 0001-Fix-include-path-for-system-libqhull.patch
# PATCH-FIX-UPSTREAM 0001-Allow-divmod-to-be-overridden-by-num.patch stefan.bruens@rwth-aachen.de -- fix testcase https://github.com/matplotlib/matplotlib/pull/8735.patch
Patch1: 0001-Allow-divmod-to-be-overridden-by-num.patch
# PATCH-FIX-UPSTREAM 166a14473272_Fix-contour-colour-level-determination.patch stefan.bruens@rwth-aachne.de - fix countours https://github.com/matplotlib/matplotlib/commit/166a14473272.patch
Patch2: 166a14473272_Fix-contour-colour-level-determination.patch
# PATCH-FIX-UPSTREAM 97e170d2fc2c_Pass-integers-to-np_linspace.patch stefan.bruens@rwth-aachne.de - fix geo projections https://github.com/matplotlib/matplotlib/commit/97e170d2fc2c.patch
Patch3: 97e170d2fc2c_Pass-integers-to-np_linspace.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: c++_compiler
BuildRequires: fdupes
BuildRequires: pkg-config
@@ -245,10 +235,6 @@ for %{name} plotting package
%prep
%setup -q -n matplotlib-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
chmod -x lib/matplotlib/mpl-data/images/*.svg
find examples lib/matplotlib lib/mpl_toolkits/mplot3d -type f -name "*.py" -exec sed -i "s|#!\/usr\/bin\/env python||" {} \;
find examples lib/matplotlib lib/mpl_toolkits/mplot3d -type f -name "*.py" -exec sed -i "s|#!\/usr\/bin\/python||" {} \;
@@ -257,7 +243,6 @@ cp %{SOURCE1} ./setup.cfg
%if %{without tests}
sed -i -e 's/tests = .*/tests = False/' ./setup.cfg
%else
cp %{SOURCE2} lib/matplotlib/tests/baseline_images/test_contour/contour_manual_colors_and_levels.png
# raise tolerance for changes due to freetype 2.6/2.7 rendering differences
sed -i -e 's/\(image_comparison.*\)tol=0/\1tol=0.310/' lib/matplotlib/testing/decorators.py # default
sed -i -e 's/tol=0.002/tol=0.009/' lib/matplotlib/tests/test_streamplot.py
@@ -289,7 +274,9 @@ trap "kill $! || true" EXIT
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst LICENSE CHANGELOG PKG-INFO examples doc/users/license.rst
%doc README.rst PKG-INFO doc/users/license.rst
%doc examples/
%doc LICENSE/
%{python_sitearch}/matplotlib/
%{python_sitearch}/matplotlib-%{version}-py*.egg-info
%{python_sitearch}/matplotlib-%{version}-py*-nspkg.pth
@@ -310,12 +297,9 @@ trap "kill $! || true" EXIT
%exclude %{python_sitearch}/matplotlib/backends/backend_webagg_core.*
%exclude %{python_sitearch}/matplotlib/backends/qt_compat.*
%exclude %{python_sitearch}/matplotlib/backends/qt_editor/
%exclude %{python_sitearch}/matplotlib/backends/qt4_compat.*
%exclude %{python_sitearch}/matplotlib/backends/tkagg.*
%exclude %{python_sitearch}/matplotlib/backends/web_backend/
%endif
%ifpycache
%if 0%{?is_opensuse}
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_cairo.*
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3.*
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3agg.*
@@ -328,12 +312,9 @@ trap "kill $! || true" EXIT
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_webagg.*
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_webagg_core.*
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/qt_compat.*
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/qt4_compat.*
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/tkagg.*
%endif
%endif
%ifpython2
%if 0%{?is_opensuse}
%exclude %{python_sitearch}/matplotlib/backends/backend_wx.py*
%exclude %{python_sitearch}/matplotlib/backends/backend_wxagg.py*
%exclude %{python_sitearch}/matplotlib/backends/wx_compat.py*
@@ -343,7 +324,7 @@ trap "kill $! || true" EXIT
# Dummy package to pull in latex dependencies.
%files %{python_files latex}
%defattr(-,root,root,-)
%doc doc/users/usetex.rst
%doc README.rst
%if 0%{?is_opensuse}
@@ -370,12 +351,10 @@ trap "kill $! || true" EXIT
%defattr(-,root,root,-)
%{python_sitearch}/matplotlib/backends/backend_qt5.py*
%{python_sitearch}/matplotlib/backends/backend_qt5agg.py*
%{python_sitearch}/matplotlib/backends/qt4_compat.py*
%{python_sitearch}/matplotlib/backends/qt_compat.py*
%{python_sitearch}/matplotlib/backends/qt_editor/
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt5.*.py*
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt5agg.*.py*
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/qt4_compat.*.py*
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/qt_compat.*.py*
%files %{python_files qt4}