Skip to content

Commit

Permalink
Change docs to use --only main syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnz authored and radoering committed Jan 30, 2024
1 parent 3cad429 commit 620da04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ poetry install --without test,docs
```

{{% note %}}
The `--no-dev` option is now deprecated. You should use the `--without dev` notation instead.
The `--no-dev` option is now deprecated. You should use the `--without dev` or `--only main` notation instead.
{{% /note %}}

You can also select optional dependency groups with the `--with` option.
Expand Down
6 changes: 3 additions & 3 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ For example, you might have a Dockerfile that looks something like this:
FROM python
COPY pyproject.toml poetry.lock .
COPY src/ ./src
RUN pip install poetry && poetry install --without dev
RUN pip install poetry && poetry install --only main
```

As soon as *any* source file changes, the cache for the `RUN` layer will be invalidated, which forces all 3rd party dependencies (likely the slowest step out of these) to be installed again if you changed any files in `src/`.
Expand All @@ -229,9 +229,9 @@ This might look something like this:
```text
FROM python
COPY pyproject.toml poetry.lock .
RUN pip install poetry && poetry install --no-root --no-directory
RUN pip install poetry && poetry install --only main --no-root --no-directory
COPY src/ ./src
RUN poetry install --without dev
RUN poetry install --only main
```

The two key options we are using here are `--no-root` (skips installing the project source) and `--no-directory` (skips installing any local directory path dependencies, you can omit this if you don't have any).
Expand Down

0 comments on commit 620da04

Please sign in to comment.