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 <abologna(a)redhat.com>
---
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 87e81f5c3..a788086a6 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 2f0ad2672..bedec8ae0 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 39499d933..89f7ccb3d 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 bc026bd71..a2b8bef72 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 9c0accea0..b60335e26 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 385d6d1a1..a2fd938c2 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
--
2.13.5