Skip to content

Commit 1f643b2

Browse files
author
Robert Roos
committed
Added missing mention of type = "file" reference in [tool.poetry.scripts] (#9510)
1 parent 2e3a421 commit 1f643b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/pyproject.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,15 @@ Here, we will have the `my_package_cli` script installed which will execute the
375375
When a script is added or updated, run `poetry install` to make them available in the project's virtualenv.
376376
{{% /note %}}
377377

378+
```toml
379+
[tool.poetry.scripts]
380+
my_executable = { reference = "some_binary.exe", type = "file" }
381+
```
382+
383+
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.
384+
On Windows, the `.exe` extension is added to the file and the file will be placed in the `Scripts/` directory.
385+
On Linux no extension is added and the destination is `bin/`.
386+
378387
## `extras`
379388

380389
Poetry supports extras to allow expression of:

0 commit comments

Comments
 (0)