pypa/pip — pull request #416 by hongqn (2011-12-24 17:55:09+00:00)
Title: add --save-download option to pip install

This commit adds an `--save-download` option to `pip install` command. It received a directory path as the argument. When pip installs the package and dependencies, all the downloaded packages will be saved in that directory.

It is different from the `--download` option, which forbids the installation, and only downloads the specific package, no dependencies would be downloaded. (as described in #315)

It is also different from the `--download-cache` option, which saves downloaded files using url as their filenames. This cause the cache directory is not suitable to reuse via the `--find-links` option later.

The purpose of this option is to create a local package directory. So that one can use `pip install --find-links file:// --no-index` command to install the same packages offline later on.

For example, the programmer runs (maybe in a no-global-site-package virtualenv):

pip install --save-download pkgs pyramid

and give the system administrator the pkgs directory. The SA can run:

pip install pyramid --find-links file:///path/to/pkgs --no-index

to setup an identical virtualenv on servers, without the needs of slow internet access.