Skip to content

Commit

Permalink
docs: clarify behavior of --extras and subcommands (#7563)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6a0087b)
  • Loading branch information
evanrittenhouse authored and radoering committed Mar 4, 2023
1 parent 67f16d8 commit ef8ace3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,14 @@ You can install all extras with the `--all-extras` option:
poetry install --all-extras
```

{{% note %}}
Note that `install --extras` and the variations mentioned above (`--all-extras`, `--extras foo`, etc.) only work on dependencies defined in the current project. If you want to install extras defined by dependencies, you'll have to express that in the dependency itself:
```toml
[tool.poetry.group.dev.dependencies]
fastapi = {version="^0.92.0", extras=["all"]}
```
{{% /note %}}

When installing or specifying Poetry-built packages, the extras defined in this section can be activated
as described in [PEP 508](https://www.python.org/dev/peps/pep-0508/#extras).

Expand Down

0 comments on commit ef8ace3

Please sign in to comment.