summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch
blob: 4441c1ea70adedd980c382f1ac8d67e2a450ac58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
From 04ad1c3d9f47cfdf4ad9b5d685e953ec094326ff Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Fri, 13 Jan 2017 16:12:55 -0500
Subject: [PATCH] python: make remaining scripts use /usr/bin/env

Unfortunately there is no concept of a host python vs. target python
to facilitate cross compilation. There is only one PYTHON variable and
this is used during building and in the header of python scripts after
installation. The best approach for cross compilation is to thus to
ensure python is in the path and avoid passing a path as part of
PYTHON. To make this function smoothly all installed scripts should
make use of /usr/bin/env to increase the chances of finding python.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
 build-aux/check-structs                  | 2 +-
 build-aux/extract-ofp-actions            | 2 +-
 build-aux/extract-ofp-errors             | 2 +-
 build-aux/extract-ofp-fields             | 2 +-
 build-aux/extract-ofp-msgs               | 2 +-
 build-aux/xml2nroff                      | 2 +-
 ovn/utilities/ovn-docker-overlay-driver  | 2 +-
 ovn/utilities/ovn-docker-underlay-driver | 2 +-
 ovsdb/ovsdb-doc                          | 2 +-
 ovsdb/ovsdb-dot.in                       | 2 +-
 ovsdb/ovsdb-idlc.in                      | 2 +-
 utilities/bugtool/ovs-bugtool.in         | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/build-aux/check-structs b/build-aux/check-structs
index f79f235..c7b8730 100755
--- a/build-aux/check-structs
+++ b/build-aux/check-structs
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 
 import os.path
 import sys
diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
index 184447b..92ea18d 100755
--- a/build-aux/extract-ofp-actions
+++ b/build-aux/extract-ofp-actions
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 
 import sys
 import os.path
diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
index 9642593..11e6de7 100755
--- a/build-aux/extract-ofp-errors
+++ b/build-aux/extract-ofp-errors
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 
 import sys
 import os.path
diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
index 498b887..5d6bcec 100755
--- a/build-aux/extract-ofp-fields
+++ b/build-aux/extract-ofp-fields
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 
 import getopt
 import sys
diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs
index 1813638..e9e3c25 100755
--- a/build-aux/extract-ofp-msgs
+++ b/build-aux/extract-ofp-msgs
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 
 import sys
 import os.path
diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff
index bd4e879..9d81503 100755
--- a/build-aux/xml2nroff
+++ b/build-aux/xml2nroff
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 
 # Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
 #
diff --git a/ovn/utilities/ovn-docker-overlay-driver b/ovn/utilities/ovn-docker-overlay-driver
index 52de3db..c90f02b 100755
--- a/ovn/utilities/ovn-docker-overlay-driver
+++ b/ovn/utilities/ovn-docker-overlay-driver
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 # Copyright (C) 2015 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/ovn/utilities/ovn-docker-underlay-driver b/ovn/utilities/ovn-docker-underlay-driver
index 2c9c4b6..89b804c 100755
--- a/ovn/utilities/ovn-docker-underlay-driver
+++ b/ovn/utilities/ovn-docker-underlay-driver
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 # Copyright (C) 2015 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
index 5cf26ee..f76f4bd 100755
--- a/ovsdb/ovsdb-doc
+++ b/ovsdb/ovsdb-doc
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
 
 # Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
 #
diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in
index 134ce22..893c408 100755
--- a/ovsdb/ovsdb-dot.in
+++ b/ovsdb/ovsdb-dot.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! /usr/bin/env @PYTHON@
 
 from datetime import date
 import ovs.db.error
diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index 721ab50..bfbcf23 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! /usr/bin/env @PYTHON@
 
 import getopt
 import os
diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in
index 963c50c..c84d7c2 100755
--- a/utilities/bugtool/ovs-bugtool.in
+++ b/utilities/bugtool/ovs-bugtool.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! /usr/bin/env @PYTHON@
 
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of version 2.1 of the GNU Lesser General Public
-- 
2.7.4