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
In a clean project
When starting with a clean pyproject.toml, before any such cross-group non-exclusive dependencies are defined,
simply install with poetry add poet-plugin or poetry self add poet-plugin.
In a cross-dependency project
In cases where the pyproject.toml already has a complicated structure that would cause the poetry CLI to fail,
such as CICD pipelines, install via pip first:
poetry shell
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matsight_poet_plugin-0.1.1.tar.gz.
File metadata
- Download URL: matsight_poet_plugin-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.10 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
869ca5fb658635d04cb9c74c9fa0d6275c5f7b80f24ff58465f50f0ced094394
|
|
| MD5 |
71d2bd0b677f91ad0ab02c9df606ef2d
|
|
| BLAKE2b-256 |
697f0e8c0a4e706de452c675b77fd830ed2753f009464667c93cf09ed67e7e9e
|
File details
Details for the file matsight_poet_plugin-0.1.1-py3-none-any.whl.
File metadata
- Download URL: matsight_poet_plugin-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.10 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d90ccfb3c95078091f22280d8a0328e931805bd0daa7948e19e71a0756fc4987
|
|
| MD5 |
9e7404ed977f5802fa9f2b61a5dffa79
|
|
| BLAKE2b-256 |
916be3c61d850c4777a1cf2a601f7c95ff9d85ac44e65d3e5b68033f6f398f2c
|