From 6e27f7daa2c3718c0c385a49c8273ea2f4a538c8 Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Tue, 27 Feb 2024 12:06:30 -0800 Subject: [PATCH] Avoid installing dependencies on every run It looks like the `install.py` is imported from `__init__.py`, which means every time this plugin is loaded, it'll trigger a bunch of `pip install`s. --- install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.py b/install.py index 2c14be2..59ce66b 100644 --- a/install.py +++ b/install.py @@ -14,4 +14,5 @@ def ensure_package(): cmds = build_pip_install_cmds(['-r', 'requirements.txt']) subprocess.run(cmds, cwd=custom_nodes_path) -ensure_package() \ No newline at end of file +if __name__ == "__main__": + ensure_package()