From: Ali Polatel
http://bugzilla.gnome.org/show_bug.cgi?id=397544
Makefile.am hunk added by Daniel Drake
Index: pygtk-2.12.1/configure.in
===================================================================
--- pygtk-2.12.1.orig/configure.in
+++ pygtk-2.12.1/configure.in
@@ -295,18 +295,19 @@ case $gdk_target in
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],
+ numpy_INCLUDES=`$PYTHON -c "import numpy; print numpy.get_include()"`
+ CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES -I$numpy_INCLUDES"
+ AC_CHECK_HEADER([numpy/arrayobject.h],
[AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],,
[#include <Python.h>])
- CPPFLAGS="$save_CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS -I$numpy_INCLUDES"
fi
Index: pygtk-2.12.1/gtk/gdk.override
===================================================================
--- pygtk-2.12.1.orig/gtk/gdk.override
+++ pygtk-2.12.1/gtk/gdk.override
@@ -43,7 +43,7 @@ headers
#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: pygtk-2.12.1/README
===================================================================
--- pygtk-2.12.1.orig/README
+++ pygtk-2.12.1/README
@@ -53,7 +53,7 @@ Requirements
GTK+ 2.12.0 or higher for 2.12 API
* libglade 2.5.0 or higher (optional)
* pycairo 0.5.0 or higher (optional)
- * Numeric (optional)
+ * numpy (optional)
This release is supporting the following GTK+ releases:
Index: pygtk-2.12.1/setup.py
===================================================================
--- pygtk-2.12.1.orig/setup.py
+++ pygtk-2.12.1/setup.py
@@ -233,16 +233,16 @@ if pango.can_build():
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: pygtk-2.12.1/Makefile.am
===================================================================
--- pygtk-2.12.1.orig/Makefile.am
+++ pygtk-2.12.1/Makefile.am
@@ -1,4 +1,5 @@
AUTOMAKE_OPTIONS = 1.7
+ACLOCAL_AMFLAGS = -I m4
if BUILD_GTK
GTK_SUBDIR = gtk