SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] Better support for setuptools, WAS: building with python-2.3

From: Darren D. <dd...@co...> - 2007年04月05日 10:09:14
On Thursday 05 April 2007 4:29:00 am Edin Salkovic wrote:
> On 3/3/07, John Hunter <jd...@gm...> wrote:
> > On 2/23/07, Andrew Straw <str...@as...> wrote:
> > I figured I would be a good crash test dummy to see how easy
> > it was to install setuptools, so I poked around and found the ez_setup
> > and am off to the races. I added a friendly exception to setup.py to
> > make it easier for the next guy
> >
> > if major==2 and minor1<=3:
> > # setuptools monkeypatches distutils.core.Distribution to support
> > # package_data
> > try: import setuptools
> > except ImportError:
> > raise SystemExit("""\
> > matplotlib requires setuptools for installation. Please download
> > http://peak.telecommunity.com/dist/ez_setup.py and run it (as su if
> > you are doing a system wide install) to install the proper version of
> > setuptools for your system""")
>
> Apparently, there's a better solution for the above code (source
> http://peak.telecommunity.com/doc/ez_setup/index.html):
> ===
> This directory (svn://svn.eby-sarna.com/svnroot/ez_setup) exists so
> that Subversion-based projects can share a single
> copy of the ``ez_setup`` bootstrap module for ``setuptools``, and have it
> automatically updated in their projects when ``setuptools`` is updated.
>
> For your convenience, you may use the following svn:externals definition::
>
> ez_setup svn://svn.eby-sarna.com/svnroot/ez_setup
>
> You can set this by executing this command in your project directory::
>
> svn propedit svn:externals .
>
> And then adding the line shown above to the file that comes up for editing.
> Then, whenever you update your project, ``ez_setup`` will be updated as
> well. ===
>
> We should then add the following lines to our setup.py script
>
> from ez_setup import use_setuptools
> use_setuptools()
> from setuptools import setup, find_packages
>
> This would make installing setuptools even easier, since the newest
> ez_setup/seuptools would be downloaded by the user/developer every
> time a "svn update;python setup.py install" is issued.
>
> Are the above changes OK?
I considered this when setuptools became a requirement for python-2.3 
installs, but decided against it. My reasoning was that the unfamiliar user 
would go to install matplotlib, and see setup.py and ez_setup and get 
confused. Maybe it should go in a subdirectory in our tree?

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /