From 7fd7fc67f7f438f5f0ce59be860687f66648c688 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:52:58 +0900 Subject: [PATCH] add -I to uv BAD_FLAGS --- modules/uv_hook.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/uv_hook.py b/modules/uv_hook.py index 21cb2fb93..1e27e9b78 100644 --- a/modules/uv_hook.py +++ b/modules/uv_hook.py @@ -4,6 +4,8 @@ import shlex import subprocess from functools import wraps +BAD_FLAGS = ("--prefer-binary", '-I', '--ignore-installed') + def patch(): if hasattr(subprocess, "__original_run"): @@ -35,9 +37,8 @@ def patch(): if "pip" not in command: return subprocess.__original_run([*command, *_args], **_kwargs) - cmd = command[command.index("pip") + 1 :] + cmd = command[command.index("pip") + 1:] - BAD_FLAGS = ("--prefer-binary",) cmd = [arg for arg in cmd if arg not in BAD_FLAGS] modified_command = ["uv", "pip", *cmd]