[IPython-dev] Distribution via "Easy Install"?

Robert Kern robert.kern at gmail.com
Thu Dec 22 14:27:34 EST 2005

Ville Vainio wrote:
> Anyone looked into distributing IPython via easy-install mechanism yet?

To consolidate replies to a few messages:

* ipython builds as an egg just fine out-of-box. It is not zip-safe since it
uses a few __file__ thingies, but that's okay. easy_install correctly unpacks
the egg. You can build ipython as an egg without changing the source:

  $ python -c "import setuptools; execfile('setup.py')" bdist_egg

Of course, easy_install will do this for you.

* I'm not entirely sure what needs to happen with the post-install script on
Windows. Possibly make it a module in the IPython package so that one could do

  In [1]: from IPython.win32_post_install import run
  In [2]: run()

manual.pdf might have to be made package_data in that case, though.

* The /usr/bin/ipython contents that Ville posted is automatically generated by
easy_install (the actual scripts live inside the egg; the scripts installed to
/usr/whatever/bin are bootstraps to load and run those scripts), so Fernando
doesn't need to worry about wrapping anything with try: except: blocks.

* I think the only thing that really needs to happen now is that the PyPI record
needs a link to the actual download location or the tarballs could be uploaded
to PyPI itself.

* However, setuptools and pkg_resources (the module that handles the resource
location and extraction from zipped eggs; included with setuptools) are fairly
stable and useful. easy_install is possibly still problematic for non-root UNIX
installs, but I think even that is probably okay now if you ignore the
ez_setup.py bootstrap. In any case, setuptools and pkg_resources can be used to
good effect without thrusting easy_install's problems on anyone. Using recent
(last week or so) setuptools, one can now install setuptoolized packages as
regular packages with the egg metadata alongside rather than full eggs:

  $ python setup.py install --single-version-externally-managed

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