uv/crates/uv-python
Zanie Blue fb1d679f69
Improve interactions with existing Python executables during install (#8733)
Previously, we'd use the `--reinstall` flag to determine if we should
replace existing Python executables in the bin directory during an
install. There are a few problems with this:

- We replace executables we don't manage
- We can replace executables from other uv Python installations during
reinstall (surprising)
- We don't do the "right" thing when installing patch versions e.g.
installing `3.12.4` then `3.12.6` would fail without the reinstall flag

In `uv tool`, we have separate `--force` and `--reinstall` concepts.
Here we separate the flags (`--force` was previously just a
`--reinstall` alias) and add inspection of the existing executables to
inform a decision on replacement.

In brief, we will:

- Replace any executables with `--force`
- Replace executables for the same installation with `--reinstall`
- Replace executables for an older patch version by default
2024-11-04 20:22:44 +00:00
..
python Block Python <3.7 not only on linux (#7266) 2024-09-10 15:15:41 -05:00
src Improve interactions with existing Python executables during install (#8733) 2024-11-04 20:22:44 +00:00
Cargo.toml Add support for installing versioned Python executables on Windows (#8663) 2024-10-31 15:58:35 +00:00
download-metadata.json Fix a typo in fetch-download-metadata.py (#8515) 2024-10-24 07:33:14 -05:00
fetch-download-metadata.py Fix a typo in fetch-download-metadata.py (#8515) 2024-10-24 07:33:14 -05:00
template-download-metadata.py Add support for managed installs of free-threaded Python (#8100) 2024-10-14 15:18:52 -05:00