John Hunter wrote:
"Stephen" == Stephen Walton <stephen.walton@...197...> writes:
> I appreciate the effort. It works fine provided I delete
> the line "backend: TkAgg" which I'd had in my
> ~/.matplotlibrc file. Otherwise I get a core dump. I
> don't recall why I was using this instead of the default
> GTKAgg backend.
So you're saying you get a segfault on CVS with tkagg?
Would you be willing to try a few things
* rm -rf site-packages/matplotlib and your build subdir and do a
clean build. Do you still see the problem?
Alternatively, (and this allows you to keep a 'safe' matplotlib in-place, or switch to it as needed), my stategy is:
1. Rename site-packages/matplotlib to .ori, and symlink to the CVS tree:
root@...198...[site-packages]# d -d matplotlib*
/usr/lib/python2.3/site-packages
lrwxrwxrwx 1 root 51 Feb 7 16:57 matplotlib -> /usr/local/installers/src/matplotlib/lib/matplotlib/
drwxr-xr-x 4 fperez 4096 Feb 4 10:01 matplotlib.ori/
2. In the CVS tree, manually symlink all the shared libraries to the path of the build dir:
root@...198...[matplotlib]# dl
/usr/local/installers/src/matplotlib/lib/matplotlib
lrwxrwxrwx 1 fperez 83 Feb 7 16:59 ft2font.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/ft2font.so*
lrwxrwxrwx 1 fperez 87 Feb 7 16:58 _nc_contour.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/_nc_contour.so*
lrwxrwxrwx 1 fperez 85 Feb 7 16:58 _nc_image.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/_nc_image.so*
lrwxrwxrwx 1 fperez 90 Feb 7 16:58 _nc_transforms.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/_nc_transforms.so*
root@...198...[matplotlib]# dl backends
/usr/local/installers/src/matplotlib/lib/matplotlib
lrwxrwxrwx 1 fperez 92 Feb 7 16:58 _gtkagg.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/backends/_gtkagg.so*
lrwxrwxrwx 1 fperez 100 Feb 9 14:55 _nc_backend_agg.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/backends/_nc_backend_agg.so*
lrwxrwxrwx 1 fperez 91 Feb 7 16:58 _tkagg.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/backends/_tkagg.so*
These symlinks can be established in 10 seconds with md anc C-x-s.
3. When you do a CVS update in the mpl top-level dir, simply do
rm -rf build
python setup.py build
This will rebuild all the needed extensions, and your symlinks will pick them up automagically.
If you ever need to go back to the released mpl, simply repoint the matplotlib symlink in site-packages to .ori.
This is the simplest setup I've been able to find to handle transparently CVS python code with extensions. It only breaks if the CVS code springs a new extension module (or renames one), but that is fixed in a second with the proper new symlink.
Cheers,
f