'Can Poetry download dependencies when building a wheel for offline installation?
I’d like to download all dependencies for a project when running the poetry build command the output wheel (whl) file includes the downloaded dependencies (for offline installation).
Solution 1:[1]
I didn't find a built-in feature for this use case. The closest I got is to export the lock file into a requirements file and then, use pip to download all the dependencies:
poetry build
poetry export -f requirements.txt --output dist/requirements.txt
poetry run pip download -r dist/requirements.txt -d dist/wheels
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | GuillaumeB |