-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Project plugins and forcing a minimum poetry version #9547
Conversation
Deploy preview for website ready! ✅ Preview Built with commit b8042b7. |
… that are required for the project (python-poetry#9547) * when running `poetry install` and required plugins are not available in Poetry's own environment they are installed only for the project into .poetry/plugins inside the project folder * when creating the application .poetry/plugins is added to the front of sys.path Co-authored-by: Arun Babu Neelicattu <[email protected]>
…s (especially relevant for installing project plugins if Poetry has been installed via pipx) (python-poetry#9547)
…oetry version the project is compatible with (python-poetry#9547)
3f1bd8e
to
1ab3e2e
Compare
… that are required for the project (python-poetry#9547) * when running `poetry install` and required plugins are not available in Poetry's own environment they are installed only for the project into .poetry/plugins inside the project folder * when creating the application .poetry/plugins is added to the front of sys.path Co-authored-by: Arun Babu Neelicattu <[email protected]>
…s (especially relevant for installing project plugins if Poetry has been installed via pipx) (python-poetry#9547)
…oetry version the project is compatible with (python-poetry#9547)
1ab3e2e
to
e300c83
Compare
Some bikeshedding from my side. I don't like the new |
Yeah, that has already come to my mind, but I couldn't think of anything better. At least, I like the grouping of required version and required plugins into one section.
That is an option. The drawback is that it is not grouped anymore with the required plugins into one section.
Not sure about that because plugins are only installed if they are not available in the global Poetry installation. (I think that makes more sense than just always installing them into the project.) Maybe, |
Do we need those two features to be grouped together? I don't think so, but maybe you have some good reasons for that |
It just belongs together because both are requirements for Poetry itself. By the way, when running Actually, I still think |
@johnthagen Since you seem to be interested in this PR and have already given valuable input in various user interfacing issues, I would like to ask for your opinion: (Opinions of others are also welcome, of course.) self section example
requires fields example
|
@radoering Thanks for the ping. First, a quick question. Is it assumed that The reason I ask, is that that PR would allow users to move a lot of metadata out of |
Although this could come before |
That is a good point to consider. Are there any fields that we know currently we'd need to use? I do not have a super strong opinion, but given that [project]
# ...
[tool.poetry]
# ...
package-mode = false
requires-poetry = ">=2.0"
[tool.poetry.requires-plugins]
poetry-plugin-bundle = ">=1.3"
poetry-plugin-export = ">=1.7.0" To me this seems like the best long term option. |
@johnthagen Thanks for your input. One thing that came to my mind: Is |
@radoering [tool.poetry.requires-plugins] The |
…gins that are required for the project (python-poetry#9547) * when running `poetry install` and required plugins are not available in Poetry's own environment they are installed only for the project into .poetry/plugins inside the project folder * when creating the application .poetry/plugins is added to the front of sys.path Co-authored-by: Arun Babu Neelicattu <[email protected]>
…s (especially relevant for installing project plugins if Poetry has been installed via pipx) (python-poetry#9547)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments after another review pass.
…gins that are required for the project (python-poetry#9547) * when running `poetry install` and required plugins are not available in Poetry's own environment they are installed only for the project into .poetry/plugins inside the project folder * when creating the application .poetry/plugins is added to the front of sys.path Co-authored-by: Arun Babu Neelicattu <[email protected]>
…s (especially relevant for installing project plugins if Poetry has been installed via pipx) (python-poetry#9547)
…e Poetry version the project is compatible with (python-poetry#9547)
be5483c
to
f561089
Compare
…gins that are required for the project (python-poetry#9547) * when running `poetry install` and required plugins are not available in Poetry's own environment they are installed only for the project into .poetry/plugins inside the project folder * when creating the application .poetry/plugins is added to the front of sys.path Co-authored-by: Arun Babu Neelicattu <[email protected]>
…s (especially relevant for installing project plugins if Poetry has been installed via pipx) (python-poetry#9547)
…e Poetry version the project is compatible with (python-poetry#9547)
f561089
to
b8042b7
Compare
…gins that are required for the project (#9547) * when running `poetry install` and required plugins are not available in Poetry's own environment they are installed only for the project into .poetry/plugins inside the project folder * when creating the application .poetry/plugins is added to the front of sys.path Co-authored-by: Arun Babu Neelicattu <[email protected]>
…s (especially relevant for installing project plugins if Poetry has been installed via pipx) (#9547)
…gins that are required for the project (python-poetry#9547) * when running `poetry install` and required plugins are not available in Poetry's own environment they are installed only for the project into .poetry/plugins inside the project folder * when creating the application .poetry/plugins is added to the front of sys.path Co-authored-by: Arun Babu Neelicattu <[email protected]>
…s (especially relevant for installing project plugins if Poetry has been installed via pipx) (python-poetry#9547)
…e Poetry version the project is compatible with (python-poetry#9547)
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Related-to: #5740 (refines the plugin part, omits the tools part)
Resolves: #5729
Resolves: #3316
Introduces
tool.poetry.requires-poetry
andtool.poetry.requires-plugins
.Example:
tool.poetry.requires-poetry
enforces a Poetry version and raises an error if the used version is not allowed, e.g.:(Of course, this only works for future Poetry versions because older versions do not know this setting.)
In
tool.poetry.requires-plugins
you can define plugins that are required for the project. If these plugins are not installed in Poetry's own environment, they are installed only for the project into.poetry/plugins
inside the project folder.rejected first draft
Introduces a `tool.poetry.self` section in pyproject.toml. Example: