Add version constraint support for git URL requirements (#23737)
This commit is contained in:
parent
c56255fa7f
commit
f83bcda3d5
@ -458,7 +458,11 @@ def check_requirements(requirements=ROOT.parent / "requirements.txt", exclude=()
|
||||
continue
|
||||
|
||||
if not satisfied:
|
||||
pkgs.append(candidates[0])
|
||||
pkg = candidates[0]
|
||||
if "git+" in pkg: # strip version constraints from git URLs for pip
|
||||
url, sep, marker = pkg.partition(";")
|
||||
pkg = re.sub(r"[<>!=~]+.*$", "", url) + sep + marker
|
||||
pkgs.append(pkg)
|
||||
|
||||
@Retry(times=2, delay=1)
|
||||
def attempt_install(packages, commands, use_uv):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user