Commit adc3cde3 by Akhilesh Raju Committed by GitHub

Doc: Update "extras" section in pyproject.toml file

Resolves: #1076
parent 6eaa2984
......@@ -243,15 +243,32 @@ mysqlclient = { version = "^1.3", optional = true }
[tool.poetry.extras]
mysql = ["mysqlclient"]
pgsql = ["psycopg2"]
databases = ["mysqlclient", "psycopg2"]
```
When installing packages, you can specify extras by using the `-E|--extras` option:
When installing packages with Poetry, you can specify extras by using the `-E|--extras` option:
```bash
poetry install --extras "mysql pgsql"
poetry install -E mysql -E pgsql
```
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).
For example, when installing the package using `pip`, the dependencies required by
the `databases` extra can be installed as shown below.
```bash
pip install awesome[databases]
```
!!!note
The dependencies specified for each `extra` must already be defined as project dependencies.
Dependencies listed in the `dev-dependencies` section cannot be specified as extras.
## `plugins`
Poetry supports arbitrary plugins which work similarly to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment