diff --git a/main.py b/main.py index f3b6d02..ae0f0db 100755 --- a/main.py +++ b/main.py @@ -1171,11 +1171,11 @@ def test() -> RouteResponse: def is_split_package(p: Package) -> bool: c = 0 for name, type_ in p.makedepends: - if name == "mingw-w64-x86_64-python3": + if name.startswith("mingw-w64-x86_64-python3"): c += 1 - if name == "mingw-w64-x86_64-python2": + if name.startswith("mingw-w64-x86_64-python2"): c += 1 - if c == 2: + if c >= 2: return True return False @@ -1190,21 +1190,27 @@ def test() -> RouteResponse: todo[rdep.name] = rdep return len(done) - 1 - result = "" - return result + results = sorted(grouped.items(), key=lambda i: (i[1][0], i[0])) + + return render_template( + 'python2.html', results=results) @packages.route('/search') diff --git a/templates/python2.html b/templates/python2.html new file mode 100644 index 0000000..97ce067 --- /dev/null +++ b/templates/python2.html @@ -0,0 +1,32 @@ +{% extends "layout.html" %} +{% block title %}Python 2 Removal TODOs{% endblock %} +{% block inner_content %} + +
+
+

Python 2 Removal TODOs

+
{{ results|length }} packages to go
+
+
+ + + + + + + + + + {% for s, info in results %} + + + + + + {% endfor %} + +
BaseTransitive Reverse DependenciesDual Python Package
{{ s }}{{ info[0] }}{{ '✓' if info[1] else ''}}
+
+
+ +{% endblock %}