python2: handle packages that have py2 in both make and normal deps

This commit is contained in:
Christoph Reiter
2019-12-01 21:07:58 +01:00
parent 33cf829325
commit d56be2eb18

View File

@@ -1169,13 +1169,14 @@ def removals() -> RouteResponse:
def python2() -> RouteResponse:
def is_split_package(p: Package) -> bool:
c = 0
py2 = False
py3 = False
for name, type_ in (p.makedepends + p.depends):
if name.startswith("mingw-w64-x86_64-python3"):
c += 1
py3 = True
if name.startswith("mingw-w64-x86_64-python2"):
c += 1
if c >= 2:
py2 = True
if py2 and py3:
return True
return False