uv icon indicating copy to clipboard operation
uv copied to clipboard

Support absolute path on windows

Open Czaki opened this issue 1 year ago • 3 comments

When plaing with tox integration I got two bug reports that suggest that uv is not properly interpreting absolute windows paths.

When try locally

uv pip install napari@C:\Users\Grzegorz\Documents\Projects\napari\dist\napari-0.5.0a2.dev542+g9ad565f7.tar.gz
⠙ Resolving dependencies...
thread 'main' panicked at D:\a\uv\uv\crates\uv-distribution\src\source\mod.rs:168:22:
Distribution must have a filename: UrlFilename(Url { scheme: "c", cannot_be_a_base: true, username: "", password: None, host: None, port: None, path: "\\Users\\Grzegorz\\Documents\\Projects\\napari\\dist\\napari-0.5.0a2.dev542+g9ad565f7.tar.gz", query: None, fragment: None })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

On CI: https://github.com/napari/napari/actions/runs/7935590920/job/21669475977?pr=6668#step:12:51

py311-windows-pyqt6-no_cov: install_package> python -I -m uv pip install --force-reinstall --no-deps "napari @ D:\a\napari\napari\dist\napari-0.5.0a2.dev560+g2c217efd-py3-none-any.whl"
error: Unable to extract filename from URL: d:\a\napari\napari\dist\napari-0.5.0a2.dev560+g2c217efd-py3-none-any.whl

It looks like there is a problem with parsing the Windows path. Did I'm correct?

Czaki avatar Feb 16 '24 20:02 Czaki

Yeah that seems wrong...

charliermarsh avatar Feb 16 '24 20:02 charliermarsh

Reproduced, will fix.

charliermarsh avatar Feb 16 '24 22:02 charliermarsh

This didn't go out in v0.1.3, but will be fixed soon.

charliermarsh avatar Feb 17 '24 01:02 charliermarsh

This is blocking currently tox-uv supporting Windows (https://github.com/tox-dev/tox-uv/pull/19).

gaborbernat avatar Feb 19 '24 01:02 gaborbernat

👍 I’m hoping to fix it tomorrow.

charliermarsh avatar Feb 19 '24 01:02 charliermarsh