uv/crates/uv-python/src
konsti ceffd7ff80
Discover registry PEP 514 Pythons cross 32/64-bit (#11801)
Fixes #11217

By default, a 64-bit uv does not see a 32-bit global (HKLM) installation
of Python in the registry
(https://github.com/astral-sh/uv/issues/11217). To work around this, we
manually request both 32-bit and 64-bit access using registry access
flags (https://peps.python.org/pep-0514/#sample-code). The flags have no
effect on 32-bit (https://stackoverflow.com/a/12796797/3549270).

This effect is that there is an asymmetry between discovery modes: For
the registry-based discovery using PEP 514, we discover both 32-bit and
64-bit Pythons, while for managed installations, we are stricter and
only discover those matching in bit-ness.

I tested this manually with an additional 32-bit installation of CPython
on a 64-bit machine and windows with 32-bit and 64-bit (x86_64 and i686)
builds of uv.
2025-03-03 14:46:00 +00:00
..
sysconfig Patch pkg-config files to be relocatable (#11291) 2025-02-07 17:03:55 -06:00
cpuinfo.rs Fix hard and soft float libc detection for managed Python distributions on ARM (#8498) 2024-10-29 23:46:21 +00:00
discovery.rs Upgrade Rust toolchain to 1.85 (#11720) 2025-02-23 16:52:34 +01:00
downloads.inc Add pypy3.10-v7.3.19 to managed Python releases (#11814) 2025-03-02 22:48:35 +00:00
downloads.inc.mustache Allow download of Python distribution variants with newer CPU instruction sets (#9781) 2024-12-10 14:26:45 -06:00
downloads.rs Allow use of x86-64 Python on ARM Windows (#11625) 2025-02-19 12:01:46 -06:00
environment.rs Respect include-system-site-packages in layered environments (#11873) 2025-02-28 22:22:37 -05:00
implementation.rs Prefer Python executable names that match the request over default names (#9066) 2024-11-13 10:00:23 -06:00
installation.rs Allow fallback to Python download on non-critical discovery errors (#10908) 2025-01-23 22:37:02 +00:00
interpreter.rs Make interpreter caching robust to OS upgrades (#11875) 2025-03-02 01:36:38 +00:00
lib.rs uv-python tests: Use #!/bin/sh instead of #!/bin/bash (#11292) 2025-02-07 09:42:33 -06:00
libc.rs Consistently write log messages with capitalized first word (#11111) 2025-01-30 18:56:46 +00:00
macos_dylib.rs Install and remove managed Python to and from the Windows Registry (PEP 514) (#10634) 2025-01-23 14:13:41 +00:00
managed.rs Allow use of x86-64 Python on ARM Windows (#11625) 2025-02-19 12:01:46 -06:00
microsoft_store.rs Install and remove managed Python to and from the Windows Registry (PEP 514) (#10634) 2025-01-23 14:13:41 +00:00
platform.rs Allow use of x86-64 Python on ARM Windows (#11625) 2025-02-19 12:01:46 -06:00
pointer_size.rs Change "toolchain" to "python" (#4735) 2024-07-03 07:44:29 -05:00
prefix.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
python_version.rs Edition 2024 prep: Escape r#gen and remove redundant ref (#11922) 2025-03-03 11:13:56 +00:00
target.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
version_files.rs Discover and respect .python-version files in parent directories (#6370) 2024-11-07 14:29:54 -06:00
virtualenv.rs Respect include-system-site-packages in layered environments (#11873) 2025-02-28 22:22:37 -05:00
windows_registry.rs Discover registry PEP 514 Pythons cross 32/64-bit (#11801) 2025-03-03 14:46:00 +00:00