Skip to main content

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, OR
    • poetry install --only prod
  • Install the dev version:
    • poetry install --without prod, OR
    • poetry install --only dev

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matsight_poet_plugin-0.1.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matsight_poet_plugin-0.1.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file matsight_poet_plugin-0.1.2.tar.gz.

File metadata

  • Download URL: matsight_poet_plugin-0.1.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.10 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for matsight_poet_plugin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9648ae75ef85e42f90032a4ade4dc2ae17561adf2023c463d9645955fffb1a54
MD5 4bdd71a23c955e46ad131c7a84d907d9
BLAKE2b-256 518b1642e82da796fbbd4180b7096cce0b8a8b5676fc1ddaacf64d718767f9d0

See more details on using hashes here.

File details

Details for the file matsight_poet_plugin-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: matsight_poet_plugin-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.10 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for matsight_poet_plugin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 301ef52765507419990391603120bd4768013e0da3e89406d87e1d84ec3f4e88
MD5 9d5a704b2a74a7d8f29d806dd77e171f
BLAKE2b-256 5d7ab09e89bda5adaa95416f14b0dc32b13aa2a2c8744e88097fa2697167341e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page