Skip to content

Bundle command #1992

@sdispater

Description

@sdispater

As suggested in #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)

Metadata

Metadata

Assignees

Labels

area/cliRelated to the command linearea/plugin-apiRelated to plugins/plugin APIarea/venvRelated to virtualenv managementkind/featureFeature requests/implementations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions