Skip to contentSkip to conversation

tools: fix python shebangs to use /usr/bin/env

PATCH In review Roger Pau Monne 4 participants 6 messages Aug 2, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: fix python shebangs to use /usr/bin/env

The path to the python binary can be different from /usr/bin/python depending on the distro/OS.

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Christian Lindig <[email protected]>
Cc: David Scott <[email protected]>

---
 tools/include/xen-foreign/mkchecker.py   | 2 +-
 tools/include/xen-foreign/mkheader.py    | 2 +-
 tools/libxl/gentest.py                   | 2 +-
 tools/libxl/gentypes.py                  | 2 +-
 tools/misc/xen-ringwatch                 | 2 +-
 tools/misc/xencov_split                  | 2 +-
 tools/ocaml/libs/xentoollog/genlevels.py | 2 +-
 tools/ocaml/libs/xl/genwrap.py           | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
tools/include/xen-foreign/mkchecker.py +1 -1
index fdad869a91..3f1debf3af 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys;
 from structs import structs, compat_arches;
tools/include/xen-foreign/mkheader.py +1 -1
index 97e0c7a984..812f50ed4e 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, re;
 from structs import unions, structs, defines;
tools/libxl/gentest.py +1 -1
index 989959fc68..fbf577d4b5 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import os
 import sys
tools/libxl/gentypes.py +1 -1
index 88e5c5f30e..a36abfb0aa 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys
 import re
tools/misc/xen-ringwatch +1 -1
index e6f5361231..df7db5c312 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright (C) 2011 Citrix Systems, Inc.
 #
tools/misc/xencov_split +1 -1
index 1f20518b86..5771f6cfc2 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, os.path as path, struct, errno
 from optparse import OptionParser
tools/ocaml/libs/xentoollog/genlevels.py +1 -1
index 8c233c59b1..9dd3048a46 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys
 
tools/ocaml/libs/xl/genwrap.py +1 -1
index 9a65d7334d..75ed4b400d 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys,os
 
Signature · 7 lines
2.18.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw
In reply to Roger Pau Monne
Quoted 2 lines · Roger Pau Monne

The path to the python binary can be different from /usr/bin/python depending on the distro/OS.

Shouldn't we also s/python/python2/ as recommended by
https://www.python.org/dev/peps/pep-0394/ ?

I don't think all those scripts works with python2 and python3.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#4 lore raw
Quoted 8 lines · Anthony PERARD
Quoted 2 lines · Roger Pau Monne

The path to the python binary can be different from /usr/bin/python depending on the distro/OS.

Shouldn't we also s/python/python2/ as recommended by
https://www.python.org/dev/peps/pep-0394/ ?

I don't think all those scripts works with python2 and python3.

Oh, maybe. I think however this should be done in a separate patch.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
In reply to Anthony PERARD
Quoted 8 lines · Anthony PERARD
Quoted 2 lines · Roger Pau Monne

The path to the python binary can be different from /usr/bin/python depending on the distro/OS.

Shouldn't we also s/python/python2/ as recommended by
https://www.python.org/dev/peps/pep-0394/ ?

I don't think all those scripts works with python2 and python3.

This is a good point.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel