From f34fdd5ab606bb5c39ccfd5d0a54211f53af3a60 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Tue, 19 Sep 2017 12:42:09 +0200 Subject: [PATCH] python: Don't hardcode interpreter path This is particularly useful on operating systems that don't ship Python as part of the base system (eg. FreeBSD) while still working just as well as it did before on Linux. While at it, make it explicit that our scripts are only going to work with Python 2, and remove the usage of unbuffered I/O, which as far as I can tell has no effect on the output files. Signed-off-by: Andrea Bolognani --- docs/apibuild.py | 2 +- docs/index.py | 2 +- docs/reformat-news.py | 2 +- src/esx/esx_vi_generator.py | 2 +- src/hyperv/hyperv_wmi_generator.py | 2 +- tests/cputestdata/cpu-cpuid.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/apibuild.py b/docs/apibuild.py index 87e81f5c38..a788086a65 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -1,4 +1,4 @@ -#!/usr/bin/python -u +#!/usr/bin/env python2 # # This is the API builder, it parses the C sources and build the # API formal description in XML. diff --git a/docs/index.py b/docs/index.py index 2f0ad2672c..bedec8ae0c 100755 --- a/docs/index.py +++ b/docs/index.py @@ -1,4 +1,4 @@ -#!/usr/bin/python -u +#!/usr/bin/env python2 # # imports the API description and fills up a database with # name relevance to modules, functions or web pages diff --git a/docs/reformat-news.py b/docs/reformat-news.py index 39499d9330..89f7ccb3dc 100755 --- a/docs/reformat-news.py +++ b/docs/reformat-news.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # reformat-news.py: Reformat the NEWS file properly # diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index bc026bd710..a2b8bef721 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # esx_vi_generator.py: generates most of the SOAP type mapping code diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_generator.py index 9c0accea05..b60335e26b 100755 --- a/src/hyperv/hyperv_wmi_generator.py +++ b/src/hyperv/hyperv_wmi_generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # hyperv_wmi_generator.py: generates most of the WMI type mapping code diff --git a/tests/cputestdata/cpu-cpuid.py b/tests/cputestdata/cpu-cpuid.py index 385d6d1a19..a2fd938c24 100755 --- a/tests/cputestdata/cpu-cpuid.py +++ b/tests/cputestdata/cpu-cpuid.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python2 import sys import json -- GitLab