easy_install and setup.py

If you’ve used easy_install and setup.py before, you may have noticed that running something like “easy_install -d PATH” versus “python setup.py install PATH” produce different directory hierarchies. If your development environment consists of both packages pulled from the Cheeseshop and your own code (or even your modifications on Cheeseshop hosted packages), then you need a way to put packages from both installation methods into the same path.

It turns out that easy_install can take a tar.gz file as an argument. So, you can take a package foo that has a setup.py defined, create a foo.tar.gz of the directory containing setup.py and all the associated code, then run “easy_install -d PATH foo.tar.gz”, which will create the egg and install it for you in the proper way, alongside your Cheeseshop pulled packages.