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

Fernando Perez Fernando.Perez at colorado.edu
Thu Dec 22 11:50:21 CST 2005


Ville Vainio wrote:
> On 12/22/05, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> 
> 
>>I haven't, but I'd certainly be willing to make whatever changes (if any) are
>>needed to play nice with the eggs system.  If anyone knows what needs to be
>>done right away, by all means let me know.
> 
> 
>>From http://peak.telecommunity.com/DevCenter/PythonEggs
> 
> """
> Edit the target package's setup.py and add "from setuptools import
> setup" such that it replaces the existing import of the setup
> function. Then run setup.py bdist_egg.
> """
> 
> What's frightening is that it seemed to work. :-D
> 
> Or more correctly, "python setup.py install" installed ipython as an
> egg in site-packages, and running "ipython" launched the new ipython.
> 
> /usr/bin/ipython contents are:
> 
> ---------- cut -------------------
> #!/usr/bin/python
> # EASY-INSTALL-SCRIPT: 'ipython==0.6.16.svn','ipython'
> __requires__ = 'ipython==0.6.16.svn'
> import pkg_resources
> pkg_resources.run_script('ipython==0.6.16.svn', 'ipython')
> -------------------------------------

Note that all those better be wrapped in try/except blocks: while I'm all for 
_allowing_ egg support, I am _absolutely_ against requiring it.  The 
__requires__ var is nice and good, since it's just some private data, but the 
imports would be protected by try blocks.

Cheers,

f




More information about the IPython-dev mailing list