-
Notifications
You must be signed in to change notification settings - Fork 1.5k
new docker image bookworm-slim makes uv build
fail
#11213
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
Comments
uv build
failed pipelinesuv build
fail
What build system and build system settings are you using (the |
Yes sorry forgot to forward it with the initial message [build-system]
requires = ["hatchling"]
build-backend = "hatchling.build" |
Unfortunately i can't reproduce this:
|
The problem might be on our end but just to be sure docker run --rm -it ghcr.io/astral-sh/uv:0.5.27-python3.12-bookworm-slim bash
Unable to find image 'ghcr.io/astral-sh/uv:0.5.27-python3.12-bookworm-slim' locally
0.5.27-python3.12-bookworm-slim: Pulling from astral-sh/uv
root@3d4d403b95e6:/# mkdir -p test
root@3d4d403b95e6:/# cd test/
root@3d4d403b95e6:/test# uv init --lib a_package
Initialized project `a-package` at `/test/a_package`
root@3d4d403b95e6:/test# cd a_package/
root@3d4d403b95e6:/test/a_package# export UV_CACHE_DIR=.uv-cache
root@3d4d403b95e6:/test/a_package# uv build
Building source distribution...
× Failed to build `/test/a_package`
├─▶ failed to unpack `/test/a_package/.uv-cache/sdists-v7/.tmppBrVL8/a_package-0.1.0/.uv-cache/builds-v0/.tmpY0p9D8/lib/python3.12/site-packages/hatchling/__about__.py`
╰─▶ No such file or directory (os error 2) while canonicalizing
/test/a_package/.uv-cache/sdists-v7/.tmppBrVL8/a_package-0.1.0/.uv-cache/builds-v0/.tmpY0p9D8/lib/python3.12/site-packages/hatchling/a_package-0.1.0/.uv-cache/archive-v0/_2EI4Ur_6bHqMSVqQDuEx/hatchling/__about__.py Seems like using Am I doing something wrong here ? And FYI docker run --rm -it ghcr.io/astral-sh/uv:0.5.26-python3.12-bookworm-slim bash
root@7f52a30394c4:/# mkdir -p test
root@7f52a30394c4:/# cd test/
root@7f52a30394c4:/test# uv init --lib a_package
Initialized project `a-package` at `/test/a_package`
root@7f52a30394c4:/test# cd a_package/
root@7f52a30394c4:/test/a_package# export UV_CACHE_DIR=.uv-cache
root@7f52a30394c4:/test/a_package# uv build
Building source distribution...
Building wheel from source distribution...
Successfully built dist/a_package-0.1.0.tar.gz
Successfully built dist/a_package-0.1.0-py3-none-any.whl |
Are you able to share a minimal package that reproduces this problem? It seems to be something specific to the package. E.g., does it contain any hardlinks or symlinks? |
Sorry, nevermind -- it's just |
If you need more details or info on my side (regarding my specific package) I'd be happy to give more details |
Thanks, |
I assume you can workaround this for now by setting |
The problem is that the uv is cache is inside the project, so it gets packaged into the source dist including the hard links in the cache, and then there's the regression I'll fix that we don't support hardlinks in source distributions anymore. |
In astral-sh/tokio-tar#2, we accidentally changed the `target_base` from the target base to the parent of the file. This would cause hardlink unpacking to fail. Example: A hardlink at `hardlinked-0.1.0/pyproject.toml` pointing to `hardlinked-0.1.0/pyproject.toml.real` would try pointing to `hardlinked-0.1.0/hardlinked-0.1.0/pyproject.toml.real` instead and fail the unpacking. The actual fix is krata-tokio-tar, on the uv side there are only tests. Fixes #11213
I can totally do a workaround for now like you said. For more context in case it can be of some help, using previous uv version we noticed that sometimes the cache Now that I understand it better i'll change my cache logic to prevent this. Thanks for the help guys really appreciate it. |
In astral-sh/tokio-tar#2, we accidentally changed the `target_base` from the target base to the parent of the file. This would cause hardlink unpacking to fail. Example: A hardlink at `hardlinked-0.1.0/pyproject.toml` pointing to `hardlinked-0.1.0/pyproject.toml.real` would try pointing to `hardlinked-0.1.0/hardlinked-0.1.0/pyproject.toml.real` instead and fail the unpacking. The actual fix is krata-tokio-tar, on the uv side there are only tests. Fixes #11213
Summary
Hi,
I'm running CI on gitlab using their saas runners (linux amd64)
I don't know if i'm the only one here but I noticed that since latest docker images have dropped my CI are failing to
uv build
.Tried to run without cache / with different python version (bookworm-slim 3.8 / 3.9 / 3.12)
Using the ghcr.io/astral-sh/uv:0.5.26-python3.12-bookworm-slim does work for me
Platform
linux amd64
Version
uv 0.5.27
Python version
3.12
The text was updated successfully, but these errors were encountered: