python-poetry / python-poetry/poetry

poetry sync (editable mode) doesn't handle/allow custom *.pth files

Open
#10,207 6 comments 0 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

Issue Kind

Brand new capability

Description

The wheel build via poetry build includes custom *.pth files, but they are not installed in editable mode, and there doesn't seem to be an option to enforce this (also couldn't find anything in the source that might do it).

Code references for editable wheel build (which is later installed to the virtualenv):

Impact

I use *.pth-files to initialize the environment; this is an application and is always installed in its own virtualenv, so there is no downside, but it makes life much easier.

Workarounds

With hatch instead of poetry I can install *.pth-files using [tool.hatch.build.targets.wheel.force-include].

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 in poetry-core's src/poetry/core/masonry/builders/wheel.py, especially the editable wheel build references in _build() and _copy_file_scripts(). Compare how custom *.pth files are included by poetry build with the editable path, then determine how editable installation should preserve those files. Done means custom *.pth files are installed in editable mode as well as in the regular wheel.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.