|
|
cb9d481 |
From: Ali Polatel
|
|
|
cb9d481 |
http://bugzilla.gnome.org/show_bug.cgi?id=397544
|
|
|
cb9d481 |
|
|
|
cb9d481 |
Makefile.am hunk added by Daniel Drake
|
|
|
cb9d481 |
|
|
|
cb9d481 |
Index: pygtk-2.12.1/configure.in
|
|
|
cb9d481 |
===================================================================
|
|
|
cb9d481 |
--- pygtk-2.12.1.orig/configure.in
|
|
|
cb9d481 |
+++ pygtk-2.12.1/configure.in
|
|
|
cb9d481 |
@@ -295,18 +295,19 @@ case $gdk_target in
|
|
|
cb9d481 |
esac
|
|
|
cb9d481 |
|
|
|
cb9d481 |
|
|
|
cb9d481 |
-dnl checks to see if Numeric Python is installed.
|
|
|
cb9d481 |
+dnl checks to see if numpy is installed.
|
|
|
cb9d481 |
AC_ARG_ENABLE(numpy,
|
|
|
cb9d481 |
AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),,
|
|
|
cb9d481 |
enable_numpy=yes)
|
|
|
cb9d481 |
|
|
|
cb9d481 |
if test "x$enable_numpy" != xno; then
|
|
|
cb9d481 |
save_CPPFLAGS="$CPPFLAGS"
|
|
|
cb9d481 |
- CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
|
|
|
cb9d481 |
- AC_CHECK_HEADER([Numeric/arrayobject.h],
|
|
|
cb9d481 |
+ numpy_INCLUDES=`$PYTHON -c "import numpy; print numpy.get_include()"`
|
|
|
cb9d481 |
+ CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES -I$numpy_INCLUDES"
|
|
|
cb9d481 |
+ AC_CHECK_HEADER([numpy/arrayobject.h],
|
|
|
cb9d481 |
[AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],,
|
|
|
cb9d481 |
[#include <Python.h>])
|
|
|
cb9d481 |
- CPPFLAGS="$save_CPPFLAGS"
|
|
|
cb9d481 |
+ CPPFLAGS="$save_CPPFLAGS -I$numpy_INCLUDES"
|
|
|
cb9d481 |
fi
|
|
|
cb9d481 |
|
|
|
cb9d481 |
|
|
|
cb9d481 |
Index: pygtk-2.12.1/gtk/gdk.override
|
|
|
cb9d481 |
===================================================================
|
|
|
cb9d481 |
--- pygtk-2.12.1.orig/gtk/gdk.override
|
|
|
cb9d481 |
+++ pygtk-2.12.1/gtk/gdk.override
|
|
|
cb9d481 |
@@ -43,7 +43,7 @@ headers
|
|
|
cb9d481 |
#define GDK_DISPLAY(object) (GDK_DISPLAY_OBJECT(object))
|
|
|
cb9d481 |
|
|
|
cb9d481 |
#ifdef HAVE_NUMPY
|
|
|
cb9d481 |
-# include <Numeric/arrayobject.h>
|
|
|
cb9d481 |
+# include <numpy/arrayobject.h>
|
|
|
cb9d481 |
static int have_numpy(void);
|
|
|
cb9d481 |
#endif
|
|
|
cb9d481 |
|
|
|
cb9d481 |
Index: pygtk-2.12.1/README
|
|
|
cb9d481 |
===================================================================
|
|
|
cb9d481 |
--- pygtk-2.12.1.orig/README
|
|
|
cb9d481 |
+++ pygtk-2.12.1/README
|
|
|
cb9d481 |
@@ -53,7 +53,7 @@ Requirements
|
|
|
cb9d481 |
GTK+ 2.12.0 or higher for 2.12 API
|
|
|
cb9d481 |
* libglade 2.5.0 or higher (optional)
|
|
|
cb9d481 |
* pycairo 0.5.0 or higher (optional)
|
|
|
cb9d481 |
- * Numeric (optional)
|
|
|
cb9d481 |
+ * numpy (optional)
|
|
|
cb9d481 |
|
|
|
cb9d481 |
This release is supporting the following GTK+ releases:
|
|
|
cb9d481 |
|
|
|
cb9d481 |
Index: pygtk-2.12.1/setup.py
|
|
|
cb9d481 |
===================================================================
|
|
|
cb9d481 |
--- pygtk-2.12.1.orig/setup.py
|
|
|
cb9d481 |
+++ pygtk-2.12.1/setup.py
|
|
|
cb9d481 |
@@ -233,16 +233,16 @@ if pango.can_build():
|
|
|
cb9d481 |
data_files.append((DEFS_DIR, ('pangocairo.defs',)))
|
|
|
cb9d481 |
GLOBAL_MACROS.append(('HAVE_PYCAIRO',1))
|
|
|
cb9d481 |
if gtk.can_build():
|
|
|
cb9d481 |
- if '--disable-numeric' in sys.argv:
|
|
|
cb9d481 |
- sys.argv.remove('--disable-numeric')
|
|
|
cb9d481 |
+ if '--disable-numpy' in sys.argv:
|
|
|
cb9d481 |
+ sys.argv.remove('--disable-numpy')
|
|
|
cb9d481 |
else:
|
|
|
cb9d481 |
try:
|
|
|
cb9d481 |
- import Numeric
|
|
|
cb9d481 |
- Numeric # pyflakes
|
|
|
cb9d481 |
+ import numpy
|
|
|
cb9d481 |
+ numpy # pyflakes
|
|
|
cb9d481 |
GLOBAL_MACROS.append(('HAVE_NUMPY', 1))
|
|
|
cb9d481 |
except ImportError:
|
|
|
cb9d481 |
- print ('* Numeric module could not be found, '
|
|
|
cb9d481 |
- 'will build without Numeric support.')
|
|
|
cb9d481 |
+ print ('* numpy module could not be found, '
|
|
|
cb9d481 |
+ 'will build without numpy support.')
|
|
|
cb9d481 |
ext_modules.append(gtk)
|
|
|
cb9d481 |
data_files.append((os.path.join(INCLUDE_DIR, 'pygtk'), ('gtk/pygtk.h',)))
|
|
|
cb9d481 |
data_files.append((DEFS_DIR, ('gtk/gdk.defs', 'gtk/gdk-types.defs',
|
|
|
cb9d481 |
Index: pygtk-2.12.1/Makefile.am
|
|
|
cb9d481 |
===================================================================
|
|
|
cb9d481 |
--- pygtk-2.12.1.orig/Makefile.am
|
|
|
cb9d481 |
+++ pygtk-2.12.1/Makefile.am
|
|
|
cb9d481 |
@@ -1,4 +1,5 @@
|
|
|
cb9d481 |
AUTOMAKE_OPTIONS = 1.7
|
|
|
cb9d481 |
+ACLOCAL_AMFLAGS = -I m4
|
|
|
cb9d481 |
|
|
|
cb9d481 |
if BUILD_GTK
|
|
|
cb9d481 |
GTK_SUBDIR = gtk
|