-
-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tox does not create valid editable wheel #2880
Comments
tox 3 did not use editable wheels. tox 4 does. pdm is clearly generating a broken editable wheel, that feature was just not used on tox v3. pdm build might be doing something different then how we call build_editable. But considering every other backend works fine, I think pdm is likely in wrong here. |
Poetry-backed wheel generation is failing with the same error message. #2870 |
I briefly tried hatchling but looks like I need to make other config changes. @gaborbernat says:
Which build backends does tox actually test with? Given that it's now reported that pdm and poetry backends are broken, I'm not sure this claim is accurate. |
I'm preparing a proper bug report for tox-dev/pyproject-api, so please stand by, but in the short term: In both cases, these backends are following the spec PEP 517: if the frontend provides a |
Guess the question is what does provide mean? Just specify or does it needs to actually have proper metadata in it. That is if the director is empty, shouldn't the back end regenerate it? |
My interpretation of the spec reads as, if you provide a directory, then the wheel must contain that directory exactly From PEP 517
|
Setuptools, hatch and flit are tested and works. Poetry and pdm are esoteric enough that didn't add tests to it. |
@gaborbernat i filed tox-dev/pyproject-api#47; have an idea for a minimal fix |
With tox-dev/pyproject-api#48, I'm no longer reproducing #2870
However this issue still remains; the crux is that I'm thinking something along the lines of "if |
Yes please 👍 |
Passing empty `metadata_directory` to `build_wheel` or `build_editable` can cause some PEP 517 backends to create a wheel without metadata. Fix tox-dev#2880
Passing empty `metadata_directory` to `build_wheel` or `build_editable` can cause some PEP 517 backends to create a wheel without metadata. Fix tox-dev#2880
Issue
I reported this bug previously against the pdm project, but now I think this is a regression or change in tox v4. Most of the following is copied from there.
I had several packages which are built and uploaded using tox + pdm. One example is flufl.lock. I recently received a bug report about the documentation not building on Debian so I started to investigate the problem.
The first step is to build from
main
as it is to ensure that it's still locally build and testable. Unfortunately, it's not! The build now fails locally on macOS.Indeed it looks like the editable wheel is broken:
The
.pth
file in that wheel looks right, in that it contains the path to mysrc
directory.Clearly something that had been working before is no longer working, but I'm not sure where the bug is.
Steps to reproduce
I suggest just running the
py311
environment to see the failure.To further investigate, I installed
tox<4
in a venv and ran the same command as above, and that worked fine. I looked through the various upgrading to tox 4 recommendations and couldn't find anything that helped. I did trypackage = editable-legacy
even though pdm supports PEP 660, but that didn't help.Note too that
pdm build
does create a valid wheel:Environment
Provide at least:
pip list
of the host Python wheretox
is installed: n/aNote that tox 4.3.3 is installed via Homebrew
Output of running tox
Provide the output of
tox -rvv
:Minimal example
If possible, provide a minimal reproducer for the issue:
The text was updated successfully, but these errors were encountered: