uv/crates/install-wheel-rs/src
Charlie Marsh d98b3c3070
Strip UNC prefix when setting working directory (#1277)
## Summary

For PEP 517 builds, the current working directory needs to be set to the
directory of the source distribution. It turns out that on Windows, if
you use a UNC path for the working directory, then relative paths are
interpreted relative to the root of the current drive
([source](https://www.fileside.app/blog/2023-03-17_windows-file-paths/#paths-relative-to-the-root-of-the-current-drive)).
So, when builds attempted to resolve relative paths, they always
errored...

This PR ensures that we remove the UNC prefix when setting the current
working directory.

Closes #1238.

## Test Plan

I tested this on my Windows machine by installing `ujson` with
`--no-binary ujson`. (I don't want to add that specific test, since it's
really slow to build.)
2024-02-12 00:51:36 +00:00
..
install_location.rs Strip UNC prefix when setting working directory (#1277) 2024-02-12 00:51:36 +00:00
lib.rs Strip UNC prefix when setting working directory (#1277) 2024-02-12 00:51:36 +00:00
linker.rs Remove unnecessary `is_dir` in `clone_recursive` (#1247) 2024-02-04 23:54:22 +00:00
main.rs Add INSTALLER file to install-wheel-rs (#760) 2024-01-03 17:30:54 -05:00
pip_compileall.py Copy over `install-wheel-rs` crate (#33) 2023-10-06 21:38:38 -04:00
python_bindings.rs Add INSTALLER file to install-wheel-rs (#760) 2024-01-03 17:30:54 -05:00
record.rs Store unzipped wheels in a cache (#49) 2023-10-08 04:04:48 +00:00
script.rs Use `rustc-hash` instead of `fxhash` crate (#594) 2023-12-08 20:27:49 +00:00
uninstall.rs Add a dedicated error for missing RECORD files (#762) 2024-01-04 00:28:50 +00:00
wheel.rs Strip UNC prefix when setting working directory (#1277) 2024-02-12 00:51:36 +00:00