From 6bb6d15cba45a00b29e8988e31981f2379526d7f 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/pyproject.md b/docs/pyproject.md index 75ad139623c..d86fd0ae5e4 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -375,6 +375,16 @@ 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, Poetry will look for the referenced file in the active project and then copy it to the OS installation directory. + +* On Windows the file is placed in the `Scripts/` directory. +* On *nix system the file is placed in the `bin/` directory. + ## `extras` Poetry supports extras to allow expression of: