add -I to uv BAD_FLAGS

This commit is contained in:
w-e-w 2025-02-28 23:52:58 +09:00
parent 9d1accfea0
commit 7fd7fc67f7
No known key found for this signature in database
GPG key ID: 52CFE43196F6280E

View file

@ -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]