Skip to content

Commit

Permalink
Do not override a virtual package is it is already found\
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Aug 3, 2023
1 parent 483be90 commit b4768a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pip/cmsdist_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ def packages(virtual_packages, *args):
if not '==' in line: continue
items = line.strip().split(';')
(pkg, ver) = items[0].strip().split('==',1)
py_pkg = "py3-%s" % pkg
if py_pkg in virtual_packages: continue
matched=True
for item in items[1:]:
m = match("^("+"|".join(list(extra_match.keys()))+")(==|!=)'([^']+)'$", item)
if m:
if m.group(2)=='==' and not match(m.group(3),extra_match[m.group(1)]): matched=False
if m.group(2)=='!=' and match(m.group(3),extra_match[m.group(1)]): matched=False
if matched:
virtual_packages['py3-'+pkg]='%s/package.sh "py3-%s" "%s" "py3"' % (pkg_dir, pkg, ver)
virtual_packages[py_pkg]='%s/package.sh "%s" "%s" "py3"' % (pkg_dir, py_pkg, ver)
return

0 comments on commit b4768a2

Please sign in to comment.