File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
src/ducktools/pythonfinder Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -502,14 +502,23 @@ def _implementation_from_uv_dir(
502502 direntry : os .DirEntry ,
503503 finder : DetailFinder | None = None ,
504504) -> PythonInstall | None :
505- python_exe = "python.exe" if sys .platform == "win32" else "bin/python"
506- python_path = os .path .join (direntry , python_exe )
505+ if sys .platform == "win32" :
506+ python_paths = [
507+ os .path .join (direntry , "python.exe" ),
508+ os .path .join (direntry , "bin/python.exe" ), # graalpy
509+ ]
510+ else :
511+ python_paths = [
512+ os .path .join (direntry , "bin/python" )
513+ ]
507514
508515 install : PythonInstall | None = None
509516 finder = DetailFinder () if finder is None else finder
510517
511- if os .path .exists (python_path ):
512- install = finder .get_install_details (python_path , managed_by = "Astral" )
518+ for pth in python_paths :
519+ if os .path .exists (pth ):
520+ install = finder .get_install_details (pth , managed_by = "Astral" )
521+ break
513522
514523 return install
515524
You can’t perform that action at this time.
0 commit comments