From a6d25209d4dac5200627bd79f49232efa456c49d Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Fri, 20 May 2022 23:14:45 +0200 Subject: [PATCH] Changes in docs for Issues #4800, #3709, #3573, #2211, #521 and PR #2414 - Added section about `extras` in `dependency-specification.md` (#2414) - Added note about VCS inclusion and exclusion in `include`/`exclude` sections of `pyproject.toml` (#4800) - Added link to dependency specification in `add` command documentation (#3573) - Added more info on default behaviour and cleaned up `virtualenv.in-project` setting documentation (#3709) - Added missing configuration options to `configuration.md` (#2211) --- docs/cli.md | 4 ++++ docs/configuration.md | 39 +++++++++++++++++++++++++++++--- docs/dependency-specification.md | 10 ++++++++ docs/pyproject.md | 4 ++++ 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 81768824df0..0e845385a9f 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -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 diff --git a/docs/configuration.md b/docs/configuration.md index edd1c18aa3b..d710127833a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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` @@ -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.`: + +**Types**: string, string + +Set repository credentials (`username` and `password`) for ``. +See [Repositories - Configuring credentials]({{< relref "repositories#configuring-credentials" >}}) +for more information. + +### `pypi-token.`: + +**Type**: string + +Set repository credentials (using an API token) for ``. +See [Repositories - Configuring credentials]({{< relref "repositories#configuring-credentials" >}}) +for more information. + +### `certificates..cert`: + +**Type**: string + +Set custom certificate authority for repository ``. +See [Repositories - Configuring credentials - Custom certificate authority]({{< relref "repositories#custom-certificate-authority-and-mutual-tls-authentication" >}}) +for more information. + +### `certificates..client-cert`: + +**Type**: string + +Set client certificate for repository ``. +See [Repositories - Configuring credentials - Custom certificate authority]({{< relref "repositories#custom-certificate-authority-and-mutual-tls-authentication" >}}) +for more information. diff --git a/docs/dependency-specification.md b/docs/dependency-specification.md index 58dd8525503..49b7ee690da 100644 --- a/docs/dependency-specification.md +++ b/docs/dependency-specification.md @@ -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), diff --git a/docs/pyproject.md b/docs/pyproject.md index cf717d992cd..b8ccf91dbd4 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -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] # ...