[IPython-dev] easy_install ipython==dev

Robert Kern robert.kern at gmail.com
Wed Feb 1 13:36:02 EST 2006

Fernando Perez wrote:
> Robert Kern wrote:
>>It's an ez_setup.py bootstrap problem, not a real setuptools issue. Getting the
>>setuptools source and "python setup.py install"ing it works fine. After that,
>>anything else using setuptools should work fine with Python 2.5. Yet one more
>>reason not to use ez_setup.py, but not a reason to avoid setuptools itself.
> Note that I've never said "let's avoid setuptools".  In fact, I've recently 
> spent a fair amount of time (including bugging you on the phone) making sure 
> that we _do_ support eggs as best we can.

And I appreciate it greatly. I meant that it's not a reason to sandbox
setuptools to the extent we are doing, either. Not that there aren't other good
reasons for sandboxing setuptools, of course.

> I just don't trust the tools, so I want to make sure that we keep them well 
> sandboxed, so they can't cause havoc on a normal plain-distutils install by 
> accident (like the matplotlib setup.py did, thanks to a poorly written 
> setup.py script).
> It would be nice to have a setuptools 'proper usage' list.  I guess it 
> includes things like:
> * avoid ez_setup like the plague


> * write your setup.py so it never uses setuptools.py unless explicitly requested.

In general, I think this is a conditional:

* Make sure that the regular setup.py script can build a good egg. Otherwise,
easy_install cannot build an egg from the source tarball or SVN checkout.

  - If you are using setuptools features heavily, and the package is using
pkg_resources and egg-based plugin discovery, go whole hog and write your
setup.py using setuptools from the ground up. E.g. TurboGears simply can't be
built without setuptools; it's integral to how TurboGears works.

  - If you just want to be able to build a nice egg from your package which does
not otherwise use setuptools, use the ('setuptools' in sys.modules) test to make
sure setuptools does not get used unless the builder actually uses setuptools to
build/install the package.

Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

More information about the IPython-dev mailing list