Rename python3.13t.exe to python.exe in Windows free-threaded distributions#373
Rename python3.13t.exe to python.exe in Windows free-threaded distributions#373
python3.13t.exe to python.exe in Windows free-threaded distributions#373Conversation
python.exe copy of python3.13t.exe in Windows free-threaded distributionspython3.13t.exe to python.exe in Windows free-threaded distributions
A temporary fix for #8298 while we wait for my slower upstream fix at astral-sh/python-build-standalone#373 I think we'll want this machinery anyway to ensure that the various executable names are available? Otherwise we need to special-case all the `python` names in `uv run`? We don't have unit test coverage of managed downloads, so I added an [integration test](https://github.com/astral-sh/uv/actions/runs/11394150653/job/31703956805?pr=8310) similar to what we have for Linux.
|
Reading the linked issue, I guess we're going the rename route instead of an additional copy? On Linux and macOS before freethreaded builds the canonical binary was pythonX.Y and we had symlinks from pythonX and python to it. I have a light preference towards shipping copies of the exe to maintain the same logical layout. But if that's not how the official Windows installers work, then maybe the single python.exe is best. |
Yeah, I initially thought the copy was a better option but I trust Sam and Steve's opinions. It seems simplest to maintain consistency with the existing Windows distributions first, i.e., by using |
|
|
||
| # Rename to `python.exe` when an alternative executable is built, e.g., when | ||
| # free-threading is enabled the name is `python3.13t.exe`. | ||
| canonical_python_exe = install_dir / "python.exe" |
There was a problem hiding this comment.
Is install_dir the same as out_dir / "python" / "install"?
There was a problem hiding this comment.
I'm just comparing to python_exe = out_dir / "python" / "install" / python_exe below.
| canonical_python_exe = install_dir / "python.exe" | ||
| if not canonical_python_exe.exists(): | ||
| os.rename( | ||
| install_dir / python_exe, |
There was a problem hiding this comment.
Would it make sense to instead test whether python_exe is "python.exe"?
There was a problem hiding this comment.
I considered both option and don't see a strong case for either one. I think this approach avoids coupling assumptions about the name and mildly prefer it for that reason.
Addressing astral-sh/uv#8298