Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Jul 13, 2024
1 parent cd92c39 commit 7e92620
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,28 @@ You can also list all currently installed plugins by running:
poetry self show plugins
```

### Project plugins

You can also specify that a plugin is required for your project
in the `tool.poetry.self` section of the pyproject.toml file:

```toml
[tool.poetry.self.plugins]
my-application-plugin = ">1.0"
```

If the plugin is not installed in Poetry's own environment when running `poetry install`,
it will be installed only for the current project under `.poetry/plugins`
in the project's directory.

The syntax to specify `plugins` is the same as for [dependencies]({{< relref "managing-dependencies" >}}).

{{% warning %}}
You can even overwrite a plugin in Poetry's own environment with another version.
However, if a plugin's dependencies are not compatible with packages in Poetry's own
environment, installation will fail.
{{% /warning %}}


## Maintaining a plugin

Expand Down
15 changes: 15 additions & 0 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,21 @@ any custom url in the `urls` section.

If you publish your package on PyPI, they will appear in the `Project Links` section.

## `self`

In this section, you can specify requirements for Poetry itself.

You can also specify that a plugin is required for your project:
You can specify that certain plugins are required for your project:

```toml
[tool.poetry.self.plugins]
my-application-plugin = ">=1.0"
my-plugin = ">=1.0,<2.0"
```

See [Project plugins]({{< relref "plugins#project-plugins" >}}) for more information.

## Poetry and PEP-517

[PEP-517](https://www.python.org/dev/peps/pep-0517/) introduces a standard way
Expand Down

0 comments on commit 7e92620

Please sign in to comment.