summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-06-23 10:10:25 -0700
committerPat Gavlin <pagavlin@microsoft.com>2016-06-23 10:12:11 -0700
commit8fd7bf03cf8301c5081cb9c887eec91a2e33b194 (patch)
tree3eb996342699bd210e603bb7bbe33d3abe7c22bc /src/scripts
parent50dd30e88897c8ee213fa76fb55624eead12f382 (diff)
downloadcoreclr-8fd7bf03cf8301c5081cb9c887eec91a2e33b194.tar.gz
coreclr-8fd7bf03cf8301c5081cb9c887eec91a2e33b194.tar.bz2
coreclr-8fd7bf03cf8301c5081cb9c887eec91a2e33b194.zip
Make check-definitions compatible with Python 3.
Import and use the Python 3-compatible print_function from __future__.
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/check-definitions.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/scripts/check-definitions.py b/src/scripts/check-definitions.py
index 19d4739afd..ace70786b9 100644
--- a/src/scripts/check-definitions.py
+++ b/src/scripts/check-definitions.py
@@ -23,6 +23,8 @@
#
# (c) 2016 MyungJoo Ham <myungjoo.ham@samsung.com>
+from __future__ import print_function
+
import sys
import re
@@ -122,12 +124,12 @@ def printPotentiallyCritical(arrDefinitions, referencedFilename, arrIgnore):
# MAIN SCRIPT
if len(sys.argv) < 3:
- print "\nUsage:"
- print "$ check-definitions.py [Definition file] [String of definitions]"
- print " Definition file contains the list of cmake (native) compiler definitions"
- print " seperated by line."
- print " String of definitions contains the list of csproj (managed) definitions"
- print " seperated by semicolons."
+ print("\nUsage:")
+ print("$ check-definitions.py [Definition file] [String of definitions]")
+ print(" Definition file contains the list of cmake (native) compiler definitions")
+ print(" seperated by line.")
+ print(" String of definitions contains the list of csproj (managed) definitions")
+ print(" seperated by semicolons.")
sys.exit(-1)
filename = sys.argv[1]
@@ -144,11 +146,11 @@ arrays = getDiff(arrayNative, arrayManaged)
# arrays[0] = array of added in managed
# arrays[1] = array of omitted in managed (added in native)
-print "Potentially Dangerous Compiler Definitions in clrdefinitions.cmake (omitted in native build):"
+print("Potentially Dangerous Compiler Definitions in clrdefinitions.cmake (omitted in native build):")
printPotentiallyCritical(arrays[0], "../../clrdefinitions.cmake", arrayIgnore)
-print "Potentially Dangerous Compiler Definitions in clr.defines.targets (omitted in managed build):"
+print("Potentially Dangerous Compiler Definitions in clr.defines.targets (omitted in managed build):")
printPotentiallyCritical(arrays[1], "../../clr.defines.targets", arrayIgnore)
-print "Definition Check Completed."
+print("Definition Check Completed.")