uv/crates/puffin-interpreter/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
..
cfg.rs Preserve seed packages for non-Puffin-created virtualenvs (#535) 2023-12-04 09:31:00 -05:00
get_interpreter_info.py Initial windows support (#940) 2024-01-24 18:27:49 +01:00
interpreter.rs Validate instead of discovering python patch version (#1266) 2024-02-08 22:38:00 +01:00
lib.rs Strip UNC prefix when setting working directory (#1277) 2024-02-12 00:51:36 +00:00
python_platform.rs Add windows specific filters for tests (#1231) 2024-02-06 15:58:16 +01:00
python_query.rs Validate instead of discovering python patch version (#1266) 2024-02-08 22:38:00 +01:00
python_version.rs Validate instead of discovering python patch version (#1266) 2024-02-08 22:38:00 +01:00
virtual_env.rs Strip UNC prefix when setting working directory (#1277) 2024-02-12 00:51:36 +00:00