From 83ea094886d7eba07dd29b778bf1a6738bcab625 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 6 Sep 2024 18:36:13 +0200 Subject: [PATCH] Report installing custom python versions as a warning... --- package_linter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package_linter.py b/package_linter.py index 1f61f06..e5d29eb 100755 --- a/package_linter.py +++ b/package_linter.py @@ -745,6 +745,16 @@ def disclaimer_wording_or_placeholder(app): "The doc/ folder seems to still contain some dummy, placeholder messages in the .md markdown files. If those files are not useful in the context of your app, simply remove them." ) + @test() + def custom_python_version(app): + + cmd = f"grep -q -IhEr '^[^#]*install_python' '{app.path}/scripts/'" + if os.system(cmd) == 0: + yield Warning( + "It looks like this app installs a custom version of Python which is heavily discouraged, both because it takes a shitload amount of time to compile Python locally, and because it is likely to create complication later once the system gets upgraded to newer Debian versions..." + ) + + @test() def change_url_script(app):