Re: [Distutils] namespace_packages
At 11:44 AM 01/19/2006 -0500, Charlie Moad wrote:
I tried the "." and I keep getting:
error in basemap setup command: Distribution contains no modules or packages for namespace package 'matplotlib.toolkits'
Great, now we're making progress. :) Can you post your setup.py? It sounds like you don't have 'matplotlib.toolkits' listed in your 'packages' keyword, or perhaps there's something amiss with your package_dir or something.
Well here are th cvs links to them. http://cvs.sourceforge.net/viewcvs.py/matplotlib/matplotlib/setup.py?rev=1.143&view=auto http://cvs.sourceforge.net/viewcvs.py/matplotlib/toolkits/basemap/setup.py?rev=1.33&view=auto The matplotlib.toolkits module does not exist in the mpl cvs and it is not in the setup.py file. I have tried adding both. In basemap however, the matplotlib.toolkits module does exist and is listed in the setup.py file. On 1/19/06, Phillip J. Eby <pje@telecommunity.com> wrote:
At 11:44 AM 01/19/2006 -0500, Charlie Moad wrote:
I tried the "." and I keep getting:
error in basemap setup command: Distribution contains no modules or packages for namespace package 'matplotlib.toolkits'
Great, now we're making progress. :) Can you post your setup.py? It sounds like you don't have 'matplotlib.toolkits' listed in your 'packages' keyword, or perhaps there's something amiss with your package_dir or something.
Charlie Moad wrote:
Well here are th cvs links to them.
http://cvs.sourceforge.net/viewcvs.py/matplotlib/matplotlib/setup.py?rev=1.143&view=auto http://cvs.sourceforge.net/viewcvs.py/matplotlib/toolkits/basemap/setup.py?rev=1.33&view=auto
The matplotlib.toolkits module does not exist in the mpl cvs and it is not in the setup.py file. I have tried adding both. In basemap however, the matplotlib.toolkits module does exist and is listed in the setup.py file.
Both of these setup.py files are buggy. The packages list needs to have entries in dotted form ("matplotlib.toolkits"), not filesystem form ("matplotlib/toolkits"). Correcting them, and adding an empty lib/matplotlib/toolkits/__init__.py to the matplotlib checkout allows me to build eggs with namespace_packages set appropriately. -- Robert Kern robert.kern@gmail.com "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
On 1/19/06, Robert Kern <robert.kern@gmail.com> wrote:
Charlie Moad wrote:
Well here are th cvs links to them.
http://cvs.sourceforge.net/viewcvs.py/matplotlib/matplotlib/setup.py?rev=1.143&view=auto http://cvs.sourceforge.net/viewcvs.py/matplotlib/toolkits/basemap/setup.py?rev=1.33&view=auto
The matplotlib.toolkits module does not exist in the mpl cvs and it is not in the setup.py file. I have tried adding both. In basemap however, the matplotlib.toolkits module does exist and is listed in the setup.py file.
Both of these setup.py files are buggy. The packages list needs to have entries in dotted form ("matplotlib.toolkits"), not filesystem form ("matplotlib/toolkits"). Correcting them, and adding an empty lib/matplotlib/toolkits/__init__.py to the matplotlib checkout allows me to build eggs with namespace_packages set appropriately.
Thanks for taking a whack at this. I will test all your comments and commit if I get it working.
On 1/19/06, Robert Kern <robert.kern@gmail.com> wrote:
Charlie Moad wrote:
Well here are th cvs links to them.
http://cvs.sourceforge.net/viewcvs.py/matplotlib/matplotlib/setup.py?rev=1.143&view=auto http://cvs.sourceforge.net/viewcvs.py/matplotlib/toolkits/basemap/setup.py?rev=1.33&view=auto
The matplotlib.toolkits module does not exist in the mpl cvs and it is not in the setup.py file. I have tried adding both. In basemap however, the matplotlib.toolkits module does exist and is listed in the setup.py file.
Both of these setup.py files are buggy. The packages list needs to have entries in dotted form ("matplotlib.toolkits"), not filesystem form ("matplotlib/toolkits"). Correcting them, and adding an empty lib/matplotlib/toolkits/__init__.py to the matplotlib checkout allows me to build eggs with namespace_packages set appropriately.
I finally got time to try this, and it didn't help much. Changing all the packages to dot notation works fine. I have added the toolkits/__init__.py file. Setuptools warns about not having declare_namespace in the init files. I have added this: try: __import__('pkg_resources').declare_namespace(__name__) print __name__, __file__ except ImportError: pass # must not have setuptools to __init__.py in mpl's and basemap's matplotlib and matplotlib.toolkits module, hence in 4 places. Upon starting python I get this output: matplotlib /usr/lib/python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-linux-i686.egg/matplotlib/__init__.pyc matplotlib.toolkits /usr/lib/python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-linux-i686.egg/matplotlib/toolkits/__init__.pyc So the basemap declarations are never being reached. Where should I go from here?
participants (3)
-
Charlie Moad -
Phillip J. Eby -
Robert Kern