From 89ec85c1c8f8b39b2842577f88dbc20fc781ba3add755f68fc853475ba1f1f63 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 14 Nov 2012 15:56:34 +0000 Subject: [PATCH] Accepting request 141081 from devel:languages:python update to 1.2.0 python3 package added removed unneded hacks for 11.4 __pycache__ hacks still here, because python3-base not fixed yet (forwarded request 141073 from HighwayStar) OBS-URL: https://build.opensuse.org/request/show/141081 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=22 --- matplotlib-1.1.1.tar.bz2 | 3 - matplotlib-1.2.0.tar.bz2 | 3 + no-multiprocessing-setup.patch | 24 +++++++ py3-matplotlib-setup.cfg | 79 +++++++++++++++++++++++ python-matplotlib.changes | 20 ++++++ python-matplotlib.spec | 2 +- python3-matplotlib.changes | 20 ++++++ python3-matplotlib.spec | 113 +++++++++++++++++++++++++++++++++ 8 files changed, 260 insertions(+), 4 deletions(-) delete mode 100644 matplotlib-1.1.1.tar.bz2 create mode 100644 matplotlib-1.2.0.tar.bz2 create mode 100644 no-multiprocessing-setup.patch create mode 100644 py3-matplotlib-setup.cfg create mode 100644 python3-matplotlib.changes create mode 100644 python3-matplotlib.spec diff --git a/matplotlib-1.1.1.tar.bz2 b/matplotlib-1.1.1.tar.bz2 deleted file mode 100644 index 7630637..0000000 --- a/matplotlib-1.1.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0d8e8ec19edda5c8faed75757f3707435682f066dcd7a886346f1c82c63b4a8 -size 32054422 diff --git a/matplotlib-1.2.0.tar.bz2 b/matplotlib-1.2.0.tar.bz2 new file mode 100644 index 0000000..098291e --- /dev/null +++ b/matplotlib-1.2.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae57b6d256bef5e064d1463f4691d77f89e372f3187e9dfcd191402e3cdaae96 +size 34998477 diff --git a/no-multiprocessing-setup.patch b/no-multiprocessing-setup.patch new file mode 100644 index 0000000..aa5d083 --- /dev/null +++ b/no-multiprocessing-setup.patch @@ -0,0 +1,24 @@ +--- setup.py 2012-11-08 11:24:12.000000000 +0900 ++++ setup.py.patched 2012-11-12 12:57:31.920643001 +0900 +@@ -297,14 +297,14 @@ + # We need to skip certain files that have already been + # converted to Python 3.x + filtered = [x for x in files if should_2to3(x, self.build_lib)] +- if sys.platform.startswith('win'): ++ #if sys.platform.startswith('win'): + # doing this in parallel on windows may crash your computer +- [refactor(f) for f in filtered] +- else: +- p = multiprocessing.Pool() +- for i, x in enumerate(p.imap_unordered(refactor, filtered)): +- print("Running 2to3... %.02f%%" % +- (float(i) / len(filtered) * 100.0), end='\r') ++ [refactor(f) for f in filtered] ++ #else: ++ # p = multiprocessing.Pool() ++ # for i, x in enumerate(p.imap_unordered(refactor, filtered)): ++ # print("Running 2to3... %.02f%%" % ++ # (float(i) / len(filtered) * 100.0), end='\r') + print() + + print_raw("pymods %s" % py_modules) diff --git a/py3-matplotlib-setup.cfg b/py3-matplotlib-setup.cfg new file mode 100644 index 0000000..40525cd --- /dev/null +++ b/py3-matplotlib-setup.cfg @@ -0,0 +1,79 @@ +# Rename this file to setup.cfg to modify matplotlib's +# build options. + +[egg_info] +tag_svn_revision = 1 + +[status] +# To suppress display of the dependencies and their versions +# at the top of the build log, uncomment the following line: +#suppress = True +# +# Uncomment to insert lots of diagnostic prints in extension code +#verbose = True + +[provide_packages] +# By default, matplotlib checks for a few dependencies and +# installs them if missing. This feature can be turned off +# by uncommenting the following lines. Acceptible values are: +# True: install, overwrite an existing installation +# False: do not install +# auto: install only if the package is unavailable. This +# is the default behavior +# +## Date/timezone support: +pytz = False +dateutil = False + + +[gui_support] +# Matplotlib supports multiple GUI toolkits, including Cocoa, +# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of +# these toolkits requires AGG, the Anti-Grain Geometry library, +# which is provided by matplotlib and built by default. +# +# Some backends are written in pure Python, and others require +# extension code to be compiled. By default, matplotlib checks +# for these GUI toolkits during installation and, if present, +# compiles the required extensions to support the toolkit. GTK +# support requires the GTK runtime environment and PyGTK. Wx +# support requires wxWidgets and wxPython. Tk support requires +# Tk and Tkinter. The other GUI toolkits do not require any +# extension code, and can be used as long as the libraries are +# installed on your system. +# +# You can uncomment any the following lines if you know you do +# not want to use the GUI toolkit. Acceptible values are: +# True: build the extension. Exits with a warning if the +# required dependencies are not available +# False: do not build the extension +# auto: build if the required dependencies are available, +# otherwise skip silently. This is the default +# behavior +# +gtk = False +gtkagg = False +tkagg = True +wxagg = False +#macosx = True + +[rc_options] +# User-configurable options +# +# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo, +# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg. +# +# The Agg, Ps, Pdf and SVG backends do not require external +# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, TkAgg or WXAgg +# if you have disabled the relevent extension modules. Agg will be used +# by default. +# +backend = TkAgg +# +# The numerix module was historically used to provide +# compatibility between the Numeric, numarray, and NumPy array +# packages. Now that NumPy has emerge as the universal array +# package for python, numerix is not really necessary and is +# maintained to provide backward compatibility. Do not change +# this unless you have a compelling reason to do so. +#numerix = numpy diff --git a/python-matplotlib.changes b/python-matplotlib.changes index ee54c55..e85e269 100644 --- a/python-matplotlib.changes +++ b/python-matplotlib.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Nov 12 04:24:19 UTC 2012 - highwaystar.ru@gmail.com + +- update to 1.2.0 + * Python 3.x support + * PGF/TikZ backend + * Locator interface + * Tri-Surface Plots + * Control the lengths of colorbar extensions + * Figures are picklable + * Set default bounding box in matplotlibrc + * New Boxplot Functionality + * New RC parameter functionality + * Streamplot + * New hist functionality + * Updated shipped dependencies + * Face-centred colors in tripcolor plots + * Hatching patterns in filled contour plots, with legends +- python3 package added + ------------------------------------------------------------------- Tue Aug 21 02:47:37 UTC 2012 - highwaystar.ru@gmail.com diff --git a/python-matplotlib.spec b/python-matplotlib.spec index b87fc9c..d784ff0 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -18,7 +18,7 @@ %define modname matplotlib Name: python-%{modname} -Version: 1.1.1 +Version: 1.2.0 Release: 0 Summary: Plotting Library for Python diff --git a/python3-matplotlib.changes b/python3-matplotlib.changes new file mode 100644 index 0000000..701ba98 --- /dev/null +++ b/python3-matplotlib.changes @@ -0,0 +1,20 @@ +------------------------------------------------------------------- +Mon Nov 12 04:28:18 UTC 2012 - highwaystar.ru@gmail.com + +- update to 1.2.0 + * Python 3.x support + * PGF/TikZ backend + * Locator interface + * Tri-Surface Plots + * Control the lengths of colorbar extensions + * Figures are picklable + * Set default bounding box in matplotlibrc + * New Boxplot Functionality + * New RC parameter functionality + * Streamplot + * New hist functionality + * Updated shipped dependencies + * Face-centred colors in tripcolor plots + * Hatching patterns in filled contour plots, with legends +- python3 package added + diff --git a/python3-matplotlib.spec b/python3-matplotlib.spec new file mode 100644 index 0000000..bc26bf9 --- /dev/null +++ b/python3-matplotlib.spec @@ -0,0 +1,113 @@ +# +# spec file for package python3-matplotlib +# +# Copyright (c) 2012 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/ +# + + +%define modname matplotlib +Name: python3-%{modname} +Version: 1.2.0 +Release: 0 + +Summary: Plotting Library for Python +License: BSD-2-Clause +Group: Development/Libraries/Python +Url: http://sourceforge.net/projects/%{modname} +Source: %{modname}-%{version}.tar.bz2 +#special config for python3 needed because of lack of wx and gtk backends +Source1: py3-%{modname}-setup.cfg +Patch0: no-multiprocessing-setup.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +BuildRequires: fltk-devel +BuildRequires: freetype2-devel +BuildRequires: gcc-c++ + +BuildRequires: libpng-devel + +BuildRequires: python3-2to3 +BuildRequires: python3-devel +BuildRequires: python3-distribute +BuildRequires: python3-numpy-devel >= 1.2.1 +BuildRequires: python3-tk +BuildRequires: python3-xml +BuildRequires: tcl +BuildRequires: tcl-devel +BuildRequires: tk +BuildRequires: tk-devel + +Requires: python3-dateutil +Requires: python3-numpy >= 1.2.1 +Requires: python3-tz + +BuildRequires: python3-qt4 + +## These packages are required to prevent that matplotlib installs it's +## own versions of the packages from the lib directory +BuildRequires: python3-dateutil +BuildRequires: python3-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 +Summary: Tk backend for python-matplotlib +Group: Development/Libraries/Python +Requires: %{name} = %{version} +Requires: python3-tk + +%description tk +Tk backend for python-matplotlib plotting package + +%prep + +%setup -n matplotlib-%{version} +%patch0 -p0 +chmod -x lib/%{modname}/mpl-data/images/*.svg + +%build +cp %{SOURCE1} ./setup.cfg +python3 setup.py build + +%install +python3 setup.py install -O1 --skip-build --root=%{buildroot} --prefix=%{_prefix} +if [ -d "%{buildroot}%{python3_sitearch}/__pycache__" ]; then + rm -r %{buildroot}%{python3_sitearch}/__pycache__ +fi + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc README.txt CHANGELOG INSTALL +%doc TODO CXX examples +%{python3_sitearch}/%{modname}/ +%{python3_sitearch}/%{modname}-1.2.0-py%{py3_ver}.egg-info +%{python3_sitearch}/mpl_toolkits/ +%{python3_sitearch}/pylab.py* +%exclude %{python3_sitearch}/%{modname}/backends/backend_tkagg.* +%exclude %{python3_sitearch}/%{modname}/backends/tkagg.* + +%files tk +%defattr(-,root,root,-) +%{python3_sitearch}/%{modname}/backends/backend_tkagg.* +%{python3_sitearch}/%{modname}/backends/tkagg.* + +%changelog