I'm trying to figure out what's the difference between these two python commands:
pip wheel --wheel-dir=some_dir -r requirement.txt
and
pip download -d some_dir -r requirement.txt
At first I thought "pip download" by default downloads the requirements from pypi.org index in 'whl' format and places them in some_dir, while "pip wheel" 'extracts' and builds the requirements, still in 'whl' format, from the current python environment and places them in some_dir. But apparently what both of them do is downloading the dependencies from the pypi.org index (by default). In fact, I tried the "pip wheel" command on an (virtual)python environment which didn't have installed any of the 'requirements.txt', yet still all of the 'whl's were found in 'some_dir'. The official documentation doesn't state this very clearly, though.
Hence my questions:
- Are then the two commands equivalent? (In this case this would look like replication of instructions, not really a good design principle uncle Guido!)
- How can I achieve my goal of obtaining the whls required out of my python environment and ignoring any internet 'index's? (Suppose I've installed a module in a venv as obtained from pypi.org, then I customize that module and I need to bring those modifications in every new cloned venv environment, created with the customized whl module file)
Thanks in advance!