From 7b10d45464a8c4d77aee22a18f4acbd08b65a3aa Mon Sep 17 00:00:00 2001 From: RobertoRoos Date: Tue, 23 Jul 2024 13:21:59 +0200 Subject: [PATCH] Added missing mention of type = "file" reference in [tool.poetry.scripts] (#9510) --- docs/pyproject.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/pyproject.md b/docs/pyproject.md index 75ad139623c..6588735b4db 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -375,6 +375,15 @@ 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 %}} +```toml +[tool.poetry.scripts] +my_executable = { reference = "some_binary.exe", type = "file" } +``` + +With this configuration, the file `some_binary.exe` is looked for in the directory of the active `pyproject.toml` and copied into the installation folder. +On Windows, the `.exe` extension is added to the file and the file will be placed in the `Scripts/` directory. +On Linux no extension is added and the destination is `bin/`. + ## `extras` Poetry supports extras to allow expression of: