From: Andrea Bolognani Date: Mon, 20 Feb 2023 10:12:44 +0000 (+0100) Subject: syntax-check: Ensure Python is called via env(1) X-Git-Tag: v9.1.0-rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0c1ce43824f049bb3dea056d4302132d47d24e8;p=thirdparty%2Flibvirt.git syntax-check: Ensure Python is called via env(1) The syntax-check rule that calls flake8 on Python scripts expects this to be the case, and it's the best practice anyway. Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 96d322ee04..21f6b311ce 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -561,6 +561,11 @@ sc_require_enum_last_marker: { echo 'enum impl needs _LAST marker on second line' 1>&2; \ exit 1; } || : +sc_prohibit_python_without_env: + @prohibit='#!/usr/.*/py''thon' \ + halt='always call python via /usr/bin/env' \ + $(_sc_search_regexp) + # We're intentionally ignoring a few warnings # # E501: Force breaking lines at < 80 characters results in