Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle command #1992

Closed
sdispater opened this issue Feb 7, 2020 · 10 comments
Closed

Bundle command #1992

sdispater opened this issue Feb 7, 2020 · 10 comments
Assignees
Labels
area/cli Related to the command line area/plugin-api Related to plugins/plugin API area/venv Related to virtualenv management kind/feature Feature requests/implementations

Comments

@sdispater
Copy link
Member

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)

@sdispater sdispater added area/cli Related to the command line kind/feature Feature requests/implementations area/venv Related to virtualenv management area/plugin-api Related to plugins/plugin API labels Feb 7, 2020
@sdispater sdispater self-assigned this Feb 7, 2020
@sdispater sdispater added this to the 1.1 milestone Feb 7, 2020
@sdispater sdispater mentioned this issue Feb 7, 2020
14 tasks
@kapilt
Copy link

kapilt commented Feb 7, 2020

something that came up in the context of #537 and something i've been interested in is the ability to publish packages to pypi that are fully frozen (ie incorporating lockfile deps into the upload), but keep the dev dependency set a bit more loose (per pyproject.toml). the issue we've found is semver isn't universal adhered to, and i've realized that many of our project's older pypi releases from an even a year ago aren't even installable by users due to dep graph version drift even with semver pins.

unfortunately its not clear if thats really the intent with bundle, i'm a little unclear on the use case w/ the current description, ie. how is bundle differentiated to install command. afaict download / extract use case is a bit more common, because its a useful cache artifact for offline install or particular serverless environments, but virtualenvs aren't easily relocatable/portable per se so what does bundle achieve?.

@znd4
Copy link

znd4 commented Mar 31, 2020

Is there a PR in progress for this? I'm going to have a forced staycation next week, so if I have any time left after installing ethernet, I'd love to spend some time getting the ball rolling on this

@sdispater
Copy link
Member Author

@zdog234 No PR yet but a WIP branch : https://github.com/python-poetry/poetry/tree/bundle-command

Only tests are missing but the feature is almost ready.

@jtc42
Copy link

jtc42 commented May 17, 2020

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.

@AndrewGuenther
Copy link

@sdispater Anything I can do to help push this forward? I'm happy to do test writing grunt work if that's what's needed.

@ZlatyChlapec
Copy link

If I understood it correctly this feature should be covered by https://github.com/python-poetry/poetry-bundle-plugin. Is there anything that still needs to be done on the plugin? Can we help somehow?

@apollo13
Copy link
Contributor

Given that this is covered by a plugin, can we remove the 1.2 milestone and migrate the issue (if there is anything remaining) over to the plugin repo? I feel like this shouldn't hold up the 1.2 release especially since the plugin repo can iterate more quickly.

@sdispater sdispater removed this from the 1.2 milestone Aug 31, 2021
@jwillikers
Copy link

It would be nice if the plugin worked... Any way someone can merge python-poetry/poetry-plugin-bundle#1?

@neersighted
Copy link
Member

The plugin is exists now -- I am closing this as completed and asking that any feature requests are opened against the plugin.

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/cli Related to the command line area/plugin-api Related to plugins/plugin API area/venv Related to virtualenv management kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants