python-poetry / python-poetry/poetry
Build script should result in generic wheel suffix "-py3-none-any.whl" if no external modules built
Nobody has claimed this yet.
- 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 FAQ and general documentation and believe that my question is not already covered.
Feature Request
If using the (currently undocumented) build script feature as so:
[tool.poetry.build]
script = "build.py"
generate-setup-file = true
with a build script that has conditional library building as follows:
import os
from mypyc.build import mypycify
extensions = []
if os.environ.get("MYPYCIFY_BUILD", "False").lower() == "true":
modules = [
"my_package/submod1/foo.py",
...
"my_package/submodn/bar.py",
]
extensions = mypycify(modules)
def build(setup_kwargs):
setup_kwargs.update(
{
"ext_modules": extensions,
}
)
Running poetry build always builds a plaform specific wheel (i.e. "my-package-0.1.1-cp310-cp310-manylinux_2_35_x86_64.whl") even if I specify (by env variable MYPYCIFY_BUILD=True).
It would be better if not specifying any ext_modules results in a non platform wheel like "my-package-0.1.1-py3-none-any.whl".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided build.py pattern and trace it through the poetry build entry point, focusing on how an empty ext_modules value determines the wheel tag. Run the build with no external modules and add or update coverage so the result uses the generic -py3-none-any.whl suffix rather than a platform-specific tag.
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