python-poetry / python-poetry/poetry

poetry build only creates one .whl when CFFI has generated extension for multiple platforms (multiple build/lib.* dirs)

Open
#7,526 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

CFFI can generate libraries for multiple Python platforms, e.g. lib.linux-x86_64-3.9/mymod/_mylib.abi3.so and lib.linux-x86_64-cpython-39/mymod/_mylib.abi3.so (the latter could contain optimised code that relies on CPython features)

poetry build only builds the first one of these that it finds into a .whl file. The guilty code is here: wheel.py:191.

I believe it should build a .whl file for every platform for which CFFI has generated a shared library.

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 at src/poetry/core/masonry/builders/wheel.py around line 191, where the first generated build/lib.* directory is selected. Compare the CFFI-generated platform directories and trace how each is converted into a wheel. Done means poetry build produces a .whl for every generated platform rather than only the first one.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.