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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
|
From a348e0162343f7d46443eb1fd2bcf0698460a780 Mon Sep 17 00:00:00 2001
From: "Hongzhi.Song" <hongzhi.song@windriver.com>
Date: Wed, 23 Jan 2019 04:28:28 -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>
Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
---
build-aux/check-structs | 2 +-
build-aux/dpdkstrip.py | 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/sodepends.py | 2 +-
build-aux/soexpand.py | 2 +-
build-aux/text2c | 2 +-
build-aux/xml2nroff | 2 +-
ovn/utilities/ovn-detrace.in | 2 +-
ovn/utilities/ovn-docker-overlay-driver.in | 2 +-
ovn/utilities/ovn-docker-underlay-driver.in | 2 +-
ovsdb/dot2pic | 2 +-
ovsdb/ovsdb-doc | 2 +-
ovsdb/ovsdb-dot.in | 2 +-
ovsdb/ovsdb-idlc.in | 2 +-
python/build/soutil.py | 2 +-
tests/flowgen.py | 2 +-
tests/ovsdb-monitor-sort.py | 2 +-
tests/uuidfilt.py | 2 +-
utilities/bugtool/ovs-bugtool.in | 2 +-
utilities/ovs-check-dead-ifs.in | 2 +-
utilities/ovs-dpctl-top.in | 2 +-
utilities/ovs-l3ping.in | 2 +-
utilities/ovs-parse-backtrace.in | 2 +-
utilities/ovs-pcap.in | 2 +-
utilities/ovs-tcpdump.in | 2 +-
utilities/ovs-tcpundump.in | 2 +-
utilities/ovs-test.in | 2 +-
utilities/ovs-vlan-test.in | 2 +-
vtep/ovs-vtep.in | 2 +-
32 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/build-aux/check-structs b/build-aux/check-structs
index 37ffa06..eb44c91 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/dpdkstrip.py b/build-aux/dpdkstrip.py
index 48c7f06..b8b8ba9 100755
--- a/build-aux/dpdkstrip.py
+++ b/build-aux/dpdkstrip.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (c) 2017 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
index 64de0f3..f6bca0b 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 getopt
import sys
diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
index 6f64efd..c410fd4 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 3592594..2fc8317 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 a67e870..92c4bda 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/sodepends.py b/build-aux/sodepends.py
index 90cfaa0..45812bc 100755
--- a/build-aux/sodepends.py
+++ b/build-aux/sodepends.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (c) 2008, 2011, 2017 Nicira, Inc.
#
diff --git a/build-aux/soexpand.py b/build-aux/soexpand.py
index 53ca640..00adcf4 100755
--- a/build-aux/soexpand.py
+++ b/build-aux/soexpand.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (c) 2008, 2017 Nicira, Inc.
#
diff --git a/build-aux/text2c b/build-aux/text2c
index cb1f256..ab7910e 100755
--- a/build-aux/text2c
+++ b/build-aux/text2c
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
import re
import sys
diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff
index bd4e879..db45c56 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-detrace.in b/ovn/utilities/ovn-detrace.in
index c842adc..9e95183 100755
--- a/ovn/utilities/ovn-detrace.in
+++ b/ovn/utilities/ovn-detrace.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Copyright (c) 2017 eBay Inc.
#
diff --git a/ovn/utilities/ovn-docker-overlay-driver.in b/ovn/utilities/ovn-docker-overlay-driver.in
index 65edfcd..895426b 100755
--- a/ovn/utilities/ovn-docker-overlay-driver.in
+++ b/ovn/utilities/ovn-docker-overlay-driver.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
# Copyright (C) 2015 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/ovn/utilities/ovn-docker-underlay-driver.in b/ovn/utilities/ovn-docker-underlay-driver.in
index d91ce9f..e0c8db6 100755
--- a/ovn/utilities/ovn-docker-underlay-driver.in
+++ b/ovn/utilities/ovn-docker-underlay-driver.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
# Copyright (C) 2015 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/ovsdb/dot2pic b/ovsdb/dot2pic
index de67261..174e723 100755
--- a/ovsdb/dot2pic
+++ b/ovsdb/dot2pic
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (c) 2009, 2010, 2011, 2013, 2017 Nicira, Inc.
#
diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
index 406c293..d55c6e6 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 8eea617..38ba33a 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 40fef39..84c63a6 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
from __future__ import print_function
import getopt
diff --git a/python/build/soutil.py b/python/build/soutil.py
index b8027af..8f52803 100755
--- a/python/build/soutil.py
+++ b/python/build/soutil.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (c) 2008, 2017 Nicira, Inc.
#
diff --git a/tests/flowgen.py b/tests/flowgen.py
index 976fe7a..7ef32d1 100755
--- a/tests/flowgen.py
+++ b/tests/flowgen.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (c) 2009, 2010, 2011, 2012, 2015, 2017 Nicira, Inc.
#
diff --git a/tests/ovsdb-monitor-sort.py b/tests/ovsdb-monitor-sort.py
index 7d368a7..ab4c38c 100755
--- a/tests/ovsdb-monitor-sort.py
+++ b/tests/ovsdb-monitor-sort.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Breaks lines read from stdin into groups using blank lines as
# group separators, then sorts lines within the groups for
diff --git a/tests/uuidfilt.py b/tests/uuidfilt.py
index ea72812..f1a9aff 100755
--- a/tests/uuidfilt.py
+++ b/tests/uuidfilt.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import re
import sys
diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in
index 288c34f..b5a6906 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
diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in
index ac54f6c..13d86b3 100755
--- a/utilities/ovs-check-dead-ifs.in
+++ b/utilities/ovs-check-dead-ifs.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
import os
import re
diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in
index 7f0f1f8..ece707a 100755
--- a/utilities/ovs-dpctl-top.in
+++ b/utilities/ovs-dpctl-top.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Copyright (c) 2013 Nicira, Inc.
#
diff --git a/utilities/ovs-l3ping.in b/utilities/ovs-l3ping.in
index 1b07972..9852699 100644
--- a/utilities/ovs-l3ping.in
+++ b/utilities/ovs-l3ping.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in
index 350cbd9..1960fb4 100755
--- a/utilities/ovs-parse-backtrace.in
+++ b/utilities/ovs-parse-backtrace.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Copyright (c) 2012 Nicira, Inc.
#
diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in
index 7bebc07..b4e5ca8 100755
--- a/utilities/ovs-pcap.in
+++ b/utilities/ovs-pcap.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Copyright (c) 2010 Nicira, Inc.
#
diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index 22f249f..ff2a51e 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Copyright (c) 2016 Red Hat, Inc.
#
diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in
index c298700..0d8b8da 100755
--- a/utilities/ovs-tcpundump.in
+++ b/utilities/ovs-tcpundump.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Copyright (c) 2010 Nicira, Inc.
#
diff --git a/utilities/ovs-test.in b/utilities/ovs-test.in
index fb1f9ad..4dba169 100644
--- a/utilities/ovs-test.in
+++ b/utilities/ovs-test.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in
index e229498..5b70118 100755
--- a/utilities/ovs-vlan-test.in
+++ b/utilities/ovs-vlan-test.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
#
# Copyright (c) 2010 Nicira, Inc.
#
diff --git a/vtep/ovs-vtep.in b/vtep/ovs-vtep.in
index 3383870..42f98db 100755
--- a/vtep/ovs-vtep.in
+++ b/vtep/ovs-vtep.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#!/usr/bin/env @PYTHON@
# Copyright (C) 2013 Nicira, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
--
2.8.1
|