]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
python: Don't hardcode interpreter path
authorAndrea Bolognani <abologna@redhat.com>
Tue, 19 Sep 2017 10:42:09 +0000 (12:42 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 19 Sep 2017 14:04:53 +0000 (16:04 +0200)
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@redhat.com>
docs/apibuild.py
docs/index.py
docs/reformat-news.py
src/esx/esx_vi_generator.py
src/hyperv/hyperv_wmi_generator.py
tests/cputestdata/cpu-cpuid.py

index 87e81f5c3873a7032e99a07ff005780f0b2669d5..a788086a654de942fa9fc547d96e5c825e399159 100755 (executable)
@@ -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.
index 2f0ad2672ca273cccb36d01554d624cbd4b8ed56..bedec8ae0c8486e1f2fd254f71592b8115714b85 100755 (executable)
@@ -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
index 39499d9330a1f60f518fa19be7e11d0e5154525c..89f7ccb3dc6d8a1d243167bee7ae5976cd817882 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 # reformat-news.py: Reformat the NEWS file properly
 #
index bc026bd710fdf764a5e7905cdb366d5ee61a42a7..a2b8bef721a8defcb1c30afd0920b351b7d2943c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 #
 # esx_vi_generator.py: generates most of the SOAP type mapping code
index 9c0accea05bdea88cb7aa86b15ff5c0227b39016..b60335e26b51dfd3eb382fb312fdbcc4104826c3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 #
 # hyperv_wmi_generator.py: generates most of the WMI type mapping code
index 385d6d1a19d8456d102874b3898e61904252cda5..a2fd938c24c234b0279d07c2b83dce5d699c145f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python2
 
 import sys
 import json