Search in the user scheme scripts directory last in find_uv_bin

This commit is contained in:
Zanie Blue 2025-06-21 13:40:42 -05:00
parent 47eb449394
commit 1137c6cc91

View file

@ -18,14 +18,14 @@ def find_uv_bin() -> str:
sysconfig.get_path("scripts"),
# The scripts directory for the base prefix
sysconfig.get_path("scripts", vars={"base": sys.base_prefix}),
# The user scheme scripts directory, e.g., `~/.local/bin`
sysconfig.get_path("scripts", scheme=_user_scheme()),
# Above the package root, e.g., from `pip install --prefix`
# with module path `<prefix>/lib/python3.13/site-packages/uv`
_join(_parents(_module_path(), 4), "bin"),
# Adjacent to the package root, e.g., from `pip install --target`
# with module path `<target>/uv`
_join(_parents(_module_path(), 1), "bin"),
# The user scheme scripts directory, e.g., `~/.local/bin`
sysconfig.get_path("scripts", scheme=_user_scheme()),
]
seen = set()