summaryrefslogtreecommitdiff
path: root/databases/foundationdb/files/patch-build_csprojtom4.py
blob: 570fbd352aaa1ed4922e477c545d17e0d6116172 (plain) (blame)
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
--- build/csprojtom4.py.orig	2018-08-14 14:24:41 UTC
+++ build/csprojtom4.py
@@ -1,5 +1,5 @@
 #!/usr/local/bin/python2.7
-#
+#i
 # csprojtom4.py
 #
 # This source file is part of the FoundationDB open source project
@@ -23,8 +23,8 @@
 import sys
 
 if len(sys.argv) != 2:
-    print """Usage:
-  %s [input]""" % sys.argv[0]
+    print("""Usage:
+  %s [input]""" % sys.argv[0])
     sys.exit()
 
 csproj = sys.argv[1]
@@ -34,20 +34,20 @@ from xml.dom.minidom import parse
 try:
     dom = parse(csproj)
 except:
-    print "ERROR: Unable to open CSProj file %s" % csproj
+    print("ERROR: Unable to open CSProj file %s" % csproj)
     sys.exit()
 
 outputType = dom.getElementsByTagName("OutputType")[0].childNodes[0].data
 assemblyName = dom.getElementsByTagName("AssemblyName")[0].childNodes[0].data
 
 if outputType == "Exe":
-    print "define(`GENTARGET', `bin/%s.exe')dnl" % assemblyName
-    print "define(`GENOUTPUTTYPE', `exe')dnl"
+    print("define(`GENTARGET', `bin/%s.exe')dnl" % assemblyName)
+    print("define(`GENOUTPUTTYPE', `exe')dnl")
 elif outputType == "Library":
-    print "define(`GENTARGET', `bin/%s.dll')dnl" % assemblyName
-    print "define(`GENOUTPUTTYPE', `library')dnl"
+    print("define(`GENTARGET', `bin/%s.dll')dnl" % assemblyName)
+    print("define(`GENOUTPUTTYPE', `library')dnl")
 else:
-    print "ERROR: Unable to determine output type"
+    print("ERROR: Unable to determine output type")
     sys.exit()
 
 sources = [node.getAttribute("Include").replace('\\', '/') for node in
@@ -55,5 +55,5 @@ sources = [node.getAttribute("Include").
 assemblies = [node.getAttribute("Include") for node in
               dom.getElementsByTagName("Reference")]
 
-print "define(`GENSOURCES', `%s')dnl" % ' '.join(sources)
-print "define(`GENREFERENCES', `%s')dnl" % ','.join(assemblies)
+print("define(`GENSOURCES', `%s')dnl" % ' '.join(sources))
+print("define(`GENREFERENCES', `%s')dnl" % ','.join(assemblies))