Skip to content

Commit

Permalink
update py executable finding
Browse files Browse the repository at this point in the history
  • Loading branch information
fred913 committed Aug 27, 2024
1 parent d23446b commit 0d1e95f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion FluentPython/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from dataclasses import dataclass
from pathlib import Path

from genericpath import isfile
from loguru import logger
from pydantic import BaseModel

Expand Down Expand Up @@ -37,7 +38,14 @@ def envdir(self):

@property
def py_executable(self):
return self.envdir / 'Scripts' / 'python'
res = self.envdir / 'Scripts' / 'python'

if res.exists():
return res

res = self.envdir / 'bin' / 'python'
assert res.exists()
return res


class _GlobalConfig:
Expand Down

0 comments on commit 0d1e95f

Please sign in to comment.