소스 검색

Force Python 3.x from env in shebang lines (#18285)

* Fix byte/string incompatiblity in Python 3
Calvin Buckley 6 년 전
부모
커밋
524a8298d0

+ 1 - 1
mono/mini/genmdesc.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 # This tool is used to generate the cpu-<ARCH>.h files used by the JIT. The input is the

+ 1 - 1
mono/tests/gc-descriptors/gen-descriptor-tests.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from __future__ import print_function
 from optparse import OptionParser

+ 1 - 1
mono/tests/test_lldb.py

@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import os
 import sys

+ 3 - 3
scripts/ci/babysitter

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Mimics GNU timeout, but has special modes which gather test result data and retry failed tests.
 
@@ -184,12 +184,12 @@ cygwin = platform.system().startswith("CYGWIN")
 
 def outgoingPath(path):
 	if cygwin: # Invoke cygpath and strip newline
-		return subprocess.check_output(["cygpath", "-w", path])[:-1]
+		return subprocess.check_output(["cygpath", "-w", path])[:-1].decode(sys.stdin.encoding)
 	return path
 
 def incomingPath(path):
 	if cygwin:
-		return subprocess.check_output(["cygpath", path])[:-1]
+		return subprocess.check_output(["cygpath", path])[:-1].decode(sys.stdin.encoding)
 	return path
 
 # Some of the things we put in global_env are paths. If we're in cygwin, we have to keep separate

+ 1 - 1
scripts/mono-heapviz

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Generate a heap visualization for SGen from the heap dump written by
 # mono if the MONO_GC_DEBUG is set to something like

+ 1 - 1
scripts/submodules/versions.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import sys
 import json

+ 1 - 1
sdks/wasm/print-table.py

@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 #
 # print-table.py: Print the function table for a webassembly .wast file

+ 1 - 1
tools/sgen/gcpausevis.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 import matplotlib.pyplot as plt
 from matplotlib.dates import DateFormatter, MinuteLocator, SecondLocator
 import numpy as np