Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 179051 Details for
Bug 185692
dev-python/pygtk : dev-python/numeric dependency
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
pygtk-2.13.0-numpy.patch
pygtk-2.13.0-numpy.patch (text/plain), 6.56 KB, created by
Sébastien Fabbro (RETIRED)
on 2009-01-19 22:51:24 UTC
(
hide
)
Description:
pygtk-2.13.0-numpy.patch
Filename:
MIME Type:
Creator:
Sébastien Fabbro (RETIRED)
Created:
2009-01-19 22:51:24 UTC
Size:
6.56 KB
patch
obsolete
>diff -Nur pygtk-2.13.0.orig/configure.ac pygtk-2.13.0/configure.ac >--- pygtk-2.13.0.orig/configure.ac 2009-01-19 21:59:23.745618038 +0000 >+++ pygtk-2.13.0/configure.ac 2009-01-19 22:02:53.691466899 +0000 >@@ -336,18 +336,19 @@ > 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]),, >+ AC_HELP_STRING([--disable-numpy], [Disable numpy 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])],, >+ 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 numpy support])],, > [#include <Python.h>]) >- CPPFLAGS="$save_CPPFLAGS" >+ CPPFLAGS="$save_CPPFLAGS -I$numpy_INCLUDES" > fi > > >diff -Nur pygtk-2.13.0.orig/docs/reference/pygtk-gdkpixbuf.xml pygtk-2.13.0/docs/reference/pygtk-gdkpixbuf.xml >--- pygtk-2.13.0.orig/docs/reference/pygtk-gdkpixbuf.xml 2009-01-19 21:59:23.705618876 +0000 >+++ pygtk-2.13.0/docs/reference/pygtk-gdkpixbuf.xml 2009-01-19 22:07:24.796976315 +0000 >@@ -484,13 +484,13 @@ > <row valign="top"> > <entry>"pixel_array"</entry> > <entry>Read</entry> >- <entry>A numeric array containing the pixel values of the >+ <entry>A numpy array containing the pixel values of the > <link > linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>. The >-contents of the numeric array can be changed even though the array is >+contents of the numpy array can be changed even though the array is > read-only. However you cannot change the pixel data of pixbufs that are > backed by a const string such as stock icon pixbufs. >-<literal>PyGTK</literal> must be compiled with Numeric Python support for >+<literal>PyGTK</literal> must be compiled with numpy support for > this to work.</entry> > </row> > >@@ -2410,7 +2410,7 @@ > <variablelist> > <varlistentry> > <term><emphasis>Returns</emphasis> :</term> >- <listitem><simpara>a Numeric Python array containing the pixel >+ <listitem><simpara>a numpy array containing the pixel > data of the pixbuf</simpara></listitem> > </varlistentry> > </variablelist> >@@ -2420,10 +2420,10 @@ > </note> > > <para>The <methodname>get_pixels_array</methodname>() method returns a >-Numeric Python array containing the pixel data of the pixbuf.</para> >+numpy array containing the pixel data of the pixbuf.</para> > > <note> >- <para>PyGTK must be compiled with Numeric Python support for this >+ <para>PyGTK must be compiled with numpy support for this > method to be available.</para> > </note> > >@@ -2761,7 +2761,7 @@ > </note> > > <para>The <function>gtk.gdk.pixbuf_new_from_array</function>() >-function returns a new pixbuf created from the Numeric Python array >+function returns a new pixbuf created from the numpy array > specified by <parameter>array</parameter>. <parameter>array</parameter> must > be a 3 or 4 dimensional array (4 if the image has an alpha channel) with > <parameter>bits_per_sample</parameter> bits per sample. >@@ -2769,7 +2769,7 @@ > <literal>gtk.gdk.COLORSPACE_RGB</literal>.</para> > > <note> >- <para>PyGTK must be compiled with the Numeric Python module to >+ <para>PyGTK must be compiled with the numpy module to > support this function.</para> > </note> > >diff -Nur pygtk-2.13.0.orig/gtk/gdk.override pygtk-2.13.0/gtk/gdk.override >--- pygtk-2.13.0.orig/gtk/gdk.override 2009-01-19 21:59:23.625620552 +0000 >+++ pygtk-2.13.0/gtk/gdk.override 2009-01-19 22:03:16.638820999 +0000 >@@ -43,7 +43,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 > >diff -Nur pygtk-2.13.0.orig/gtk/gdkpixbuf.override pygtk-2.13.0/gtk/gdkpixbuf.override >--- pygtk-2.13.0.orig/gtk/gdkpixbuf.override 2009-01-19 21:59:23.629619993 +0000 >+++ pygtk-2.13.0/gtk/gdkpixbuf.override 2009-01-19 22:08:05.661044737 +0000 >@@ -63,7 +63,7 @@ > static int > have_numpy(void) > { >- /* Return 1 if Numeric is available, >+ /* Return 1 if numpy is available, > return 0 and set and exception if it is not. */ > static int import_done = 0; > static PyObject *exc_type=NULL, *exc_value=NULL; >@@ -123,7 +123,7 @@ > array->base = (PyObject *)self; > return PyArray_Return(array); > #else >- PyErr_SetString(PyExc_RuntimeError, "pygtk was not compiled with Numeric Python support"); >+ PyErr_SetString(PyExc_RuntimeError, "pygtk was not compiled with numpy support"); > return NULL; > #endif > } >@@ -410,7 +410,7 @@ > return ret; > > #else >- PyErr_SetString(PyExc_RuntimeError, "pygtk was not compiled with Numeric Python support"); >+ PyErr_SetString(PyExc_RuntimeError, "pygtk was not compiled with numpy support"); > return NULL; > #endif > } >diff -Nur pygtk-2.13.0.orig/README pygtk-2.13.0/README >--- pygtk-2.13.0.orig/README 2009-01-19 21:59:23.745618038 +0000 >+++ pygtk-2.13.0/README 2009-01-19 21:59:38.861230833 +0000 >@@ -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: > >diff -Nur pygtk-2.13.0.orig/setup.py pygtk-2.13.0/setup.py >--- pygtk-2.13.0.orig/setup.py 2009-01-19 21:59:23.749618038 +0000 >+++ pygtk-2.13.0/setup.py 2009-01-19 22:04:57.850587168 +0000 >@@ -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',
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 185692
:
125197
|
125199
|
125297
|
125298
| 179051 |
187917
|
187918
|
187920