Skip to content

Commit

Permalink
Changes in docs for Issues python-poetry#4800, python-poetry#3709, py…
Browse files Browse the repository at this point in the history
…thon-poetry#3573, python-poetry#2211, python-poetry#521 and PR python-poetry#2414

- Added section about `extras` in `dependency-specification.md` (python-poetry#2414)
- Added note about VCS inclusion and exclusion in `include`/`exclude`
sections of `pyproject.toml` (python-poetry#4800)
- Added link to dependency specification in `add` command documentation
(python-poetry#3573)
- Added more info on default behaviour and cleaned up
`virtualenv.in-project` setting documentation (python-poetry#3709)
- Added missing configuration options to `configuration.md` (python-poetry#2211)
  • Loading branch information
Secrus committed May 20, 2022
1 parent a80f985 commit a6d2520
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ present dependency you can use the special `latest` constraint:
poetry add pendulum@latest
```

{{% note %}}
See the [Dependency specification]({{< relref "dependency-specification" >}}) for more information on setting the version constraints for a package.
{{% /note %}}

You can also add `git` dependencies:

```bash
Expand Down
39 changes: 36 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,13 @@ If set to `false`, poetry will install dependencies into the current python envi
Create the virtualenv inside the project's root directory.
Defaults to `None`.

If not set explicitly (default), `poetry` will create virtual environment in
`{cache-dir}/virtualenvs` or use the `.venv` directory when one is available.

If set to `true`, the virtualenv will be created and expected in a folder named
`.venv` within the root directory of the project.

If not set explicitly (default), `poetry` will use the virtualenv from the `.venv`
directory when one is available. If set to `false`, `poetry` will ignore any
existing `.venv` directory.
If set to `false`, `poetry` will ignore any existing `.venv` directory.

### `virtualenvs.path`

Expand Down Expand Up @@ -277,3 +278,35 @@ Defaults to `false`, which means Python version used during Poetry installation
**Type**: string

Set a new alternative repository. See [Repositories]({{< relref "repositories" >}}) for more information.

### `http-basic.<name>`:

**Types**: string, string

Set repository credentials (`username` and `password`) for `<name>`.
See [Repositories - Configuring credentials]({{< relref "repositories#configuring-credentials" >}})
for more information.

### `pypi-token.<name>`:

**Type**: string

Set repository credentials (using an API token) for `<name>`.
See [Repositories - Configuring credentials]({{< relref "repositories#configuring-credentials" >}})
for more information.

### `certificates.<name>.cert`:

**Type**: string

Set custom certificate authority for repository `<name>`.
See [Repositories - Configuring credentials - Custom certificate authority]({{< relref "repositories#custom-certificate-authority-and-mutual-tls-authentication" >}})
for more information.

### `certificates.<name>.client-cert`:

**Type**: string

Set client certificate for repository `<name>`.
See [Repositories - Configuring credentials - Custom certificate authority]({{< relref "repositories#custom-certificate-authority-and-mutual-tls-authentication" >}})
for more information.
10 changes: 10 additions & 0 deletions docs/dependency-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,16 @@ with the corresponding `add` call:
poetry add https://example.com/my-package-0.1.0.tar.gz
```

## Dependency `extras`

You can specify [PEP-508 Extras](https://www.python.org/dev/peps/pep-0508/#extras)
for a dependency:

```toml
[tool.poetry.dependencies]
gunicorn = { version = "^20.1", extras = ["gevent"] }
```

## `source` dependencies

To depend on a package from an [alternate repository](/docs/repositories/#install-dependencies-from-a-private-repository),
Expand Down
4 changes: 4 additions & 0 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ The globs specified in the exclude field identify a set of files that are not in

If a VCS is being used for a package, the exclude field will be seeded with the VCS’ ignore settings (`.gitignore` for git for example).

{{% note %}}
Implicitly declaring entries in `include` will negate VCS' ignore settings.
{{% /note %}}

```toml
[tool.poetry]
# ...
Expand Down

0 comments on commit a6d2520

Please sign in to comment.