File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/ducktools/pythonfinder/win32 Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ def get_python_installs(
3838 * ,
3939 finder : DetailFinder | None = None
4040) -> Iterator [PythonInstall ]:
41- listed_installs = set ()
41+ listed_stdlibs = set ()
42+ listed_bins = set ()
4243
4344 finder = DetailFinder () if finder is None else finder
4445
@@ -48,6 +49,12 @@ def get_python_installs(
4849 get_pyenv_pythons (finder = finder ),
4950 get_uv_pythons (finder = finder ),
5051 ):
51- if py .executable not in listed_installs :
52+ # Compare by stdlib paths for uniqueness
53+ stdlib_path = py .paths .get ("stdlib" )
54+ if stdlib_path :
55+ if stdlib_path not in listed_stdlibs :
56+ yield py
57+ listed_stdlibs .add (stdlib_path )
58+ elif py .executable not in listed_bins :
5259 yield py
53- listed_installs .add (py .executable )
60+ listed_bins .add (py .executable )
You can’t perform that action at this time.
0 commit comments