[Distutils] Just downloading an egg
Jeff Rush
jeff at taupro.com
Wed Oct 1 00:42:05 CEST 2008
Pascoe, S (Stephen) wrote:
> I often just want to do with easy_install is download an egg from pypi without installing it. I've studied the easy_install documentation and never found a way to do it. Even giving it the "-d" option results in easy-install.pth being created and other unwanted stuff.
>
> Looking at the setuptools pydoc I worked out a way to do it:
>
>>>> import setuptools
>>>> d = setuptools.Distribution()
>>>> d.fetch_build_egg(requirement)
>
> Voila! the egg is downloaded into cwd. It even seems built an egg from a tarball.
>
> My question is, can I rely on this feature and is it the best way of doing what I want? I'd like to use it in my code and hope it stays. It would be ideal if I could do this through easy_install.
Actually this command will download the egg and just the egg:
easy_install -zmaxd . -N SQLObject
or if you want the egg -and- its dependencies (as eggs too):
easy_install -zmaxd . SQLObject
-Jeff
More information about the Distutils-SIG
mailing list