Skip to content

Commit

Permalink
Fix: try to search base_exc_prefix for scripts folder
Browse files Browse the repository at this point in the history
  • Loading branch information
eight04 committed Nov 20, 2024
1 parent 8ed30ee commit 6f29117
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vpip/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re
import shutil
import sysconfig
import sys
import venv
from contextlib import contextmanager
from pathlib import Path
Expand Down Expand Up @@ -37,10 +38,12 @@ def __call__(self) -> Iterable[Path]:
folders = set([
Path("~/.local/bin").expanduser(),
Path("~/bin").expanduser(),
Path(sysconfig.get_path("scripts"))
Path(sysconfig.get_path("scripts")),
Path(sys.base_exec_prefix) / "Scripts"
])
cache = []
paths = [Path(p) for p in os.environ["PATH"].split(os.pathsep)]
# breakpoint()
for path in paths:
if path in folders:
yield path
Expand Down

0 comments on commit 6f29117

Please sign in to comment.