-
-
Notifications
You must be signed in to change notification settings - Fork 481
docs: fix incorrect uv configuration for CLI extensions in "Using entry points" section (#4455)
#4456
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
base: main
Are you sure you want to change the base?
Conversation
…ntry points" section (litestar-org#4455)
|
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4456 |
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.
Just above the changed like we have tool.poetry.plugins, which is deprecated: https://python-poetry.org/docs/pyproject#plugins
Can you please update it as well?
…t.entry-points]` for CLI command registration to ensure PEP 621 compliance. (litestar-org#4455)
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.
Thanks!
|
@sobolevn Thanks for pointing that out! I've updated the deprecated tool.poetry.plugins configuration to use the standard [project.entry-points] format as requested. The changes are now included in this PR. |
| :caption: Using `uv <https://docs.astral.sh/uv/>`_ | ||
| [project.scripts] | ||
| [project.entry-points."litestar.commands"] |
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.
Since this has been standardised across tools, these individual tool-specific sections are unnecessary and should just be removed entirely
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.
I recommend changing this section to clarify that any build backend supporting the PEP 621 standard can register commands using the following syntax within the pyproject.toml file:
[project.entry-points."litestar.commands"]
my_command = "my_litestar_plugin.cli:main"This generalizes the approach beyond a specific tool and aligns with modern Python packaging practices.
Description
Fix incorrect uv package manager configuration in CLI extension documentation. The current documentation uses
[project.scripts]which creates standalone executables instead of registering commands with the Litestar CLI group.Changes Made
[project.scripts]configuration with correct[project.entry-points."litestar.commands"]in CLI extension exampleslitestar.commandsentry point groupCloses
close #4455