From d56be2eb18acb64a3e7f6b97c986da2d479748f2 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 1 Dec 2019 21:07:58 +0100 Subject: [PATCH] python2: handle packages that have py2 in both make and normal deps --- main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 548c637..7688477 100755 --- a/main.py +++ b/main.py @@ -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