mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-02-10 05:02:36 +08:00
Fix the situation that requiresments.txt contains ~=
This commit is contained in:
parent
621ca13906
commit
cbc592bc9a
@ -131,7 +131,7 @@ def clear_pip_cache():
|
||||
def is_blacklisted(name):
|
||||
name = name.strip()
|
||||
|
||||
pattern = r'([^<>!=]+)([<>!=]=?)([^ ]*)'
|
||||
pattern = r'([^<>!~=]+)([<>!~=]=?)([^ ]*)'
|
||||
match = re.search(pattern, name)
|
||||
|
||||
if match:
|
||||
@ -146,7 +146,7 @@ def is_blacklisted(name):
|
||||
if match is None:
|
||||
if name in pips:
|
||||
return True
|
||||
elif match.group(2) in ['<=', '==', '<']:
|
||||
elif match.group(2) in ['<=', '==', '~=', '<']:
|
||||
if name in pips:
|
||||
if StrictVersion(pips[name]) >= StrictVersion(match.group(3)):
|
||||
return True
|
||||
@ -160,7 +160,7 @@ def is_installed(name):
|
||||
if name.startswith('#'):
|
||||
return True
|
||||
|
||||
pattern = r'([^<>!=]+)([<>!=]=?)([0-9.a-zA-Z]*)'
|
||||
pattern = r'([^<>!~=]+)([<>!~=]=?)([0-9.a-zA-Z]*)'
|
||||
match = re.search(pattern, name)
|
||||
|
||||
if match:
|
||||
@ -175,7 +175,7 @@ def is_installed(name):
|
||||
if match is None:
|
||||
if name in pips:
|
||||
return True
|
||||
elif match.group(2) in ['<=', '==', '<']:
|
||||
elif match.group(2) in ['<=', '==', '~=', '<']:
|
||||
if name in pips:
|
||||
if StrictVersion(pips[name]) >= StrictVersion(match.group(3)):
|
||||
print(f"[ComfyUI-Manager] skip black listed pip installation: '{name}'")
|
||||
|
||||
@ -394,7 +394,7 @@ def is_installed(name):
|
||||
if name.startswith('#'):
|
||||
return True
|
||||
|
||||
pattern = r'([^<>!=]+)([<>!=]=?)([0-9.a-zA-Z]*)'
|
||||
pattern = r'([^<>!~=]+)([<>!~=]=?)([0-9.a-zA-Z]*)'
|
||||
match = re.search(pattern, name)
|
||||
|
||||
if match:
|
||||
@ -409,7 +409,7 @@ def is_installed(name):
|
||||
if match is None:
|
||||
if name in pips:
|
||||
return True
|
||||
elif match.group(2) in ['<=', '==', '<']:
|
||||
elif match.group(2) in ['<=', '==', '~=', '<']:
|
||||
if name in pips:
|
||||
if StrictVersion(pips[name]) >= StrictVersion(match.group(3)):
|
||||
print(f"[ComfyUI-Manager] skip black listed pip installation: '{name}'")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user