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

Cannot install cobertura_clover_transform on first install #2064

Closed
jtanx opened this issue Feb 29, 2024 · 5 comments · Fixed by #2091
Closed

Cannot install cobertura_clover_transform on first install #2064

jtanx opened this issue Feb 29, 2024 · 5 comments · Fixed by #2091
Assignees
Labels
bug Something isn't working

Comments

@jtanx
Copy link

jtanx commented Feb 29, 2024

This seems to be a regression in uv 0.1.12, this works fine in 0.1.11

VIRTUAL_ENV=ve uv pip install cobertura_clover_transform
Resolved 2 packages in 603ms
error: Failed to install: cobertura_clover_transform-1.1.4.post1-py3-none-any.whl (cobertura-clover-transform==1.1.4.post1)
  Caused by: RECORD file is invalid
  Caused by: No such file or directory (os error 2)

Rerunning that command, it succeeds

@charliermarsh
Copy link
Member

Hmm, this ran without error for me repeatedly.

@charliermarsh charliermarsh added the needs-mre Needs more information for reproduction label Feb 29, 2024
@jtanx
Copy link
Author

jtanx commented Feb 29, 2024

Odd, this was with artifactory if it matters

@mgaitan
Copy link

mgaitan commented Feb 29, 2024

this just bit us in our CI suite with a package from vanilla pypi.

I could reproduce it in our image (based on a legacy Amazon Linux2) but not in my host on Ubuntu, so maybe is something related to musl ?

this is the debug on AL2

$ curl -LsSf https://astral.sh/uv/install.sh | sh
System glibc version (`2.26') is too old; using musl
downloading uv 0.1.12 x86_64-unknown-linux-musl-static
installing to /user/.cargo/bin
  uv
everything's installed!

To add $HOME/.cargo/bin to your PATH, either restart your shell or run:

    source $HOME/.cargo/env

$ /user/.cargo/bin/uv venv /tmp/bug
Using Python 3.8.16 interpreter at /opt/venv/bin/python3
Creating virtualenv at: /tmp/bug
Activate with: source /tmp/bug/bin/activate
$ source /tmp/bug/bin/activate
(bug) $ /user/.cargo/bin/uv pip install --no-cache mpmath
Resolved 1 package in 383ms
Downloaded 1 package in 327ms
error: Failed to install: mpmath-1.3.0-py3-none-any.whl (mpmath==1.3.0)
  Caused by: RECORD file is invalid
  Caused by: No such file or directory (os error 2)  

@charliermarsh
Copy link
Member

I think I see the issue here.

@charliermarsh charliermarsh self-assigned this Feb 29, 2024
@charliermarsh
Copy link
Member

(If I'm right, it's just a typo.)

@charliermarsh charliermarsh added bug Something isn't working and removed needs-mre Needs more information for reproduction labels Feb 29, 2024
charliermarsh added a commit that referenced this issue Feb 29, 2024
## Summary

This was a missed find-and-replace. We shouldn't assume `layout.platlib`
here, since `RECORD` will be written to `site_packages` (which could be
`layout.purelib`).

This is hard to reproduce. You need a _fresh_ environment where
`purelib` and `platlib` differ (which isn't the case for virtualenvs, at
least typically), and you need to be installing a new package that is a
purelib. I tested it by manually changing `platlib` to point to a
different path.

Closes #2064.
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.

3 participants