Skip to content

Commit a3f514c

Browse files
committed
fix: find python exe on Windows for RyeProvider
Signed-off-by: Frost Ming <me@frostming.com>
1 parent 6ffe9ba commit a3f514c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • src/findpython/providers

src/findpython/providers/rye.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from findpython.providers.base import BaseProvider
88
from findpython.python import PythonVersion
9-
from findpython.utils import safe_iter_dir
9+
from findpython.utils import WINDOWS, safe_iter_dir
1010

1111

1212
class RyeProvider(BaseProvider):
@@ -25,6 +25,9 @@ def find_pythons(self) -> t.Iterable[PythonVersion]:
2525
for child in safe_iter_dir(py_root):
2626
if child.is_symlink(): # registered an existing python
2727
continue
28-
python_bin = child / "install/bin/python3"
28+
if WINDOWS:
29+
python_bin = child / "install/python.exe"
30+
else:
31+
python_bin = child / "install/bin/python3"
2932
if python_bin.exists():
3033
yield self.version_maker(python_bin, _interpreter=python_bin)

0 commit comments

Comments
 (0)