python-poetry / python-poetry/poetry

Make poetry.masonry.api plugin-aware

Open
#5,701 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Currently, poetry.masonry.api just re-exports some items from Poetry Core, which means they're not plugin-aware:

https://github.com/python-poetry/poetry/blob/f945937c3a01de380f70a3cbbf3bdbaa902a8c34/src/poetry/masonry/api.py

from poetry.core.masonry.api import build_sdist
...

__all__ = [
    "build_sdist",
    ...
]

Would it be feasible to wrap these so that they support plugins? My use case is poetry-dynamic-versioning-plugin, which computes a version from VCS info. However, a PEP 517-based pip install --no-clean git+ssh://git@github.com/org/repo.git@v1.0.0-pre won't activate the plugin, even with the following build-system configuration:

[build-system]
requires = ["poetry>=1.2.0b1", "poetry-dynamic-versioning-plugin"]
build-backend = "poetry.masonry.api"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/poetry/masonry/api.py and the referenced Poetry Core exports, then reproduce the PEP 517 installation scenario described in the issue. Determine the required plugin-aware behavior for the shown build-system configuration; the work is done when that configuration activates the plugin during the build backend invocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.