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

doc(scripts): multiple improvements on configuring scripts #10133

Merged
merged 3 commits into from
Feb 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ Here, we will have the `my_package_cli` script installed which will execute the
When a script is added or updated, run `poetry install` to make them available in the project's virtualenv.
{{% /note %}}

{{% note %}}
To include a file as a script, use [`tool.poetry.scripts`]({{< relref "#scripts-1" >}}) instead.
{{% /note %}}

### gui-scripts

This section describes the GUI scripts that will be installed when installing the package.
Expand Down Expand Up @@ -722,8 +726,10 @@ for more information on other keys and specifying version ranges.

### scripts

**Deprecated**: Use `project.scripts` instead.
Use `[tool.poetry.scripts]` only for scripts of type "file", because those are not supported in `[project.scripts]`.
{{% note %}}
**Deprecated**: Use [`project.scripts`]({{< relref "#scripts" >}}) instead for `console` and `gui` scripts. Use
`[tool.poetry.scripts]` only for scripts of type `file`.
{{% /note %}}

This section describes the scripts or executables that will be installed when installing the package

Expand All @@ -748,6 +754,9 @@ This tells Poetry to include the specified file, relative to your project direct
* On Windows the file is placed in the `Scripts/` directory.
* On *nix system the file is placed in the `bin/` directory.

In its table form, the value of each script can contain a `reference` and `type`. The supported types are
`console` and `file`. When the value is a string, it is inferred to be a `console` script.

### `extras`

**Deprecated**: Use `project.optional-dependencies` instead.
Expand Down