summary refs log tree commit diff
path: root/pkgs/development/python-modules/llm/001-disable-install-uninstall-commands.patch
blob: cef7fba13343e4cf2ed4818efe0f237a1efd6d16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/llm/cli.py b/llm/cli.py
index af37feb..18b078a 100644
--- a/llm/cli.py
+++ b/llm/cli.py
@@ -1014,18 +1014,7 @@ def templates_path():
 )
 def install(packages, upgrade, editable, force_reinstall, no_cache_dir):
     """Install packages from PyPI into the same environment as LLM"""
-    args = ["pip", "install"]
-    if upgrade:
-        args += ["--upgrade"]
-    if editable:
-        args += ["--editable", editable]
-    if force_reinstall:
-        args += ["--force-reinstall"]
-    if no_cache_dir:
-        args += ["--no-cache-dir"]
-    args += list(packages)
-    sys.argv = args
-    run_module("pip", run_name="__main__")
+    click.echo("Install command has been disabled for Nix. If you want to install extra llm plugins, use llm.withPlugins([]) expression.")
 
 
 @cli.command()
@@ -1033,8 +1022,7 @@ def install(packages, upgrade, editable, force_reinstall, no_cache_dir):
 @click.option("-y", "--yes", is_flag=True, help="Don't ask for confirmation")
 def uninstall(packages, yes):
     """Uninstall Python packages from the LLM environment"""
-    sys.argv = ["pip", "uninstall"] + list(packages) + (["-y"] if yes else [])
-    run_module("pip", run_name="__main__")
+    click.echo("Uninstall command has been disabled for Nix. If you want to uninstall extra llm plugins, just remove them from llm.withPlugins([]) list expression.")
 
 
 @cli.command()