Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 185692 | Differences between
and this patch

Collapse All | Expand All

(-)gtk/gdk.override (-1 / +1 lines)
Lines 44-50 Link Here
44
#define GDK_DISPLAY(object) (GDK_DISPLAY_OBJECT(object))
44
#define GDK_DISPLAY(object) (GDK_DISPLAY_OBJECT(object))
45
45
46
#ifdef HAVE_NUMPY
46
#ifdef HAVE_NUMPY
47
#  include <Numeric/arrayobject.h>
47
#  include <numpy/arrayobject.h>
48
static int have_numpy(void);
48
static int have_numpy(void);
49
#endif
49
#endif
50
50
(-)configure.ac (-7 / +20 lines)
Lines 350-367 Link Here
350
esac
350
esac
351
351
352
352
353
dnl checks to see if Numeric Python is installed.
353
dnl checks to see if numpy is installed.
354
AC_ARG_ENABLE(numpy,
354
AC_ARG_ENABLE(numpy,
355
  AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),,
355
  AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),,
356
  enable_numpy=yes)
356
  enable_numpy=yes)
357
357
358
if test "x$enable_numpy" != xno; then
358
if test "x$enable_numpy" != xno; then
359
  save_CPPFLAGS="$CPPFLAGS"
359
  save_CPPFLAGS="$CPPFLAGS"
360
  CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
360
  numpy_INCLUDES=`$PYTHON -c "import numpy; print numpy.get_include()" 2> /dev/null`
361
  AC_CHECK_HEADER([Numeric/arrayobject.h],
361
  if test "x$numpy_INCLUDES" = "x"; then
362
    [AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],,
362
    AC_MSG_WARN([Could not find a valid numpy installation, disabling.])
363
    [#include <Python.h>])
363
    enable_numpy=no
364
  CPPFLAGS="$save_CPPFLAGS"
364
  else
365
    CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES -I$numpy_INCLUDES"
366
    AC_CHECK_HEADER([numpy/arrayobject.h],
367
      [AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],
368
      [enable_numpy=no],
369
      [#include <Python.h>])
370
    if test "x$enable_numpy" != "xno"; then
371
      CPPFLAGS="$save_CPPFLAGS -I$numpy_INCLUDES"
372
    fi
373
  fi
365
fi
374
fi
366
375
367
376
Lines 402-412 Link Here
402
$have_gtk && echo     gtk with $gtk_version API
411
$have_gtk && echo     gtk with $gtk_version API
403
$have_libglade && echo     gtk.glade
412
$have_libglade && echo     gtk.glade
404
$have_gtkunixprint && echo     gtk.unixprint
413
$have_gtkunixprint && echo     gtk.unixprint
405
echo
406
414
407
if test ! $have_atk || ! $have_pango || \
415
if test ! $have_atk || ! $have_pango || \
408
        ! $have_gtk || ! $have_libglade || \
416
        ! $have_gtk || ! $have_libglade || \
409
        ! $have_pangocairo || ! $have_gtkunixprint; then
417
        ! $have_pangocairo || ! $have_gtkunixprint; then
418
  echo
410
  echo "The following modules will NOT be built:"
419
  echo "The following modules will NOT be built:"
411
  echo
420
  echo
412
  $have_atk || echo     atk
421
  $have_atk || echo     atk
Lines 416-418 Link Here
416
  $have_libglade || echo     gtk.glade
425
  $have_libglade || echo     gtk.glade
417
  $have_gtkunixprint || echo     gtk.unixprint
426
  $have_gtkunixprint || echo     gtk.unixprint
418
fi
427
fi
428
429
echo
430
echo "Numpy support: $enable_numpy"
431
echo
(-)setup.py (-6 / +6 lines)
Lines 228-243 Link Here
228
        data_files.append((DEFS_DIR, ('pangocairo.defs',)))
228
        data_files.append((DEFS_DIR, ('pangocairo.defs',)))
229
        GLOBAL_MACROS.append(('HAVE_PYCAIRO',1))
229
        GLOBAL_MACROS.append(('HAVE_PYCAIRO',1))
230
if gtk.can_build():
230
if gtk.can_build():
231
    if '--disable-numeric' in sys.argv:
231
    if '--disable-numpy' in sys.argv:
232
        sys.argv.remove('--disable-numeric')
232
        sys.argv.remove('--disable-numpy')
233
    else:
233
    else:
234
        try:
234
        try:
235
            import Numeric
235
            import numpy
236
            Numeric # pyflakes
236
            numpy # pyflakes
237
            GLOBAL_MACROS.append(('HAVE_NUMPY', 1))
237
            GLOBAL_MACROS.append(('HAVE_NUMPY', 1))
238
        except ImportError:
238
        except ImportError:
239
            print ('* Numeric module could not be found, '
239
            print ('* numpy module could not be found, '
240
                   'will build without Numeric support.')
240
                   'will build without numpy support.')
241
    ext_modules.append(gtk)
241
    ext_modules.append(gtk)
242
    data_files.append((os.path.join(INCLUDE_DIR, 'pygtk'), ('gtk/pygtk.h',)))
242
    data_files.append((os.path.join(INCLUDE_DIR, 'pygtk'), ('gtk/pygtk.h',)))
243
    data_files.append((DEFS_DIR, ('gtk/gdk.defs', 'gtk/gdk-types.defs',
243
    data_files.append((DEFS_DIR, ('gtk/gdk.defs', 'gtk/gdk-types.defs',
(-)README (-1 / +1 lines)
Lines 54-60 Link Here
54
    GTK+ 2.14.0 or higher for 2.14 API
54
    GTK+ 2.14.0 or higher for 2.14 API
55
  * libglade 2.5.0 or higher (optional)
55
  * libglade 2.5.0 or higher (optional)
56
  * pycairo 1.0.2 or higher (optional)
56
  * pycairo 1.0.2 or higher (optional)
57
  * Numeric (optional)
57
  * numpy (optional)
58
58
59
This release is supporting the following GTK+ releases:
59
This release is supporting the following GTK+ releases:
60
60

Return to bug 185692