Move windows only requirements out to separate file

This commit is contained in:
Deepanjan Roy 2025-06-10 19:28:58 -07:00
parent d5121f1294
commit 8207d0027e
4 changed files with 15 additions and 4 deletions

View File

@ -113,7 +113,8 @@ cur_path = os.path.dirname(update_py_path)
req_path = os.path.join(cur_path, "current_requirements.txt")
repo_req_path = os.path.join(repo_path, "requirements.txt")
win_only_req_path = os.path.join(cur_path, "current_win_only_requirements.txt")
win_only_repo_req_path = os.path.join(repo_path, "win_only_requirements.txt")
def files_equal(file1, file2):
try:
@ -140,6 +141,14 @@ if not os.path.exists(req_path) or not files_equal(repo_req_path, req_path):
except:
pass
# TODO: Delete this once ComfyUI manager fully supports '; sys_platform == "win32"' syntax
if not os.path.exists(win_only_req_path) or not files_equal(win_only_repo_req_path, win_only_req_path):
import subprocess
try:
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', '-r', win_only_repo_req_path])
shutil.copy(win_only_repo_req_path, win_only_req_path)
except:
pass
stable_update_script = os.path.join(repo_path, ".ci/update_windows/update_comfyui_stable.bat")
stable_update_script_to = os.path.join(cur_path, "update_comfyui_stable.bat")

View File

@ -0,0 +1,3 @@
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --enable-sandbox
pause

View File

@ -28,6 +28,3 @@ soundfile
av>=14.2.0
pydantic~=2.0
pydantic-settings~=2.0
# Windows only dependencies:
pywin32 ; sys_platform == "win32"

View File

@ -0,0 +1,2 @@
# Needed to implement the windows sandbox
pywin32 ; sys_platform == "win32"