mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-16 01:25:03 +08:00
allows --index-url in requirements.txt
https://github.com/ltdrdata/ComfyUI-Manager/discussions/918
This commit is contained in:
parent
1ede7dfe28
commit
5c70089a62
@ -23,7 +23,7 @@ sys.path.append(glob_path)
|
|||||||
import cm_global
|
import cm_global
|
||||||
from manager_util import *
|
from manager_util import *
|
||||||
|
|
||||||
version = [2, 48, 3]
|
version = [2, 48, 4]
|
||||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||||
|
|
||||||
|
|
||||||
@ -405,8 +405,14 @@ def execute_install_script(url, repo_path, lazy_mode=False, instant_execution=Fa
|
|||||||
with open(requirements_path, "r") as requirements_file:
|
with open(requirements_path, "r") as requirements_file:
|
||||||
for line in requirements_file:
|
for line in requirements_file:
|
||||||
package_name = remap_pip_package(line.strip())
|
package_name = remap_pip_package(line.strip())
|
||||||
|
|
||||||
if package_name and not package_name.startswith('#'):
|
if package_name and not package_name.startswith('#'):
|
||||||
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
|
if '--index-url' in package_name:
|
||||||
|
s = package_name.split('--index-url')
|
||||||
|
install_cmd = [sys.executable, "-m", "pip", "install", s[0].strip(), '--index-url', s[1].strip()]
|
||||||
|
else:
|
||||||
|
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
|
||||||
|
|
||||||
if package_name.strip() != "" and not package_name.startswith('#'):
|
if package_name.strip() != "" and not package_name.startswith('#'):
|
||||||
try_install_script(url, repo_path, install_cmd, instant_execution=instant_execution)
|
try_install_script(url, repo_path, install_cmd, instant_execution=instant_execution)
|
||||||
|
|
||||||
@ -1215,3 +1221,4 @@ def unzip(model_path):
|
|||||||
os.remove(model_path)
|
os.remove(model_path)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -532,7 +532,12 @@ if os.path.exists(restore_snapshot_path):
|
|||||||
package_name = remap_pip_package(line.strip())
|
package_name = remap_pip_package(line.strip())
|
||||||
if package_name and not is_installed(package_name):
|
if package_name and not is_installed(package_name):
|
||||||
if not package_name.startswith('#'):
|
if not package_name.startswith('#'):
|
||||||
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
|
if '--index-url' in package_name:
|
||||||
|
s = package_name.split('--index-url')
|
||||||
|
install_cmd = [sys.executable, "-m", "pip", "install", s[0].strip(), '--index-url', s[1].strip()]
|
||||||
|
else:
|
||||||
|
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
|
||||||
|
|
||||||
this_exit_code += process_wrap(install_cmd, repo_path)
|
this_exit_code += process_wrap(install_cmd, repo_path)
|
||||||
|
|
||||||
if os.path.exists(install_script_path) and f'{repo_path}/install.py' not in processed_install:
|
if os.path.exists(install_script_path) and f'{repo_path}/install.py' not in processed_install:
|
||||||
@ -575,7 +580,12 @@ def execute_lazy_install_script(repo_path, executable):
|
|||||||
for line in requirements_file:
|
for line in requirements_file:
|
||||||
package_name = remap_pip_package(line.strip())
|
package_name = remap_pip_package(line.strip())
|
||||||
if package_name and not is_installed(package_name):
|
if package_name and not is_installed(package_name):
|
||||||
install_cmd = [executable, "-m", "pip", "install", package_name]
|
if '--index-url' in package_name:
|
||||||
|
s = package_name.split('--index-url')
|
||||||
|
install_cmd = [sys.executable, "-m", "pip", "install", s[0].strip(), '--index-url', s[1].strip()]
|
||||||
|
else:
|
||||||
|
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
|
||||||
|
|
||||||
process_wrap(install_cmd, repo_path)
|
process_wrap(install_cmd, repo_path)
|
||||||
|
|
||||||
if os.path.exists(install_script_path) and f'{repo_path}/install.py' not in processed_install:
|
if os.path.exists(install_script_path) and f'{repo_path}/install.py' not in processed_install:
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "comfyui-manager"
|
name = "comfyui-manager"
|
||||||
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
||||||
version = "2.48.3"
|
version = "2.48.4"
|
||||||
license = { file = "LICENSE.txt" }
|
license = { file = "LICENSE.txt" }
|
||||||
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
|
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user