This question explains how to make pip download and save packages. If I follow this formula, Pip will download wheel (.whl) files if available.
(venv) [user@host glances]$ pip download -d wheelhouse -r build_requirements.txt
Collecting wheel (from -r build_requirements.txt (line 1))
File was already downloaded /usr_data/tmp/glances/wheelhouse/wheel-0.29.0-py2.py3-none-any.whl
Collecting pex (from -r build_requirements.txt (line 2))
File was already downloaded /usr_data/tmp/glances/wheelhouse/pex-1.1.18-py2.py3-none-any.whl
Collecting requests (from -r build_requirements.txt (line 3))
File was already downloaded /usr_data/tmp/glances/wheelhouse/requests-2.12.4-py2.py3-none-any.whl
Collecting pip (from -r build_requirements.txt (line 4))
File was already downloaded /usr_data/tmp/glances/wheelhouse/pip-9.0.1-py2.py3-none-any.whl
Collecting setuptools (from -r build_requirements.txt (line 5))
File was already downloaded /usr_data/tmp/glances/wheelhouse/setuptools-32.3.1-py2.py3-none-any.whl
Successfully downloaded wheel pex requests pip setuptools
Every single file that it downloaded was a Wheel - but what if I want to get a different kind of file?
I actually want to download the sdist (.tar.gz) files in preference to .whl files? Is there a way to tell Pip what kinds of files I actually want it to get? So instead of getting a directory full of wheels I might want a bunch of tar.gz files.