SHA256
1
0
forked from pool/python-gtk
OBS User unknown 2009-04-27 19:51:59 +00:00 committed by Git OBS Bridge
parent 8b3bc47e70
commit d828269a9e
6 changed files with 147 additions and 26 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4100ed4bf295b03106308f1cfb9931cc22910401dab785f8bd3af9935f1fe13d
size 2175955

112
pygtk-2.14.1-numpy.patch Normal file
View File

@ -0,0 +1,112 @@
Index: gtk/gdk.override
===================================================================
--- gtk/gdk.override (révision 3082)
+++ gtk/gdk.override (copie de travail)
@@ -44,7 +44,7 @@
#define GDK_DISPLAY(object) (GDK_DISPLAY_OBJECT(object))
#ifdef HAVE_NUMPY
-# include <Numeric/arrayobject.h>
+# include <numpy/arrayobject.h>
static int have_numpy(void);
#endif
Index: configure.ac
===================================================================
--- configure.ac (révision 3082)
+++ configure.ac (copie de travail)
@@ -350,18 +350,27 @@
esac
-dnl checks to see if Numeric Python is installed.
+dnl checks to see if numpy is installed.
AC_ARG_ENABLE(numpy,
AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),,
enable_numpy=yes)
if test "x$enable_numpy" != xno; then
save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
- AC_CHECK_HEADER([Numeric/arrayobject.h],
- [AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],,
- [#include <Python.h>])
- CPPFLAGS="$save_CPPFLAGS"
+ numpy_INCLUDES=`$PYTHON -c "import numpy; print numpy.get_include()" 2> /dev/null`
+ if test "x$numpy_INCLUDES" = "x"; then
+ AC_MSG_WARN([Could not find a valid numpy installation, disabling.])
+ enable_numpy=no
+ else
+ CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES -I$numpy_INCLUDES"
+ AC_CHECK_HEADER([numpy/arrayobject.h],
+ [AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],
+ [enable_numpy=no],
+ [#include <Python.h>])
+ if test "x$enable_numpy" != "xno"; then
+ CPPFLAGS="$save_CPPFLAGS -I$numpy_INCLUDES"
+ fi
+ fi
fi
@@ -402,11 +411,11 @@
$have_gtk && echo gtk with $gtk_version API
$have_libglade && echo gtk.glade
$have_gtkunixprint && echo gtk.unixprint
-echo
if test ! $have_atk || ! $have_pango || \
! $have_gtk || ! $have_libglade || \
! $have_pangocairo || ! $have_gtkunixprint; then
+ echo
echo "The following modules will NOT be built:"
echo
$have_atk || echo atk
@@ -416,3 +425,7 @@
$have_libglade || echo gtk.glade
$have_gtkunixprint || echo gtk.unixprint
fi
+
+echo
+echo "Numpy support: $enable_numpy"
+echo
Index: setup.py
===================================================================
--- setup.py (révision 3082)
+++ setup.py (copie de travail)
@@ -228,16 +228,16 @@
data_files.append((DEFS_DIR, ('pangocairo.defs',)))
GLOBAL_MACROS.append(('HAVE_PYCAIRO',1))
if gtk.can_build():
- if '--disable-numeric' in sys.argv:
- sys.argv.remove('--disable-numeric')
+ if '--disable-numpy' in sys.argv:
+ sys.argv.remove('--disable-numpy')
else:
try:
- import Numeric
- Numeric # pyflakes
+ import numpy
+ numpy # pyflakes
GLOBAL_MACROS.append(('HAVE_NUMPY', 1))
except ImportError:
- print ('* Numeric module could not be found, '
- 'will build without Numeric support.')
+ print ('* numpy module could not be found, '
+ 'will build without numpy support.')
ext_modules.append(gtk)
data_files.append((os.path.join(INCLUDE_DIR, 'pygtk'), ('gtk/pygtk.h',)))
data_files.append((DEFS_DIR, ('gtk/gdk.defs', 'gtk/gdk-types.defs',
Index: README
===================================================================
--- README (révision 3082)
+++ README (copie de travail)
@@ -54,7 +54,7 @@
GTK+ 2.14.0 or higher for 2.14 API
* libglade 2.5.0 or higher (optional)
* pycairo 1.0.2 or higher (optional)
- * Numeric (optional)
+ * numpy (optional)
This release is supporting the following GTK+ releases:

3
pygtk-2.14.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:733a5e2e1ca2ca6cf9dae0de9c035d3a428c6ec52774977f60d0618a1a27591a
size 2210535

View File

@ -1,13 +0,0 @@
Index: pygtk-2.12.1/gtk/gtk.override
===================================================================
--- pygtk-2.12.1.orig/gtk/gtk.override
+++ pygtk-2.12.1/gtk/gtk.override
@@ -1168,7 +1168,7 @@ static GSourceFuncs pygtk_main_watch_fun
static GSource *
pygtk_main_watch_new(void)
{
- return g_source_new(&pygtk_main_watch_funcs, sizeof(GSource));
+ return g_source_new(&pygtk_main_watch_funcs, sizeof(PySignalWatchSource));
}

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Apr 21 18:32:41 CEST 2009 - matejcik@suse.cz
- update to 2.14.1
* support for new gtk api
* numerous bugfixes
- removed python-numeric dependency in favour of python-numpy
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jan 10 09:46:38 CET 2009 - olh@suse.de Sat Jan 10 09:46:38 CET 2009 - olh@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package python-gtk (Version 2.12.1) # spec file for package python-gtk (Version 2.14.1)
# #
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -20,27 +20,33 @@
Name: python-gtk Name: python-gtk
%define _name pygtk %define _name pygtk
BuildRequires: fdupes libglade2-devel python-cairo-devel python-devel python-gobject2-devel python-numeric BuildRequires: fdupes libglade2-devel python-cairo-devel python-devel python-gobject2-devel
%if %suse_version > 1020 || 0%{?opensuse_bs} %if %suse_version > 1020 || 0%{?opensuse_bs}
BuildRequires: python-gobject2-doc BuildRequires: python-gobject2-doc
%endif %endif
%if %suse_version > 1110
BuildRequires: python-numpy
Requires: python-numpy
%else
BuildRequires: python-numeric
Requires: python-numeric
%endif
# Only for directory ownership: # Only for directory ownership:
BuildRequires: gtk-doc BuildRequires: gtk-doc
Url: http://www.pygtk.org/ Url: http://www.pygtk.org/
Summary: Python bindings for the GTK+ widget set Summary: Python bindings for the GTK+ widget set
Version: 2.12.1 Version: 2.14.1
Release: 64 Release: 1
License: LGPL v2.1 or later License: LGPL v2.1 or later
Group: Development/Libraries/Python Group: Development/Libraries/Python
Source: %{_name}-%{version}.tar.bz2 Source: %{_name}-%{version}.tar.bz2
Source1: python-gtk-acinclude.m4 Source1: python-gtk-acinclude.m4
# PATCH-FIX-UPSTREAM python-gtk-bgo534083-memory-corruption.patch bnc449152 bgo534083 vuntz@novell.com -- Fix memory corruption Patch1: pygtk-2.14.1-numpy.patch
Patch0: python-gtk-bgo534083-memory-corruption.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define lparen ( %define lparen (
%define rparen ) %define rparen )
%define python_gtk_req %(zgrep -a _required_version %{S:0} | sed -n 's/_required_version,[[:space:]]*/ >= /;s/%{rparen}$//;s/1.0.2%{rparen} dnl or 1.1.7/1.1.7/;s/\\%{lparen}glib\\|gtk\\|libglade\\|gobject\\%{rparen}/&2/;s/py\\%{lparen}.*\\%{rparen} /python-\\1 /;/gtk2unixprint/d;s/^m4_define%{lparen}//p' | tr '\\n' ' ') %define python_gtk_req %(zgrep -a _required_version %{S:0} | sed -n 's/_required_version,[[:space:]]*/ >= /;s/%{rparen}$//;s/1.0.2%{rparen} dnl or 1.1.7/1.1.7/;s/\\%{lparen}glib\\|gtk\\|libglade\\|gobject\\%{rparen}/&2/;s/py\\%{lparen}.*\\%{rparen} /python-\\1 /;/gtk2unixprint/d;s/^m4_define%{lparen}//p' | tr '\\n' ' ')
Requires: %python_gtk_req python-numeric Requires: %python_gtk_req
%{py_requires} %{py_requires}
%description %description
@ -92,7 +98,9 @@ Authors:
%prep %prep
%setup -q -n %{_name}-%{version} %setup -q -n %{_name}-%{version}
cat %{S:1} >>acinclude.m4 cat %{S:1} >>acinclude.m4
%patch0 -p1 %if %suse_version > 1110
%patch1
%endif
%build %build
autoreconf -f -i autoreconf -f -i
@ -105,7 +113,8 @@ find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -v
rm examples/Makefile* rm examples/Makefile*
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
cp -a AUTHORS NEWS README MAPPING ChangeLog THREADS COPYING examples $RPM_BUILD_ROOT%{_docdir}/%{name} cp -a AUTHORS NEWS README MAPPING ChangeLog THREADS COPYING examples $RPM_BUILD_ROOT%{_docdir}/%{name}
chmod +x $RPM_BUILD_ROOT%{_libdir}/pygtk/2.0/{,*/}*.py $RPM_BUILD_ROOT%{_datadir}/pygtk/2.0/*/*.py #chmod +x $RPM_BUILD_ROOT%{_libdir}/pygtk/2.0/{,*/}*.py $RPM_BUILD_ROOT%{_datadir}/pygtk/2.0/*/*.py
chmod +x $RPM_BUILD_ROOT%{_libdir}/pygtk/2.0/{,*/}*.py
%fdupes $RPM_BUILD_ROOT%{_libdir} %fdupes $RPM_BUILD_ROOT%{_libdir}
%fdupes $RPM_BUILD_ROOT%{_datadir} %fdupes $RPM_BUILD_ROOT%{_datadir}
@ -133,6 +142,11 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gtk-doc/html/* %{_datadir}/gtk-doc/html/*
%changelog %changelog
* Tue Apr 21 2009 matejcik@suse.cz
- update to 2.14.1
* support for new gtk api
* numerous bugfixes
- removed python-numeric dependency in favour of python-numpy
* Sat Jan 10 2009 olh@suse.de * Sat Jan 10 2009 olh@suse.de
- remove -fno-schedule-insns workaround, gcc is fixed - remove -fno-schedule-insns workaround, gcc is fixed
* Wed Nov 26 2008 vuntz@novell.com * Wed Nov 26 2008 vuntz@novell.com
@ -331,7 +345,7 @@ rm -rf $RPM_BUILD_ROOT
- Update to 2.8.0. - Update to 2.8.0.
* Wed Aug 10 2005 sbrabec@suse.cz * Wed Aug 10 2005 sbrabec@suse.cz
- Do not require -devel packages. - Do not require -devel packages.
* Tue Aug 02 2005 gekker@suse.de * Wed Aug 03 2005 gekker@suse.de
- update to 2.7.1 (adds gtk 2.8 support) - update to 2.7.1 (adds gtk 2.8 support)
* Tue May 10 2005 mcihar@suse.cz * Tue May 10 2005 mcihar@suse.cz
- update to 2.6.2 - update to 2.6.2