[python-matplotlib] fix build with new Tkinter which doesn't return an expected value in __version__

Dan Horák sharkcz at fedoraproject.org
Mon Oct 31 14:24:09 UTC 2011


commit 5446c87d151fa496e0430a4be99217aed5532a21
Author: Dan Horák <dan at danny.cz>
Date:   Mon Oct 31 15:24:03 2011 +0100

    fix build with new Tkinter which doesn't return an expected value in __version__

 matplotlib-1.0.1-tkinter.patch |   12 ++++++++++++
 python-matplotlib.spec         |    8 +++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/matplotlib-1.0.1-tkinter.patch b/matplotlib-1.0.1-tkinter.patch
new file mode 100644
index 0000000..1b92e72
--- /dev/null
+++ b/matplotlib-1.0.1-tkinter.patch
@@ -0,0 +1,12 @@
+diff -up matplotlib-1.0.1/setupext.py.tkinter matplotlib-1.0.1/setupext.py
+--- matplotlib-1.0.1/setupext.py.tkinter	2011-10-31 14:58:44.000000000 +0100
++++ matplotlib-1.0.1/setupext.py	2011-10-31 14:59:14.000000000 +0100
+@@ -829,7 +829,7 @@ def check_for_tk():
+ 
+     if gotit:
+         print_status("Tkinter", "Tkinter: %s, Tk: %s, Tcl: %s" %
+-                     (Tkinter.__version__.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion))
++                     (Tkinter.__version__, Tkinter.TkVersion, Tkinter.TclVersion))
+     else:
+         print_status("Tkinter", "no")
+     if explanation is not None:
diff --git a/python-matplotlib.spec b/python-matplotlib.spec
index 65aea7d..5291f6b 100644
--- a/python-matplotlib.spec
+++ b/python-matplotlib.spec
@@ -19,7 +19,7 @@
 
 Name:           python-matplotlib
 Version:        1.0.1
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        Python plotting library
 
 Group:          Development/Libraries
@@ -38,6 +38,8 @@ Source2:        setup.cfg
 Patch0:         matplotlib-1.0.1-plot_directive.patch
 Patch1:         matplotlib-1.0.1-noagg.patch
 Patch2:		0001-Bugfix-propagate-timezone-info-in-plot_date-xaxis_da.patch
+# fix build when Tkinter doesn't return an expected value in __version__ (FTBFS)
+Patch3:         matplotlib-1.0.1-tkinter.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  python-devel, freetype-devel, libpng-devel, zlib-devel
 BuildRequires:  pygtk2-devel, gtk2-devel
@@ -104,6 +106,7 @@ BuildRequires:  python-basemap
 %endif
 %patch0 -p1
 %patch2 -p1
+%patch3 -p1 -b .tkinter
 
 # Remove bundled libraries
 rm -r agg24 lib/matplotlib//pyparsing.py
@@ -192,6 +195,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Mon Oct 31 2011 Dan Horák <dan[at]danny.cz> - 1.0.1-14
+- fix build with new Tkinter which doesn't return an expected value in __version__
+
 * Thu Sep 15 2011 Jef Spaleta <jspaleta at fedoraproject.org> - 1.0.1-13
 - apply upstream bugfix for timezone formatting (Bug 735677) 
 


More information about the scm-commits mailing list