From 3e67e5c9928f8b1e1c5a63def88d53ed1fed12eb Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Mon, 1 May 2017 02:26:56 +0200 Subject: more portable python shebangs (#5816) This is useful on systems like NixOS, where python3 is not in /usr/bin/python3 as well as for people using alternative ways to install python such as virtualenv/pyenv. --- hwdb/acpi-update.py | 2 +- hwdb/parse_hwdb.py | 2 +- man/90-rearrange-path.py | 2 +- src/basic/generate-gperfs.py | 2 +- src/journal-remote/log-generator.py | 2 +- src/resolve/generate-dns_type-gperf.py | 2 +- src/test/generate-sym-test.py | 2 +- test/create-sys-script.py | 4 ++-- test/rule-syntax-check.py | 2 +- test/sys-script.py | 2 +- test/sysv-generator-test.py | 2 +- test/test-exec-deserialization.py | 2 +- tools/catalog-report.py | 2 +- tools/gdb-sd_dump_hashmaps.py | 2 +- tools/make-directive-index.py | 2 +- tools/make-man-index.py | 2 +- tools/make-man-rules.py | 2 +- tools/xml_helper.py | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) diff --git a/hwdb/acpi-update.py b/hwdb/acpi-update.py index 50da531dc6..2c23b057fb 100755 --- a/hwdb/acpi-update.py +++ b/hwdb/acpi-update.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from html.parser import HTMLParser from enum import Enum diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py index e2c65c4be0..adf8a1963e 100755 --- a/hwdb/parse_hwdb.py +++ b/hwdb/parse_hwdb.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. It is distrubuted under the MIT license, see diff --git a/man/90-rearrange-path.py b/man/90-rearrange-path.py index c6ff32210f..7537d5e915 100755 --- a/man/90-rearrange-path.py +++ b/man/90-rearrange-path.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """ diff --git a/src/basic/generate-gperfs.py b/src/basic/generate-gperfs.py index 2e7d8931dd..d4cc9aa45c 100644 --- a/src/basic/generate-gperfs.py +++ b/src/basic/generate-gperfs.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """Generate %-from-name.gperf from %-list.txt """ diff --git a/src/journal-remote/log-generator.py b/src/journal-remote/log-generator.py index 7b434b334e..c2f945bb47 100755 --- a/src/journal-remote/log-generator.py +++ b/src/journal-remote/log-generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys import argparse diff --git a/src/resolve/generate-dns_type-gperf.py b/src/resolve/generate-dns_type-gperf.py index fb36c850af..8a0b43c277 100644 --- a/src/resolve/generate-dns_type-gperf.py +++ b/src/resolve/generate-dns_type-gperf.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """Generate %-from-name.gperf from %-list.txt """ diff --git a/src/test/generate-sym-test.py b/src/test/generate-sym-test.py index a3350c8a81..357cce8e44 100644 --- a/src/test/generate-sym-test.py +++ b/src/test/generate-sym-test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys, re print('#include ') diff --git a/test/create-sys-script.py b/test/create-sys-script.py index 4b7abd24ae..402b4f83ab 100755 --- a/test/create-sys-script.py +++ b/test/create-sys-script.py @@ -1,6 +1,6 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 -OUTFILE_HEADER = """#!/usr/bin/python3 +OUTFILE_HEADER = """#!/usr/bin/env python3 # # create-sys-script.py # diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py index dab01f1d8a..14739df493 100755 --- a/test/rule-syntax-check.py +++ b/test/rule-syntax-check.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # Simple udev rules syntax checker # # (C) 2010 Canonical Ltd. diff --git a/test/sys-script.py b/test/sys-script.py index a9c0046667..6c9ee5ff83 100755 --- a/test/sys-script.py +++ b/test/sys-script.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # # sys-script.py # diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py index 16ea65690a..d116fffe38 100755 --- a/test/sysv-generator-test.py +++ b/test/sysv-generator-test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # # systemd-sysv-generator integration test # diff --git a/test/test-exec-deserialization.py b/test/test-exec-deserialization.py index b974b1c133..39a9e62e15 100755 --- a/test/test-exec-deserialization.py +++ b/test/test-exec-deserialization.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # # Copyright 2017 Michal Sekletar diff --git a/tools/catalog-report.py b/tools/catalog-report.py index b220060cc8..357e498cdc 100644 --- a/tools/catalog-report.py +++ b/tools/catalog-report.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. It is distrubuted under the MIT license, see diff --git a/tools/gdb-sd_dump_hashmaps.py b/tools/gdb-sd_dump_hashmaps.py index d20016e005..62ce8006f5 100644 --- a/tools/gdb-sd_dump_hashmaps.py +++ b/tools/gdb-sd_dump_hashmaps.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index 8ce09ca2fa..1b287997fa 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. diff --git a/tools/make-man-index.py b/tools/make-man-index.py index 50ad9532cd..abc33e7394 100755 --- a/tools/make-man-index.py +++ b/tools/make-man-index.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. diff --git a/tools/make-man-rules.py b/tools/make-man-rules.py index ecb9d2d9b5..e9e39f10af 100644 --- a/tools/make-man-rules.py +++ b/tools/make-man-rules.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. diff --git a/tools/xml_helper.py b/tools/xml_helper.py index b2c036909d..0088be5bd9 100644 --- a/tools/xml_helper.py +++ b/tools/xml_helper.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. -- cgit v1.2.3-54-g00ecf