# # spec file for package python-matplotlib # # Copyright (c) 2011 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.0.1 Release: 1 License: BSD Group: Development/Libraries/Python Summary: Plotting Library for Python Url: http://sourceforge.net/projects/matplotlib Source: matplotlib-%{version}.tar.bz2 Source1: matplotlib-setup.cfg BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fltk-devel BuildRequires: freetype2-devel BuildRequires: gcc-c++ BuildRequires: gtk2-devel BuildRequires: libpng-devel BuildRequires: python-gtk BuildRequires: python-numpy-devel >= 1.2.1 BuildRequires: python-tk BuildRequires: tcl BuildRequires: tcl-devel BuildRequires: tk BuildRequires: tk-devel Requires: python-configobj 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 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 %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-configobj BuildRequires: python-dateutil BuildRequires: python-tz %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 tk License: BSD Summary: Tk backend for python-matplotlib Group: Development/Libraries/Python Requires: %{name} = %{version} Requires: python-tk %description tk Tk backend for python-matplotlib plotting package %package wx License: BSD Summary: Wx backend for python-matplotlib Group: Development/Libraries/Python Requires: %{name} = %{version} Requires: python-wxGTK %description wx wxWidgets backend for python-matplotlib plotting package %prep %setup -n matplotlib-%{version} chmod -x lib/matplotlib/mpl-data/images/*.svg %build cp %{SOURCE1} ./setup.cfg python setup.py build %install python setup.py install --root=%{buildroot} \ --record-rpm=INSTALLED_FILES --prefix=%{_prefix} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README.txt CHANGELOG INSTALL INTERACTIVE KNOWN_BUGS %doc PKG-INFO TODO CXX examples license %{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 %files tk %defattr(-,root,root,-) %{py_sitedir}/matplotlib/backends/backend_tkagg.* %{py_sitedir}/matplotlib/backends/tkagg.* %{py_sitedir}/matplotlib/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 %changelog