Skip to content

Commit 8db4324

Browse files
committed
Clarify script entry point targets
1 parent ecf32d9 commit 8db4324

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎source/guides/writing-pyproject-toml.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ In this example, after installing your project, a ``spam-cli`` command
208208
will be available. Executing this command will do the equivalent of
209209
``import sys; from spam import main_cli; sys.exit(main_cli())``.
210210

211+
Script entry points must use the ``module:object`` form. The object
212+
reference should point to a function that can be called with no arguments,
213+
not to a module by itself.
214+
211215
On Windows, scripts packaged this way need a terminal, so if you launch
212216
them from within a graphical application, they will make a terminal pop
213217
up. To prevent this from happening, use the ``[project.gui-scripts]``

0 commit comments

Comments
 (0)