Câu hỏi này explains cách thực hiện tải xuống pip và lưu gói. Nếu tôi làm theo công thức này, Pip sẽ tải xuống các tệp bánh xe (.whl) nếu có.Thực hiện tải xuống pip thích tải xuống bản phân phối nguồn (không phải bánh xe)
(venv) [[email protected] 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
Mỗi tệp mà nó tải xuống là Bánh xe - nhưng nếu tôi muốn có một loại tệp khác thì sao?
Tôi thực sự muốn tải xuống các tệp sdist (.tar.gz) tùy thuộc vào tệp .whl? Có cách nào để nói với Pip những loại tập tin tôi thực sự muốn nó để có được? Vì vậy, thay vì nhận được một thư mục đầy đủ các bánh xe tôi có thể muốn có một loạt các tập tin tar.gz.