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

docs: add admonition about tool.pdm.scripts vs project.scripts #2673

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions docs/docs/usage/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ It will run `flask run -p 54321` in the environment that is aware of packages in

PDM also supports custom script shortcuts in the optional `[tool.pdm.scripts]` section of `pyproject.toml`.

!!! NOTE
The `[tool.pdm.scripts]` directory must not be confused with `[project.scripts]`. The latter is used to install a command as part of your package, as explained [here](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#creating-executable-scripts).

You can then run `pdm run <script_name>` to invoke the script in the context of your PDM project. For example:

```toml
Expand Down
1 change: 1 addition & 0 deletions news/2121.docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document the difference between `[tool.pdm.scripts]` and `[project.scripts]`