|
From: Andrew S. <str...@as...> - 2005-12-12 01:57:46
|
Hi All, I've added a hopefully innocuous few lines to matplotlib's setup.py: + +try: + from setuptools import setup # use setuptools if possible +except ImportError: + pass + This will use setuptools.setup() to install matplotlib if you have setuptools installed on your system. I assume that if you have setuptools installed, you want to use it, hence the change. However, I thought this may potentially cause issues for folks, so I wanted to announce the change here. This change should have no effect for those without setuptools. If you do have setuptools, it also means that the matplotlib data files are now placed in the resulting .egg. I've therefore also modified _get_data_path() in lib/matplotlib/__init__.py to support this change. For more information on setuptools, see http://peak.telecommunity.com/DevCenter/setuptools |
|
From: Charlie M. <cw...@gm...> - 2005-12-12 20:13:30
|
The way mpl uses the basemap toolkit will not work using setuptools. This is also an issue that twisted runs into. Since matplotlib will be put in one egg folder and basemap will be stuck in another, trying to import matplotlib.toolkits.basemap will yield an error. Just something to think about for down the road, but its probably not a priority now. - Charlie On 12/11/05, Andrew Straw <str...@as...> wrote: > Hi All, > > I've added a hopefully innocuous few lines to matplotlib's setup.py: > > + > +try: > + from setuptools import setup # use setuptools if possible > +except ImportError: > + pass > + > > This will use setuptools.setup() to install matplotlib if you have > setuptools installed on your system. I assume that if you have > setuptools installed, you want to use it, hence the change. However, I > thought this may potentially cause issues for folks, so I wanted to > announce the change here. > > This change should have no effect for those without setuptools. If you > do have setuptools, it also means that the matplotlib data files are now > placed in the resulting .egg. I've therefore also modified > _get_data_path() in lib/matplotlib/__init__.py to support this change. > > For more information on setuptools, see > http://peak.telecommunity.com/DevCenter/setuptools > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
|
From: Robert K. <rob...@gm...> - 2005-12-12 20:19:46
|
Charlie Moad wrote:
> The way mpl uses the basemap toolkit will not work using
> setuptools. This is also an issue that twisted runs into. Since
> matplotlib will be put in one egg folder and basemap will be stuck in
> another, trying to import matplotlib.toolkits.basemap will yield an
> error. Just something to think about for down the road, but its
> probably not a priority now.
That's why setuptools/eggs have the concept of namespace packages. Both the
matplotlib egg and basemap egg provide the matplotlib.toolkits namespace package.
E.g.:
setup(#...
namespace_packages=['matplotlib.toolkits'],
)
--
Robert Kern
rob...@gm...
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
|
|
From: Charlie M. <cw...@gm...> - 2005-12-12 20:26:41
|
That's great to hear! Thanks for the info. I am just surprised I have not seen this response when it has came up on the twisted list. - Charlie On 12/12/05, Robert Kern <rob...@gm...> wrote: > Charlie Moad wrote: > > The way mpl uses the basemap toolkit will not work using > > setuptools. This is also an issue that twisted runs into. Since > > matplotlib will be put in one egg folder and basemap will be stuck in > > another, trying to import matplotlib.toolkits.basemap will yield an > > error. Just something to think about for down the road, but its > > probably not a priority now. > > That's why setuptools/eggs have the concept of namespace packages. Both t= he > matplotlib egg and basemap egg provide the matplotlib.toolkits namespace = package. > > E.g.: > > setup(#... > namespace_packages=3D['matplotlib.toolkits'], > ) > > -- > Robert Kern > rob...@gm... > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
|
From: Robert K. <rob...@gm...> - 2005-12-12 20:43:11
|
Charlie Moad wrote: > That's great to hear! Thanks for the info. I am just surprised I > have not seen this response when it has came up on the twisted list. I, too, find that bizarre since Twisted and Zope were *the* reasons for that feature. -- Robert Kern rob...@gm... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |