forked from pool/python-matplotlib
f002773750
1 OBS-URL: https://build.opensuse.org/request/show/258511 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=40
391 lines
13 KiB
RPMSpec
391 lines
13 KiB
RPMSpec
#
|
|
# spec file for package python-matplotlib
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-matplotlib
|
|
Version: 1.4.2
|
|
Release: 0
|
|
Summary: Plotting Library for Python
|
|
License: SUSE-Matplotlib
|
|
Group: Development/Libraries/Python
|
|
Url: http://sourceforge.net/projects/matplotlib
|
|
Source: matplotlib-%{version}.tar.gz
|
|
Source1: matplotlib-setup.cfg
|
|
Source2: matplotlibplugin.py
|
|
Source3: matplotlibwidget.py
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: agg-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: fltk-devel
|
|
BuildRequires: freetype2-devel >= 2.3
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: ghostscript
|
|
BuildRequires: libpng-devel >= 1.2
|
|
BuildRequires: libxml2-tools
|
|
BuildRequires: pkg-config
|
|
BuildRequires: poppler-tools
|
|
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 -- Not doing tests because they take too long
|
|
# BuildRequires: inkscape
|
|
# 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: tcl
|
|
BuildRequires: tcl-devel
|
|
BuildRequires: tk
|
|
BuildRequires: tk-devel
|
|
# 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: libxml2-tools
|
|
Recommends: python-Pillow
|
|
Recommends: poppler-tools
|
|
Recommends: python-matplotlib-tk
|
|
%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
|
|
|
|
%description
|
|
matplotlib is a python 2D plotting library which produces publication
|
|
quality figures in a variety of hardcopy formats and interactive
|
|
environments across platforms. matplotlib can be used in python
|
|
scripts, the python and ipython shell (ala matlab or mathematica), web
|
|
application servers, and six graphical user interface toolkits.
|
|
|
|
%package cairo
|
|
Summary: Cairo backend for %{name}
|
|
License: SUSE-Matplotlib
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: python-cairocffi
|
|
|
|
%description cairo
|
|
This package includes the non-interactive Cairo-based backend
|
|
for the %{name} plotting package
|
|
|
|
%package gtk2
|
|
Summary: GTK2 backends for %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: %{name}-cairo = %{version}
|
|
Requires: python-gobject2
|
|
Requires: python-gtk >= 2.2.0
|
|
|
|
%description gtk2
|
|
This package includes the GTK2-based gdk, gtk, gtkagg, and
|
|
gtkcairo backends for the %{name} plotting package
|
|
|
|
%package gtk3
|
|
Summary: GTK3 backends for %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: %{name}-cairo = %{version}
|
|
Requires: python-gobject
|
|
|
|
%description gtk3
|
|
This package includes the GTK3-based gtk3, gtk3agg, and
|
|
gtk3cairo backends for the %{name} plotting package
|
|
|
|
%package latex
|
|
Summary: Allow rendering latex in %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: texlive-dvipng
|
|
Requires: texlive-latex
|
|
Requires: texlive-sfmath
|
|
Requires: texlive-tex
|
|
|
|
%description latex
|
|
This package allows %{name} to display latex in plots
|
|
and figures.
|
|
|
|
%package qt-shared
|
|
Summary: Shared files for the Qt backends for %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
|
|
%description qt-shared
|
|
This package includes files needed by both the Qt4-based pyqt4 and
|
|
pyside backends and the Qt5-based pyqt5 backend for the %{name}
|
|
plotting package
|
|
|
|
%package qt4
|
|
Summary: Qt4 backends for %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: %{name}-qt-shared = %{version}
|
|
Requires: python-pyside
|
|
Requires: python-qt4 >= 4.0
|
|
|
|
%description qt4
|
|
This package includes the Qt4-based pyqt4 and pyside backends
|
|
for the %{name} plotting package
|
|
|
|
%package qt5
|
|
Summary: Qt5 backend for %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: %{name}-qt-shared = %{version}
|
|
Requires: python-qt5
|
|
|
|
%description qt5
|
|
This package includes the Qt5-based pyqt5 backend
|
|
for the %{name} plotting package
|
|
|
|
%package designer
|
|
Summary: Qt Designer plugin for %{name}
|
|
License: MIT
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name}-qt4 = %{version}
|
|
Requires: qt-creator
|
|
|
|
%description designer
|
|
This is a plugin and widget to let you use %{name}
|
|
plots as widget in PyQt4 GUIs using Qt Designer
|
|
|
|
This plugin comes from Python(x,y)
|
|
|
|
%package tk
|
|
Summary: Tk backend for %{name}
|
|
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
|
|
for the %{name} plotting package
|
|
|
|
%package web
|
|
Summary: Web backend for %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: python-tornado
|
|
|
|
%description web
|
|
This package includes the browser-based webagg backend
|
|
for the %{name} plotting package
|
|
|
|
%package wx
|
|
Summary: WxWidgets backend for %{name}
|
|
License: BSD-2-Clause
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: python-wxWidgets >= 2.8
|
|
|
|
%description wx
|
|
This package includes the wxWidgets-based wxagg backend
|
|
for %{name} plotting package
|
|
|
|
%prep
|
|
%setup -q -n matplotlib-%{version}
|
|
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
|
|
%if 0%{?suse_version} > 1310
|
|
export XDG_RUNTIME_DIR=/tmp
|
|
%endif
|
|
python setup.py build
|
|
|
|
%install
|
|
%if 0%{?suse_version} > 1310
|
|
export XDG_RUNTIME_DIR=/tmp
|
|
%endif
|
|
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
|
|
|
|
# Install designer plugin
|
|
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}/
|
|
|
|
%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}/mpl_toolkits
|
|
%{python_sitearch}/pylab.py*
|
|
%exclude %{python_sitearch}/matplotlib/backends/_backend_gdk.so
|
|
%exclude %{python_sitearch}/matplotlib/backends/_gtkagg.so
|
|
%exclude %{python_sitearch}/matplotlib/backends/_tkagg.so
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_cairo.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_cocoaagg.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gdk.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtkagg.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtkcairo.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3agg.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3cairo.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt4.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt4agg.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt5.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt5agg.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_tkagg.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_webagg.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_webagg_core.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_wx.*
|
|
%exclude %{python_sitearch}/matplotlib/backends/backend_wxagg.*
|
|
%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/qt_editor/
|
|
%exclude %{python_sitearch}/matplotlib/backends/web_backend/
|
|
%exclude %{python_sitearch}/mpl_toolkits/gtktools.*
|
|
|
|
%files cairo
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/matplotlib/backends/backend_cairo.*
|
|
|
|
%files gtk2
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/matplotlib/backends/_backend_gdk.so
|
|
%{python_sitearch}/matplotlib/backends/_gtkagg.so
|
|
%{python_sitearch}/matplotlib/backends/backend_gdk.*
|
|
%{python_sitearch}/matplotlib/backends/backend_gtk.*
|
|
%{python_sitearch}/matplotlib/backends/backend_gtkagg.*
|
|
%{python_sitearch}/matplotlib/backends/backend_gtkcairo.*
|
|
%{python_sitearch}/mpl_toolkits/gtktools.*
|
|
|
|
%files gtk3
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/matplotlib/backends/backend_gtk3.*
|
|
%{python_sitearch}/matplotlib/backends/backend_gtk3agg.*
|
|
%{python_sitearch}/matplotlib/backends/backend_gtk3cairo.*
|
|
|
|
# Dummy package to pull in latex dependencies.
|
|
|
|
%files latex
|
|
%defattr(-,root,root,-)
|
|
%doc doc/users/usetex.rst
|
|
|
|
# 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.*
|
|
%{python_sitearch}/matplotlib/backends/qt4_compat.*
|
|
%{python_sitearch}/matplotlib/backends/qt_editor/
|
|
|
|
%files qt4
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/matplotlib/backends/backend_qt4.*
|
|
%{python_sitearch}/matplotlib/backends/backend_qt4agg.*
|
|
|
|
%files designer
|
|
%defattr(-,root,root,-)
|
|
%dir %{_libdir}/qt4/
|
|
%dir %{_libdir}/qt4/plugins/
|
|
%dir %{_libdir}/qt4/plugins/designer/
|
|
%dir %{_libdir}/qt4/plugins/designer/python/
|
|
%{_libdir}/qt4/plugins/designer/python/matplotlibplugin.py
|
|
%{python_sitearch}/matplotlibwidget.py
|
|
|
|
%if 0%{?suse_version} > 1310
|
|
%files qt5
|
|
%defattr(-,root,root,-)
|
|
# 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 a generic
|
|
# package, and provide this stub package which pulls in the
|
|
# python-qt5 dependency.
|
|
%doc README.rst
|
|
%endif
|
|
|
|
%files tk
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/matplotlib/backends/backend_tkagg.*
|
|
%{python_sitearch}/matplotlib/backends/tkagg.*
|
|
%{python_sitearch}/matplotlib/backends/_tkagg.so
|
|
|
|
%files web
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/matplotlib/backends/backend_webagg.*
|
|
%{python_sitearch}/matplotlib/backends/backend_webagg_core.*
|
|
%{python_sitearch}/matplotlib/backends/web_backend/
|
|
|
|
%files wx
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/matplotlib/backends/backend_wx.*
|
|
%{python_sitearch}/matplotlib/backends/backend_wxagg.*
|
|
|
|
%changelog
|