Skip to content
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

Display the built file name instead of the canonicalized name in uv build #11103

Closed
dimbleby opened this issue Jan 30, 2025 · 5 comments · Fixed by #11593
Closed

Display the built file name instead of the canonicalized name in uv build #11103

dimbleby opened this issue Jan 30, 2025 · 5 comments · Fixed by #11593
Assignees
Labels
bug Something isn't working

Comments

@dimbleby
Copy link

Summary

eg

curl -O https://files.pythonhosted.org/packages/ea/46/f44d8be06b85bc7c4d8c95d658be2b68f27711f279bf9dd0612a5e4794f5/ruamel.yaml-0.18.10.tar.gz
uv build --wheel ruamel.yaml-0.18.10.tar.gz

giving output that ends Successfully built ruamel_yaml-0.18.10-py3-none-any.whl

but this is not true, the setuptools backend is not PEP491 compliant, so the file that is actually built is ruamel.yaml-0.18.10-py3-none-any.whl.

I guess uv is assuming that the output is always spec-compliant?

It's a pretty minor confusion.

(Also this particular example should go away soon, there's a pull request open in setuptools for PEP491-compliance that looks likely to merge any day now.)

Platform

ubuntu 24.04

Version

0.5.25

Python version

3.13

@dimbleby dimbleby added the bug Something isn't working label Jan 30, 2025
@konstin
Copy link
Member

konstin commented Jan 30, 2025

Your guesses are right: uv is parsing the filename and using its normalized string printer for it. This would always be the same value for a spec-compliant build backend, which setuptools isn't (pypa/setuptools#4766). We could warn about this but it's not something the user can fix (#8203).

@zanieb
Copy link
Member

zanieb commented Jan 31, 2025

Why not display the unparsed file name? i.e., what does parsing / normalizing get us?

@charliermarsh
Copy link
Member

I don't think we even have it. We probably store the WheelFilename.

@charliermarsh
Copy link
Member

Oh nevermind, we do get it back from the build backend. We should just show the "real" filename.

@konstin
Copy link
Member

konstin commented Jan 31, 2025

The parsing part gives us a correctness check that the output file is valid and not an error. We can change the message to verbatim independent of that.

@zanieb zanieb changed the title Files built by uv build do not necessarily match the "success" message Display the built file name instead of the canonicalized name in uv build Feb 16, 2025
@konstin konstin removed their assignment Feb 18, 2025
@jtfmumm jtfmumm self-assigned this Feb 20, 2025
jtfmumm added a commit that referenced this issue Feb 20, 2025
…build` (#11593)

We keep the raw filename (prior to parsing/normalization) on the
`BuildMessage` so we can display it.

Closes #11103.
Closes #11635.
loic-lescoat pushed a commit to loic-lescoat/uv that referenced this issue Mar 2, 2025
…build` (astral-sh#11593)

We keep the raw filename (prior to parsing/normalization) on the
`BuildMessage` so we can display it.

Closes astral-sh#11103.
Closes astral-sh#11635.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants