From 975ff2fb6e70efe5462384071c6d27c03391f592 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 11 Sep 2019 09:22:31 +1000 Subject: [PATCH] tools: change python invocations to use /usr/bin/env python3 Let's be consistent here Signed-off-by: Peter Hutterer --- .gitlab-ci.yml | 14 ++++++++++++++ tools/libinput-record-verify-yaml.py | 2 +- tools/test-tool-option-parsing.py | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02a12ffe..4484e894 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -462,6 +462,20 @@ fedora:30@valgrind: MESON_TEST_ARGS: '--suite=valgrind --no-suite=hardware --setup=valgrind' before_script: - dnf install -y valgrind + +# Python checks, only run on Fedora + +fedora:30@usr-bin-env-python: + extends: .fedora-build@template + variables: + FEDORA_VERSION: 30 + script: + - | + if git grep -l '^#!/usr/bin/python'; then + echo "Use '/usr/bin/env python3' in the above files"; + /bin/false + fi + # # Ubuntu # diff --git a/tools/libinput-record-verify-yaml.py b/tools/libinput-record-verify-yaml.py index 2920ef05..4b40aba9 100755 --- a/tools/libinput-record-verify-yaml.py +++ b/tools/libinput-record-verify-yaml.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # vim: set expandtab shiftwidth=4: # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # diff --git a/tools/test-tool-option-parsing.py b/tools/test-tool-option-parsing.py index d5fbbd53..a6868afa 100755 --- a/tools/test-tool-option-parsing.py +++ b/tools/test-tool-option-parsing.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # vim: set expandtab shiftwidth=4: # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ #