Accepting request 109897 from devel:languages:python
- Cleaned up spec file formatting - Removed tests for obsolete openSUSE versions - Added Qt Designer plugin from Python(x,y) project (forwarded request 109846 from TheBlackCat) OBS-URL: https://build.opensuse.org/request/show/109897 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=17
This commit is contained in:
committed by
Git OBS Bridge
parent
e6f3e8423e
commit
19b8da8351
@@ -15,16 +15,19 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
Name: python-matplotlib
|
||||
%define modname matplotlib
|
||||
Name: python-%{modname}
|
||||
Version: 1.1.0
|
||||
Release: 0
|
||||
|
||||
Summary: Plotting Library for Python
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Libraries/Python
|
||||
Url: http://sourceforge.net/projects/matplotlib
|
||||
Source: matplotlib-%{version}.tar.bz2
|
||||
Source1: matplotlib-setup.cfg
|
||||
Url: http://sourceforge.net/projects/%{modname}
|
||||
Source: %{modname}-%{version}.tar.bz2
|
||||
Source1: %{modname}-setup.cfg
|
||||
Source2: %{modname}plugin.py
|
||||
Source3: %{modname}widget.py
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
BuildRequires: fltk-devel
|
||||
@@ -33,6 +36,7 @@ BuildRequires: gcc-c++
|
||||
BuildRequires: gtk2-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: python-gtk
|
||||
BuildRequires: python-gtk-devel
|
||||
BuildRequires: python-numpy-devel >= 1.2.1
|
||||
BuildRequires: python-tk
|
||||
BuildRequires: tcl
|
||||
@@ -44,25 +48,16 @@ Requires: python-dateutil
|
||||
Requires: python-numpy >= 1.2.1
|
||||
Requires: python-tz
|
||||
%py_requires
|
||||
%if %suse_version > 1130
|
||||
BuildRequires: python-wxWidgets
|
||||
BuildRequires: wxWidgets-devel
|
||||
%else
|
||||
%if 0%{?sles_version} == 11
|
||||
BuildRequires: gnome-libs-devel
|
||||
BuildRequires: python-qt
|
||||
BuildRequires: python-wxGTK
|
||||
BuildRequires: wxGTK-devel
|
||||
%endif
|
||||
BuildRequires: python-gtk-devel
|
||||
%if 0%{?suse_version} >= 1120
|
||||
BuildRequires: python-qt4
|
||||
%else
|
||||
BuildRequires: python-qt
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1130
|
||||
BuildRequires: libgnome-devel
|
||||
%else
|
||||
BuildRequires: gnome-libs-devel
|
||||
%endif
|
||||
%if %suse_version > 1130
|
||||
BuildRequires: python-qt4
|
||||
BuildRequires: python-wxWidgets
|
||||
BuildRequires: wxWidgets-devel
|
||||
%define _use_internal_dependency_generator 0
|
||||
%define __find_requires %wx_requires
|
||||
%endif
|
||||
@@ -81,26 +76,40 @@ scripts, the python and ipython shell (ala matlab or mathematica), web
|
||||
application servers, and six graphical user interface toolkits.
|
||||
|
||||
%package tk
|
||||
Summary: Tk backend for python-matplotlib
|
||||
Summary: Tk backend for %{name}
|
||||
Group: Development/Libraries/Python
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python-tk
|
||||
|
||||
%description tk
|
||||
Tk backend for python-matplotlib plotting package
|
||||
Tk backend for %{name} plotting package
|
||||
|
||||
%package wx
|
||||
Summary: Wx backend for python-matplotlib
|
||||
Summary: Wx backend for %{name}
|
||||
Group: Development/Libraries/Python
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python-wxGTK
|
||||
|
||||
%description wx
|
||||
wxWidgets backend for python-matplotlib plotting package
|
||||
wxWidgets backend for %{name} plotting package
|
||||
|
||||
%package designer
|
||||
Summary: %{name} widget for Qt Designer
|
||||
Group: Development/Libraries/Python
|
||||
License: MIT
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python-qt4
|
||||
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)
|
||||
|
||||
%prep
|
||||
%setup -n matplotlib-%{version}
|
||||
chmod -x lib/matplotlib/mpl-data/images/*.svg
|
||||
chmod -x lib/%{modname}/mpl-data/images/*.svg
|
||||
|
||||
%build
|
||||
cp %{SOURCE1} ./setup.cfg
|
||||
@@ -109,36 +118,45 @@ python setup.py build
|
||||
%install
|
||||
python setup.py install --root=%{buildroot} \
|
||||
--record-rpm=INSTALLED_FILES --prefix=%{_prefix}
|
||||
mkdir -p %{buildroot}%{_libdir}/qt4/PyQt4/plugins/
|
||||
cp -v %{SOURCE2} %{buildroot}%{_libdir}/qt4/PyQt4/plugins/
|
||||
cp -v %{SOURCE3} %{buildroot}%{py_sitedir}/%{modname}/
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.txt CHANGELOG INSTALL
|
||||
%doc README.txt CHANGELOG
|
||||
%doc PKG-INFO TODO CXX examples
|
||||
%{py_sitedir}/*
|
||||
%exclude %{py_sitedir}/matplotlib/backends/backend_tkagg.*
|
||||
%exclude %{py_sitedir}/matplotlib/backends/tkagg.*
|
||||
%exclude %{py_sitedir}/matplotlib/backends/_tkagg.so
|
||||
%exclude %{py_sitedir}/matplotlib/backends/backend_wx.*
|
||||
%exclude %{py_sitedir}/matplotlib/backends/backend_wxagg.*
|
||||
%if %suse_version <= 1020
|
||||
%exclude %{py_sitedir}/matplotlib/backends/_wxagg.so
|
||||
%endif
|
||||
%{py_sitedir}/%{modname}-%{version}-py%{py_ver}.egg-info
|
||||
%{py_sitedir}/%{modname}/
|
||||
%{py_sitedir}/mpl_toolkits
|
||||
%{py_sitedir}/pylab.py
|
||||
%{py_sitedir}/pylab.pyc
|
||||
%exclude %{py_sitedir}/%{modname}/backends/backend_tkagg.*
|
||||
%exclude %{py_sitedir}/%{modname}/backends/tkagg.*
|
||||
%exclude %{py_sitedir}/%{modname}/backends/_tkagg.so
|
||||
%exclude %{py_sitedir}/%{modname}/backends/backend_wx.*
|
||||
%exclude %{py_sitedir}/%{modname}/backends/backend_wxagg.*
|
||||
%exclude %{py_sitedir}/%{modname}/%{modname}widget.py
|
||||
|
||||
%files tk
|
||||
%defattr(-,root,root,-)
|
||||
%{py_sitedir}/matplotlib/backends/backend_tkagg.*
|
||||
%{py_sitedir}/matplotlib/backends/tkagg.*
|
||||
%{py_sitedir}/matplotlib/backends/_tkagg.so
|
||||
%{py_sitedir}/%{modname}/backends/backend_tkagg.*
|
||||
%{py_sitedir}/%{modname}/backends/tkagg.*
|
||||
%{py_sitedir}/%{modname}/backends/_tkagg.so
|
||||
|
||||
%files wx
|
||||
%defattr(-,root,root,-)
|
||||
%{py_sitedir}/matplotlib/backends/backend_wx.*
|
||||
%{py_sitedir}/matplotlib/backends/backend_wxagg.*
|
||||
%if %suse_version <= 1020
|
||||
%{py_sitedir}/matplotlib/backends/_wxagg.so
|
||||
%endif
|
||||
|
||||
%files designer
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_libdir}/qt4/PyQt4
|
||||
%dir %{_libdir}/qt4/PyQt4/plugins
|
||||
%{_libdir}/qt4/PyQt4/plugins/%{modname}plugin.py
|
||||
%{py_sitedir}/%{modname}/%{modname}widget.py
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user