1
0

Accepting request 249564 from devel:languages:python

- Dependency and spec file cleanups
- Remove unneeded use-setuptools.diff

OBS-URL: https://build.opensuse.org/request/show/249564
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=36
This commit is contained in:
Stephan Kulow 2014-09-17 15:26:35 +00:00 committed by Git OBS Bridge
parent 39da1c4581
commit 0c7e179ce7
3 changed files with 74 additions and 84 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 10 10:52:26 UTC 2014 - toddrme2178@gmail.com
- Dependency and spec file cleanups
- Remove unneeded use-setuptools.diff
-------------------------------------------------------------------
Thu Aug 28 14:10:38 UTC 2014 - dmueller@suse.com

View File

@ -27,76 +27,83 @@ Source: matplotlib-%{version}.tar.gz
Source1: matplotlib-setup.cfg
Source2: matplotlibplugin.py
Source3: matplotlibwidget.py
Patch0: use-setuptools.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: agg-devel
BuildRequires: fdupes
BuildRequires: fltk-devel
BuildRequires: freetype2-devel
BuildRequires: freetype2-devel >= 2.3
BuildRequires: gcc-c++
BuildRequires: ghostscript
BuildRequires: gtk2-devel
BuildRequires: libpng-devel
BuildRequires: libpng-devel >= 1.2
BuildRequires: libxml2-tools
BuildRequires: pkg-config
BuildRequires: poppler-tools
BuildRequires: python-cairocffi
BuildRequires: python-gtk
BuildRequires: python-gtk-devel
BuildRequires: python-numpy-devel >= 1.2.1
BuildRequires: python-pyparsing
BuildRequires: python-CXX-devel >= 6.2.4
BuildRequires: python-Pillow
BuildRequires: python-dateutil >= 1.1
BuildRequires: python-devel
BuildRequires: python-numpy-devel >= 1.6
BuildRequires: python-pyparsing >= 1.5.6
BuildRequires: python-pytz
BuildRequires: python-setuptools
BuildRequires: python-six >= 1.3
BuildRequires: qhull-devel >= 2003.1
# needed for testing
BuildRequires: python-mock
BuildRequires: python-nose
# cairo dependencies
BuildRequires: python-cairocffi
# GTK dependencies
BuildRequires: gtk2-devel
BuildRequires: libgnome-devel
BuildRequires: python-gobject
BuildRequires: python-gobject-devel
BuildRequires: python-gobject2
BuildRequires: python-gobject2-devel
BuildRequires: python-gtk >= 2.2.0
BuildRequires: python-gtk-devel >= 2.2.0
# latex dependencies
BuildRequires: texlive-dvipng
BuildRequires: texlive-latex
BuildRequires: texlive-sfmath
BuildRequires: texlive-tex
# Qt4 dependencies
BuildRequires: python-pyside
BuildRequires: python-qt4
BuildRequires: python-qt4-devel
# Qt5 dependencies
%if 0%{?suse_version} > 1310
BuildRequires: python-qt5
BuildRequires: python-qt5-devel
%endif
# tk dependencies
BuildRequires: python-tk
BuildRequires: python-tornado
BuildRequires: tcl
BuildRequires: tcl-devel
BuildRequires: texlive-latex
BuildRequires: tk
BuildRequires: tk-devel
# needed for testing
BuildRequires: python-nose
Requires: python-numpy >= 1.2.1
Requires: python-pyparsing
# WebAgg dependencies
BuildRequires: python-tornado
# Wx dependencies
BuildRequires: python-wxWidgets >= 2.8
BuildRequires: wxWidgets-devel
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
Requires: python-dateutil >= 1.1
Requires: python-numpy >= 1.6
Requires: python-pyparsing >= 1.5.6
Requires: python-pytz
Requires: python-six >= 1.3
Recommends: ghostscript
Recommends: inkscape
Recommends: libxml2-tools
Recommends: python-Pillow
Recommends: poppler-tools
Recommends: python-matplotlib-tk
Recommends: texlive-dvipng
Recommends: texlive-latex
Recommends: texlive-sfmath
Recommends: texlive-tex
%py_requires
%if 0%{?suse_version} > 1220
BuildRequires: python-qt4
BuildRequires: python-qt4-devel
BuildRequires: texlive-dvipng
BuildRequires: texlive-sfmath
BuildRequires: texlive-tex
%endif
%if 0%{?suse_version} > 1310
BuildRequires: python-qt5
BuildRequires: python-qt5-devel
%endif
%if 0%{?suse_version} < 1220
BuildRequires: gnome-libs-devel
BuildRequires: python-wxGTK
BuildRequires: wxGTK-devel
%else
BuildRequires: libgnome-devel
BuildRequires: libxml2-tools
BuildRequires: python-gobject
BuildRequires: python-gobject-cairo
BuildRequires: python-gobject-devel
BuildRequires: python-pyside
BuildRequires: python-wxWidgets
BuildRequires: wxWidgets-devel
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif
## These packages are required to prevent that matplotlib installs it's
## own versions of the packages from the lib directory
BuildRequires: python-dateutil
BuildRequires: python-pytz
Requires: python-dateutil
Requires: python-pytz
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
@ -125,7 +132,8 @@ License: BSD-2-Clause
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: %{name}-cairo = %{version}
Requires: python-gtk
Requires: python-gobject2
Requires: python-gtk >= 2.2.0
%description gtk2
This package includes the GTK2-based gdk, gtk, gtkagg, and
@ -138,7 +146,6 @@ Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: %{name}-cairo = %{version}
Requires: python-gobject
Requires: python-gobject-cairo
%description gtk3
This package includes the GTK3-based gtk3, gtk3agg, and
@ -162,7 +169,7 @@ Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: %{name}-qt-shared = %{version}
Requires: python-pyside
Requires: python-qt4
Requires: python-qt4 >= 4.0
%description qt4
This package includes the Qt4-based pyqt4 and pyside backends
@ -199,6 +206,7 @@ License: BSD-2-Clause
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: python-tk
Requires: tcl >= 8.3
%description tk
This package includes the Tk-based tkagg backend
@ -220,11 +228,7 @@ Summary: WxWidgets backend for %{name}
License: BSD-2-Clause
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%if 0%{?sles_version} == 11
Requires: python-wxGTK
%else
Requires: python-wxWidgets
%endif
Requires: python-wxWidgets >= 2.8
%description wx
This package includes the wxWidgets-based wxagg backend
@ -232,8 +236,8 @@ for %{name} plotting package
%prep
%setup -q -n matplotlib-%{version}
%patch0
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||" {} \;
%build
cp %{SOURCE1} ./setup.cfg
@ -249,20 +253,18 @@ export XDG_RUNTIME_DIR=/tmp
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
# Install designer plugin
%if 0%{?suse_version} > 1220
mkdir -p %{buildroot}%{_libdir}/qt4/plugins/designer/python/
install -vm 755 %{SOURCE2} %{buildroot}%{_libdir}/qt4/plugins/designer/python/
install -vm 755 %{SOURCE3} %{buildroot}%{python_sitearch}/
%endif
%fdupes %{buildroot}%{python_sitearch}/matplotlib/tests/baseline_images/
%fdupes %{buildroot}%{python_sitearch}
%files
%defattr(-,root,root,-)
%doc README.rst LICENSE CHANGELOG PKG-INFO examples doc/users/license.rst
%{python_sitearch}/matplotlib/
%{python_sitearch}/matplotlib-%{version}_r0-py*.egg-info
%{python_sitearch}/matplotlib-%{version}_r0-py*-nspkg.pth
%{python_sitearch}/matplotlib/
%{python_sitearch}/mpl_toolkits
%{python_sitearch}/freetype2.so
%{python_sitearch}/pylab.py*
@ -290,7 +292,6 @@ install -vm 755 %{SOURCE3} %{buildroot}%{python_sitearch}/
%exclude %{python_sitearch}/matplotlib/backends/qt_compat.*
%exclude %{python_sitearch}/matplotlib/backends/qt4_compat.*
%exclude %{python_sitearch}/matplotlib/backends/tkagg.*
%exclude %{python_sitearch}/matplotlib/backends/windowing.*
%exclude %{python_sitearch}/matplotlib/backends/qt_editor/
%exclude %{python_sitearch}/matplotlib/backends/web_backend/
%exclude %{python_sitearch}/mpl_toolkits/gtktools.*
@ -307,23 +308,22 @@ install -vm 755 %{SOURCE3} %{buildroot}%{python_sitearch}/
%{python_sitearch}/matplotlib/backends/backend_gtk.*
%{python_sitearch}/matplotlib/backends/backend_gtkagg.*
%{python_sitearch}/matplotlib/backends/backend_gtkcairo.*
%{python_sitearch}/mpl_toolkits/gtktools.py*
%{python_sitearch}/mpl_toolkits/gtktools.*
%if 0%{?suse_version} > 1110
%files gtk3
%defattr(-,root,root,-)
%{python_sitearch}/matplotlib/backends/backend_gtk3.*
%{python_sitearch}/matplotlib/backends/backend_gtk3agg.*
%{python_sitearch}/matplotlib/backends/backend_gtk3cairo.*
%endif
%if 0%{?suse_version} > 1220
%files qt-shared
# IMPORTANT: the qt4 backend makes use of the qt5 backend,
# which is actually a generic qt backend.
# So we need to package all the qt5 stuff in this generic
# package, and provide a stub package which pulls in the
# python-qt5 dependency.
%files qt-shared
%defattr(-,root,root,-)
%{python_sitearch}/matplotlib/backends/backend_qt5.*
%{python_sitearch}/matplotlib/backends/backend_qt5agg.*
%{python_sitearch}/matplotlib/backends/qt_compat.*
@ -354,11 +354,9 @@ install -vm 755 %{SOURCE3} %{buildroot}%{python_sitearch}/
# python-qt5 dependency.
%doc README.rst
%endif
%endif
%files tk
%defattr(-,root,root,-)
%{python_sitearch}/matplotlib/backends/windowing.*
%{python_sitearch}/matplotlib/backends/backend_tkagg.*
%{python_sitearch}/matplotlib/backends/tkagg.*
%{python_sitearch}/matplotlib/backends/_tkagg.so

View File

@ -1,14 +0,0 @@
--- setup.py
+++ setup.py
@@ -5,10 +5,7 @@
from __future__ import print_function, absolute_import
-# This needs to be the very first thing to use distribute
-from distribute_setup import use_setuptools
-use_setuptools()
-
+import setuptools
import sys
# distutils is breaking our sdists for files in symlinked dirs.