Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfbc9df

Browse files
author
Steve Chaplin
committed
SC
svn path=/trunk/matplotlib/; revision=1491
1 parent 24aff8a commit dfbc9df

4 files changed

Lines changed: 22 additions & 16 deletions

File tree

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
New entries should be added at the top
22

3+
2005-06-20 setupext.py: fix problem where _nc_backend_gdk is installed to the
4+
wrong directory - SC
5+
36
2005-06-19 Added 10.4 support for CocoaAgg. - CM
47

58
2005-06-18 Move Figure.get_width_height() to FigureCanvasBase and return

lib/matplotlib/backends/backend_gdk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def fn_name(): return sys._getframe(1).f_code.co_name
4040
# do after gtk else get "pygtk.require() must be called before importing gtk"
4141
# errors
4242
if numerix.which[0] == "numarray":
43-
from matplotlib._na_backend_gdk import pixbuf_get_pixels_array
43+
from matplotlib.backends._na_backend_gdk import pixbuf_get_pixels_array
4444
else:
45-
from matplotlib._nc_backend_gdk import pixbuf_get_pixels_array
45+
from matplotlib.backends._nc_backend_gdk import pixbuf_get_pixels_array
4646

4747

4848
DEBUG = False

setupext.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,9 @@ def build_gdk(ext_modules, packages, numerix):
592592
if numerix in ["numarray","both"]: # Build for numarray
593593
temp_copy('src/_backend_gdk.c', 'src/_na_backend_gdk.c')
594594
module = Extension(
595-
'matplotlib._na_backend_gdk',
596-
[ 'src/_na_backend_gdk.c',
597-
],
598-
libraries = [],
595+
'matplotlib.backends._na_backend_gdk',
596+
['src/_na_backend_gdk.c', ],
597+
libraries = [],
599598
)
600599
module.extra_compile_args.append('-DNUMARRAY=1')
601600
add_base_flags(module)
@@ -605,10 +604,9 @@ def build_gdk(ext_modules, packages, numerix):
605604
if numerix in ["Numeric","both"]: # Build for Numeric
606605
temp_copy('src/_backend_gdk.c', 'src/_nc_backend_gdk.c')
607606
module = Extension(
608-
'matplotlib._nc_backend_gdk',
609-
[ 'src/_nc_backend_gdk.c',
610-
],
611-
libraries = [],
607+
'matplotlib.backends._nc_backend_gdk',
608+
['src/_nc_backend_gdk.c', ],
609+
libraries = [],
612610
)
613611
module.extra_compile_args.append('-DNUMERIC=1')
614612
add_base_flags(module)

src/_backend_gdk.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
static PyTypeObject *_PyGdkPixbuf_Type;
1616
#define PyGdkPixbuf_Type (*_PyGdkPixbuf_Type)
1717

18-
/* Implement an equivalent to the pygtk method pixbuf.get_pixels_array()
19-
* Fedora 1,2,3 (for example) has PyGTK but does not have Numeric
20-
* and so does not have pixbuf.get_pixels_array().
21-
* Also provide numarray as well as Numeric support
18+
/* Implement the equivalent to gtk.gdk.Pixbuf.get_pixels_array()
19+
* To solve these problems with the pygtk version:
20+
* 1) It works for Numeric, but not numarray
21+
* 2) Its only available if pygtk is compiled with Numeric support
22+
* Fedora 1,2,3 has PyGTK, but not Numeric and so does not have
23+
* Pixbuf.get_pixels_array().
24+
* Fedora 4 does have PyGTK, Numeric and Pixbuf.get_pixels_array()
2225
*/
2326

2427
static PyObject *
@@ -67,12 +70,14 @@ DL_EXPORT(void)
6770
init_na_backend_gdk(void)
6871
{
6972
PyObject *mod;
70-
mod = Py_InitModule("matplotlib._na_backend_gdk", _backend_gdk_functions);
73+
mod = Py_InitModule("matplotlib.backends._na_backend_gdk",
74+
_backend_gdk_functions);
7175
#else
7276
init_nc_backend_gdk(void)
7377
{
7478
PyObject *mod;
75-
mod = Py_InitModule("matplotlib._nc_backend_gdk", _backend_gdk_functions);
79+
mod = Py_InitModule("matplotlib.backends._nc_backend_gdk",
80+
_backend_gdk_functions);
7681
#endif
7782

7883
import_array();

0 commit comments

Comments
 (0)