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

Bump uv version to fix zig-bin installation issues #1650

Closed
2 tasks done
TCROC opened this issue Jul 22, 2024 · 21 comments
Closed
2 tasks done

Bump uv version to fix zig-bin installation issues #1650

TCROC opened this issue Jul 22, 2024 · 21 comments
Labels
🐞 bug Something isn't working

Comments

@TCROC
Copy link

TCROC commented Jul 22, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

pixi add --pypi zig-bin

Issue description

See that you get this error:

thread 'main' panicked at /home/runner/work/pixi/pixi/src/install_pypi.rs:1071:14:
called `Result::unwrap()` on an `Err` value: Failed to install: zig_bin-0.13.0-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.musllinux_1_1_x86_64.http.whl (zig-bin==0.13.0)

Expected behavior

zig should install

@TCROC TCROC added the 🐞 bug Something isn't working label Jul 22, 2024
@TCROC
Copy link
Author

TCROC commented Jul 22, 2024

Doing it via a task seems to work fine.

[tasks]
install-zig = "pip3 install zig-bin==0.13.0"

Bummer is I lose out on the advantage of a pixi.lock. So it works as a temporary workaround until this gets resolved.

@TCROC
Copy link
Author

TCROC commented Jul 22, 2024

Also another thing to note, pixi seems to get in a corrupted state when trying to install zig-bin. Deleting the pixi.lock file and recreating it after removing the dependency seems to fix it.

@wolfv
Copy link
Member

wolfv commented Jul 22, 2024

Hey @TCROC - do you know if this is a regression of the newest release? We updated uv so it's possible something broke.

@TCROC
Copy link
Author

TCROC commented Jul 22, 2024

Hey @wolfv ! :) I have reproduced it with both 0.25.0 and 0.26.1. I originally discovered it in 0.25.0 and updated to 0.26.1 hoping it would fix it but it did not :/. When was the uv change introduced?

@wolfv
Copy link
Member

wolfv commented Jul 22, 2024

In 0.26.0, which was released today basically.

@TCROC
Copy link
Author

TCROC commented Jul 22, 2024

I just tested with version 0.25.0 again and can confirm the error still exists in that version

@TCROC
Copy link
Author

TCROC commented Jul 22, 2024

I tried 0.23.0 as well and it still occurs. I suspect it has been here for some time if not the entire time.

@baszalmstra
Copy link
Contributor

This seems to be an issue with uv / the wheel itself. When I use uv to install the zig_bin I get a similar error:

uv pip install zig_bin==0.13.0
Resolved 1 package in 67ms
Prepared 1 package in 2.82s
error: Failed to install: zig_bin-0.13.0-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.musllinux_1_1_x86_64.whl (zig-bin==0.13.0)
  Caused by: The wheel is invalid: Wheel contains entry in scripts directory that is not a file: /home/zalms/miniforge3/lib/python3.10/site-packages/zig_bin-0.13.0.data/scripts/lib

@wolfv
Copy link
Member

wolfv commented Jul 23, 2024

@TCROC maybe you can try ziglang: https://pypi.org/project/ziglang/

@TCROC
Copy link
Author

TCROC commented Jul 23, 2024

@wolfv that indeed works! Thank you! :) Now I can do this as a workaround:

nushell:

$env.PATH = ($env.PATH | prepend ((python3 -m ziglang env | from json).zig_exe | dirname))
zig version

And then zig is back on my path for my godot-src project! :)

Good news: I get benefits of lockfile and such again! :)

Bad news: Its ugly because zig doesn't get installed directly to the .pixi/envs/default/bin folder. It gets installed to: /home/tcroc/dev/BlockyBallOT/submodules/godot-src/.pixi/envs/default/lib/python3.12/site-packages/ziglang/zig

I'll use this for now tho! :)

Hopefully we can still get this fixed as I expect this issue will likely arise with other pypi packages. And we may not be so lucky to have an alternative next time.

@TCROC
Copy link
Author

TCROC commented Jul 23, 2024

This seems to be an issue with uv / the wheel itself. When I use uv to install the zig_bin I get a similar error:

uv pip install zig_bin==0.13.0
Resolved 1 package in 67ms
Prepared 1 package in 2.82s
error: Failed to install: zig_bin-0.13.0-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.musllinux_1_1_x86_64.whl (zig-bin==0.13.0)
  Caused by: The wheel is invalid: Wheel contains entry in scripts directory that is not a file: /home/zalms/miniforge3/lib/python3.10/site-packages/zig_bin-0.13.0.data/scripts/lib

@baszalmstra with this being said, is there a uv repo where we should make people aware?

@wolfv
Copy link
Member

wolfv commented Jul 23, 2024

you could file an issue on https://github.com/astral-sh/uv :)

@wolfv wolfv closed this as completed Jul 23, 2024
@TCROC
Copy link
Author

TCROC commented Jul 23, 2024

@wolfv Should we be closing this issue tho? Technically its still impacting pixi and may be nice to track until it gets solved. If uv for example says "won't fix" then we might want to consider alternate solutions.

@wolfv
Copy link
Member

wolfv commented Jul 24, 2024

can you try with pip @TCROC? I suspect it's a faulty wheel.

@TCROC
Copy link
Author

TCROC commented Jul 24, 2024

@wolfv pip works fine. I actually listed that as a workaround here: #1650 (comment)

@TCROC
Copy link
Author

TCROC commented Jul 24, 2024

Doing it via a task seems to work fine.


[tasks]

install-zig = "pip3 install zig-bin==0.13.0"

Bummer is I lose out on the advantage of a pixi.lock. So it works as a temporary workaround until this gets resolved.

@wolfv

@baszalmstra
Copy link
Contributor

Seems like its already tracked and fixed: astral-sh/uv#5359

@TCROC
Copy link
Author

TCROC commented Jul 25, 2024

@wolfv Can we reopen this issue? It looks like we need to update uv to the latest release here in pixi. Which may require some effort as sometimes updates do. Hopefully its as simple as a version bump tho! :)

@wolfv wolfv reopened this Jul 25, 2024
@wolfv
Copy link
Member

wolfv commented Jul 25, 2024

@TCROC alrighty then!

@TCROC
Copy link
Author

TCROC commented Jul 25, 2024

@wolfv Perfect thank you! :) In hindsight I realize I spammed you with @'s. Sorry about that 😅. I was working with the godot team on an issue and didn't realize I had already @'d you twice by the time I got back around to this one.

Anywho, would you like me to change the title of the issue to something like "Update uv dependency" or something like that for better organization?

@ruben-arts ruben-arts changed the title zig pypi-dependency results in wheel is invalid error Bump uv version to fix zig-bin installation issues Aug 5, 2024
@baszalmstra
Copy link
Contributor

We merged the latest uv in #1829 . Closing this issue, please reopen if issues still occur once a new version of pixi is released.

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

No branches or pull requests

3 participants