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

Treat .whl filenames as files rather than package names #7309

Closed
senysenyseny16 opened this issue Sep 11, 2024 · 6 comments · Fixed by #7364
Closed

Treat .whl filenames as files rather than package names #7309

senysenyseny16 opened this issue Sep 11, 2024 · 6 comments · Fixed by #7364
Assignees
Labels
bug Something isn't working

Comments

@senysenyseny16
Copy link

Unable to install package inside docker, in normal environment the same package installs without problems.

docker run -it --rm -v $(pwd):/io python:3.10 /bin/bash

pip install uv

root@2610453f5764:/io# uv pip install package_name-1.0.0.dev56+g18c683a2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
error: Failed to parse: `package_name-1.0.0.dev56+g18c683a2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl`
  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `+`
package_name-1.0.0.dev56+g18c683a2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
@charliermarsh
Copy link
Member

I think you need uv pip install ./package_name-1.0.0.dev56+g18c683a2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

@charliermarsh charliermarsh added the question Asking for clarification or support label Sep 11, 2024
@senysenyseny16
Copy link
Author

Thank you, it really works. But why?

@charliermarsh
Copy link
Member

charliermarsh commented Sep 11, 2024

We don't consider an identifier like package_name-1.0.0.dev56+g18c683a2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl to be a file name, since we avoid basing that parsing logic on the current state of the filesystem. By adding ./, it's clearly a relative path.

@charliermarsh
Copy link
Member

We can probably improve this though.

@senysenyseny16
Copy link
Author

Thanks!

@charliermarsh
Copy link
Member

Gonna re-open because I want to fix our logic here.

@charliermarsh charliermarsh self-assigned this Sep 12, 2024
@charliermarsh charliermarsh added bug Something isn't working and removed question Asking for clarification or support labels Sep 12, 2024
@charliermarsh charliermarsh changed the title Failed to parse in Docker Treat .whl filenames as files rather than package names Sep 12, 2024
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.

2 participants