Monday, July 30, 2007

Updating all your Eggs

Lately, I have used setuptools (easy_install) more and more to manage third-party Python modules and packages on my computer. Using easy_install generally gives you a more up-to-date package than distribution packages generally do (I am talking about Linux here, though my solution can help windows users as well). The problem is that package management systems of most distributions have one advantage over setuptools: they will warn you when a new version of a given package is available.

As I like to live on the cutting-edge of things, I tend to stick with easy_install most of the time, and recently, I began to suspect that I had a more easy_installed packages in my system than I could recall by name. This thought led to another: "How in the world can I keep track of all those packages, let alone update them when needed?"

So I decided to post my concerns to the distutils list and afters a quick and enlightening exchange of emails I had a solution to my problem:

With this script I could not only find out how many eggs I had installed under easy_install (210), but also I could update them all!

This is obviously not the best solution to the problem, but it helped me. If you have suggestions or a better solution, I would like to hear about.

You can get the script here.

4 comments:

Marius Gedminas said...

The more I learn about easy_install, the more I think it is reinventing the existing Linux packaging systems, badly. (Where's easy_uninstall?)

Unknown said...

you've got a good point, I have been wanting such a feature (uninstall) for a while...

Bjorn said...

I also blogged about this lately. There's a lot that could be better with easy_install, and discovering yolk made my day a bit brighter; it's a tool for querying the PyPI and your local installations of eggs.

Unknown said...

Hi Beorn,

Thanks for suggesting Yolk, i didn't know it.

Enstaller from Enthought also seems to be another enhanced easy_install, but has not been released yet...

ccp

Amazon