python-poetry / python-poetry/poetry

equivalent for --plat-name flag in build

Open
#4,504 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: windows 10
  • Poetry version: 1.1.8
  • Link of a Gist with the contents of your pyproject.toml file:
[tool.poetry]
name = "drr_generator"
version = "0.1.0"
description = ""
authors = ["Elazar <elazar@rsipvision.com>"]
build = "build.py"
exclude = ["./drr_generator"]  # so it won't duplicate the files in the wheel. probably not the correct solution, but can't figure it out for now.

[tool.poetry.dependencies]
python = "^3.7"
numpy = "^1.20.2"

[tool.poetry.dev-dependencies]
pybind11-stubgen = "^0.8.7" # should not be here but poetry has bug of not installing from dev-dependencies. see https://github.com/python-poetry/poetry/issues/2789

[build-system]
requires = ["poetry-core>=1.0.0", "wheel", "pybind11-stubgen"]
build-backend = "poetry.core.masonry.api"

Issue

Not sure if it's a bug or a feature request.

When using poetry build, the resulted artifact is named dist\drr_generator-0.1.0-cp38-cp38-win32.whl. The problem is with the win32 part. it make it impossible to install on python3.8 64bit version, as it fails with:

ERROR: drr_generator-0.1.0-cp38-cp38-win32.whl is not a supported wheel on this platform.

I'm building with a 64bit version of python. When using python setup.py we can have the flag --plat-name=win-amd64 to generate the wheel with the correct name.
I was thinking that the default behavior is to keep the name to be compatible with the python I'm using for the compilation.

I noticed that in python 3.7 it actually give the correct name: dist\drr_generator-0.1.0-cp37-cp37m-win_amd64.whl

Thanks

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 by reproducing the issue with the supplied pyproject.toml on a 64-bit Windows Python environment and run poetry build. Compare the generated wheel tag with the expected win_amd64 tag and the behavior of setup.py --plat-name=win-amd64; done means the artifact is correctly named and installable on the matching Python platform.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.