Skip to content

Explain how package and installed CLI entry points share a callable - #2205

Closed
cloudgpuapp wants to merge 1 commit into
python:mainfrom
cloudgpuapp:docs/shared-cli-entry-points
Closed

cloudgpuapp wants to merge 1 commit into
python:mainfrom
cloudgpuapp:docs/shared-cli-entry-points

Conversation

@cloudgpuapp

@cloudgpuapp cloudgpuapp commented Nov 24, 2026 •

Copy link
Copy Markdown

The command-line tools guide already shows a __main__.py wrapper and a
[project.scripts] entry, but it leaves the package layout guidance as a TODO.
Explain the import and python -m roles of the two special files using the
existing example, show where to import the shared CLI callable, and link to
Python's __main__ documentation for more detail.

Addresses #1508 using the scoped approach suggested in the issue discussion.

Validation: python -m sphinx -b html -W --keep-going source _build/html
passed on Python 3.13.18 with the project's pinned Sphinx 9.2.0. Extracted and
executed the guide's Python snippets with Typer 0.12.3. python -m greetings
and the configured script callable printed the same greeting. Importing the
package and its entry module produced no CLI output. git diff --check passed.

AI assistance was used to prepare and test this documentation change.


📚 Documentation preview 📚: https://python-packaging-user-guide--2205.org.readthedocs.build/en/2205/

@rgommers

Copy link
Copy Markdown
Contributor

Closing, AI spam.

@rgommers rgommers closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants