allows --index-url in requirements.txt
https://github.com/ltdrdata/ComfyUI-Manager/discussions/918
This commit is contained in:
@@ -23,7 +23,7 @@ sys.path.append(glob_path)
|
||||
import cm_global
|
||||
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 '')
|
||||
|
||||
|
||||
@@ -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:
|
||||
for line in requirements_file:
|
||||
package_name = remap_pip_package(line.strip())
|
||||
|
||||
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('#'):
|
||||
try_install_script(url, repo_path, install_cmd, instant_execution=instant_execution)
|
||||
|
||||
@@ -1215,3 +1221,4 @@ def unzip(model_path):
|
||||
os.remove(model_path)
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user