Now that the transforms branch has merged with the trunk, I'd like to 
resurrect namespace packages so that toolkits will work again when 
matplotlib is installed as an egg.  As was discussed in a previous 
thread, all __init__.py files in the toolkit hierarchy must be empty 
(aside declare_namespace statement).  Since lib/matplotlib/__init__.py 
contains a lot of important stuff, I think the path of least resistance 
is to move the toolkits out of lib/matplotlib and into a separate 
directory lib/mpl_toolkits.  The semantics of importing a toolkit would 
have to change from

import matplotlib.toolkits.toolkit

to

import mpl_toolkit.toolkit.

Of course, all the toolkit __init__.py files would need to be emptied.  
In the case of basemap, this would be changing imports from

from matplotlib.toolkits.basemap import Basemap

to something like

from mpl_toolkits.basemap.api import Basemap

All the stuff now imported directly into __init__.py would go in api.py.

I've tried this in my local tree and it seems to work fine.  Does this 
sound reasonable?  If there's general agreement, I can make the 
necessary mods in matplotlib trunk and the mplsizer and basemap toolkits.

-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to