[Distutils] Decompressing .egg files

Phillip J. Eby pje at telecommunity.com
Wed Feb 8 16:24:59 CET 2006


At 10:13 AM 2/8/2006 -0500, Phillip J. Eby wrote:
>Use --install-dir (-d) and --always-copy (-a) with -Z; this will always
>result in an unpacked egg in the install directory, whether the source was
>packed or not:
>
>      easy_install -Zad tgtdir name
>
>If you don't want dependencies, you should also use --no-deps (-N):
>
>      easy_install -ZaNd tgtdir name
>
>In either case, this will install the egg(s) for 'name' into 'tgtdir', and
>will copy/unpack them there even if they're already on sys.path.  No online
>search will be done unless you have 'find_links' and/or 'upgrade' set in
>one of your distutils config files (setup.cfg, ~/.pydistutils.cfg,
>etc.).  And you could prevent it even then using --allow-hosts (-H) to
>disable any remote access.

I forgot to mention, by the way, that 'tgtdir' cannot be the same directory 
where the original egg is.  If you want to update an egg in place, use a 
temporary directory like this:

     easy_install -aNd some_temp_dir name
     easy_install -aNZ some_temp_dir/name*.egg

which will first copy the egg to the temporary directory, then unpack it 
back to its original location (more or less).



More information about the Distutils-SIG mailing list