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

Activate requires-plugins from a project without using poetry install #9990

Open
tungol opened this issue Jan 7, 2025 · 4 comments
Open
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@tungol
Copy link

tungol commented Jan 7, 2025

Issue Kind

Change in current behaviour

Description

I have a use case where I currently copy the pypoetry.toml and poetry.lock files into a docker container and then run poetry export. In order to install the export plugin, I looked at using the tool.poetry.requires-plugins section, but it looks like that's only checked when the project is installed. It'd be nice if there was a way to ensure all required project plugins were installed without installing the project itself. That could either be a new command or maybe poetry self install could be changed to install project plugins as well.

Impact

This would improve the flexibilty of the tool.poetry.requires-plugins configuration option.

Workarounds

I worked around the issue by installing poetry-plugin-export explicitly in my dockerfile, but it'd be nice if there was a more generic way to accomplish this.

@tungol tungol added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Jan 7, 2025
@Secrus
Copy link
Member

Secrus commented Jan 8, 2025

Maybe poetry install --no-root is the answer to your issue? I don't think we can install plugins without installation.

@infinitewarp
Copy link

I think I have the same request. I have a project with a CI job that requires use of poetry-plugin-export to run poetry export, and I want that plugin/command to be available without installing all of the project's requirements. I basically want to tell poetry "please install the plugins declared in pyproject" and see only those plugins installed. So far, I have not found solution other than explicitly invoking poetry self add poetry-plugin-export, but I don't like this redundancy.

poetry install --no-root does not solve this problem; that still installs all the project's requirements.

@Secrus
Copy link
Member

Secrus commented Jan 8, 2025

So, you would want something like poetry install --only-plugins?

@tungol
Copy link
Author

tungol commented Jan 8, 2025

Yeah, I think that's exactly what I'm looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants