Bundle command
See original GitHub issueAs suggested in https://github.com/python-poetry/poetry/issues/537, the addition of a bundle
command could prove useful.
There are two cases that we’ve seen pop up here: the ability to bundle the project and its dependencies in an arbitrary virtual environment and the ability to download the distributions to a specific directory. The former should be implemented directly into Poetry since generating a complete virtual environment makes sense to deploy a Poetry-managed project and the latter could be implemented in a plugin since it’s a less common case.
Implementation
Basically the bundle
command will be a top-level command (similar to env
) which will expose various sub commands.
Initially, only the venv
sub command will be available:
poetry bundle venv my-venv/
If the virtual environment directory already exists it will be removed and regenerated.
Specifying a Python version to use to generate the virtual environment will also be possible:
poetry bundle venv my-venv/ --python 3.8
poetry bundle venv my-venv/ --python python3.8
poetry bundle venv my-venv/ --python /usr/local/bin/python3
Extensibility
The bundle
command should be extensible so that new sub commands can be added with the use of plugins. This means that this feature depends on the implementation of the plugin system (which is in progress, see #1237)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:9 (3 by maintainers)
It would be nice if the plugin worked… Any way someone can merge python-poetry/poetry-bundle-plugin#1?
Any updates on this? The WIP branch seems to have gone a bit quiet. This would be super useful for a bunch of projects I’m involved in.