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

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, 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

poet-plugin-0.1.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

poet_plugin-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file poet-plugin-0.1.1.tar.gz.

File metadata

  • Download URL: poet-plugin-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.4 Linux/5.15.0-48-generic

File hashes

Hashes for poet-plugin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 abf0d78f3fbf903bc7b529c1e028deff912255d6ca79b4bb21152bbaf69e7d6d
MD5 51570fed2ac04c986bef029b2ab076d4
BLAKE2b-256 9bf26319560c55e5543266d874f55133e388eb3711d8999fb6f67f4293654913

See more details on using hashes here.

File details

Details for the file poet_plugin-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: poet_plugin-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.4 Linux/5.15.0-48-generic

File hashes

Hashes for poet_plugin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db4874e155ccc8072c0afdf7ef49237be1cae86c14423846c8523a7619391d78
MD5 7840dc993d44917c94c17d0da69a980c
BLAKE2b-256 68cb3dbb2fa84cf99f9a6f9aed034541ebd22edb2c487fa9e0dd88c4261c85c1

See more details on using hashes here.

Supported by

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