A Poetry plugin to enable exclusivity between groups
Project description
Poet Plugin
A Poetry plugin to enable exclusivity between groups.
Poet stands for Poetry Exclusivity Toggle (or some other excuse, I did not want a verbose package name and
poet
seemed short and sweet since this plugin changes the internal poetry package during runtime).
Installation
Simply add this plugin as a dependency with pip install poet-plugin
.
Usage
When running poetry install
, the various options (--only
, --without
) are parsed to ensure the dependency resolver
only considers what needs to be considered.
This allows a non-mutually exclusive group definition, so that e.g. the dev
group can refer to
some local path, whereas a prod
group refers to git URI.
Examples
Considering the following pyproject.toml
, depicting a mono-repository:
[tool.poetry.dependencies]
python = ">=3.8,<3.12"
poetry = "^1.2.0"
[tool.poetry.group.prod.dependencies]
foo = {git = "https://github.com/bar/foo", subdirectory = "src/libs/foo"}
[tool.poetry.group.dev.dependencies]
foo = {path = "../../libs/foo", develop = true}
- Install the prod version:
poetry install --without dev
, ORpoetry install --only prod
- Install the dev version:
poetry install --without prod
, ORpoetry install --only dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for poet_plugin-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2593b30c2cfa935bd96e44f9af72268c1bb17d091c9d6ac77c40ca1d20b01015 |
|
MD5 | 2764f8e696c068a2b52fccc44fdf22d2 |
|
BLAKE2b-256 | b52219ba3615cf318b6adcc0a574f1de346a19873b9a3a7042e2a601b1571db9 |