python-cryptography: bump to version 1.7.2
[buildroot-gz.git] / package / pseudo / 0002-Fix-missing-parentheses-at-print.patch
blobb023fcf8319a64f3b285e23499ed46ad75bbc8ad
1 From 6488a68ca715d8e18f899e536effceb548ed136e Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Ga=C3=ABl=20PORTAY?= <gael.portay@savoirfairelinux.com>
3 Date: Fri, 4 Nov 2016 12:23:25 -0400
4 Subject: [PATCH 2/3] Fix missing parentheses at print
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
9 CC="cc -pipe -std=gnu99 -Wall -W -Wextra -fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE -DPSEUDO_PREFIX='"/usr/local"' -DPSEUDO_SUFFIX='""' -DPSEUDO_BINDIR='"bin"' -DPSEUDO_LIBDIR='"lib64"' -DPSEUDO_LOCALSTATEDIR='"var/pseudo"' -DPSEUDO_VERSION='"1.8.1"' -DUSE_MEMORY_DB -DPSEUDO_PASSWD_FALLBACK='""' -DPSEUDO_XATTR_SUPPORT -O2 -g " ./makewrappers "xattr=true"
10 File "./makewrappers", line 459
11 print port
13 SyntaxError: Missing parentheses in call to 'print'
15 Signed-off-by: Gaƫl PORTAY <gael.portay@savoirfairelinux.com>
16 ---
17 maketables | 12 ++++++------
18 makewrappers | 32 ++++++++++++++++----------------
19 templatefile.py | 8 ++++----
20 3 files changed, 26 insertions(+), 26 deletions(-)
22 diff --git a/maketables b/maketables
23 index b32312e..0726485 100755
24 --- a/maketables
25 +++ b/maketables
26 @@ -73,7 +73,7 @@ class DataType:
27 for col in columns:
28 indexed = False
29 if col.startswith("FLAGS"):
30 - print "Flags: set for %s" % self.name
31 + print("Flags: set for %s" % self.name)
32 self.flags = True
33 continue
34 if col.startswith("INDEXED "):
35 @@ -248,7 +248,7 @@ def main():
36 template_file.emit('header')
37 templates.append(template_file)
38 except IOError:
39 - print "Invalid or malformed template %s. Aborting." % path
40 + print("Invalid or malformed template %s. Aborting." % path)
41 exit(1)
43 for filename in sys.argv[1:]:
44 @@ -256,15 +256,15 @@ def main():
45 sys.stdout.write("%s: " % filename)
46 datatype = DataType(filename)
47 datatypes.append(datatype)
48 - print datatype.__repr__()
49 - print ""
50 + print(datatype.__repr__())
51 + print("")
53 - print "Writing datatypes...",
54 + print("Writing datatypes...")
55 for datatype in datatypes:
56 # populate various tables and files with each datatype
57 for template_file in templates:
58 template_file.emit('body', datatype)
59 - print "done. Cleaning up."
60 + print("done. Cleaning up.")
62 for template_file in templates:
63 # clean up files
64 diff --git a/makewrappers b/makewrappers
65 index 303e2cc..bac856b 100755
66 --- a/makewrappers
67 +++ b/makewrappers
68 @@ -456,7 +456,7 @@ additional ports to include.
69 self.name = port
70 self.subports = []
71 self.preports = []
72 - print port
73 + print(port)
75 if os.path.exists(self.portfile("pseudo_wrappers.c")):
76 self.wrappers = self.portfile("pseudo_wrappers.c")
77 @@ -504,17 +504,17 @@ additional ports to include.
78 prefuncs = pre.functions()
79 for name in prefuncs.keys():
80 if name in mergedfuncs:
81 - print "Warning: %s from %s overriding %s" % (name, pre.name, mergedfuncs[name].port)
82 + print("Warning: %s from %s overriding %s" % (name, pre.name, mergedfuncs[name].port))
83 mergedfuncs[name] = prefuncs[name]
84 for name in self.funcs.keys():
85 if name in mergedfuncs:
86 - print "Warning: %s from %s overriding %s" % (name, self.name, mergedfuncs[name].port)
87 + print("Warning: %s from %s overriding %s" % (name, self.name, mergedfuncs[name].port))
88 mergedfuncs[name] = self.funcs[name]
89 for sub in self.subports:
90 subfuncs = sub.functions()
91 for name in subfuncs.keys():
92 if name in mergedfuncs:
93 - print "Warning: %s from %s overriding %s" % (name, sub.name, mergedfuncs[name].port)
94 + print("Warning: %s from %s overriding %s" % (name, sub.name, mergedfuncs[name].port))
95 mergedfuncs[name] = subfuncs[name]
96 return mergedfuncs
98 @@ -576,11 +576,11 @@ def process_wrapfuncs(port):
99 func.directory = directory
100 funcs[func.name] = func
101 sys.stdout.write(".")
102 - except Exception, e:
103 - print "Parsing failed:", e
104 + except Exception(e):
105 + print("Parsing failed:", e)
106 exit(1)
107 funclist.close()
108 - print ""
109 + print("")
110 return funcs
112 def main(argv):
113 @@ -599,35 +599,35 @@ def main(argv):
115 for path in glob.glob('templates/*'):
116 try:
117 - print "Considering template: " + path
118 + print("Considering template: " + path)
119 source = TemplateFile(path)
120 if source.name.endswith('.c') or source.name.endswith('.h'):
121 source.emit('copyright')
122 source.emit('header')
123 sources.append(source)
124 except IOError:
125 - print "Invalid or malformed template %s. Aborting." % path
126 + print("Invalid or malformed template %s. Aborting." % path)
127 exit(1)
129 try:
130 port = Port('common', sources)
132 except KeyError:
133 - print "Unknown uname -s result: '%s'." % uname_s
134 - print "Known system types are:"
135 - print "%-20s %-10s %s" % ("uname -s", "port name", "description")
136 + print("Unknown uname -s result: '%s'." % uname_s)
137 + print("Known system types are:")
138 + print("%-20s %-10s %s" % ("uname -s", "port name", "description"))
139 for key in host_ports:
140 - print "%-20s %-10s %s" % (key, host_ports[key],
141 - host_descrs[host_ports[key]])
142 + print("%-20s %-10s %s" % (key, host_ports[key],
143 + host_descrs[host_ports[key]]))
145 # the per-function stuff
146 - print "Writing functions...",
147 + print("Writing functions...")
148 all_funcs = port.functions()
149 for name in sorted(all_funcs.keys()):
150 # populate various tables and files with each function
151 for source in sources:
152 source.emit('body', all_funcs[name])
153 - print "done. Cleaning up."
154 + print("done. Cleaning up.")
156 for source in sources:
157 # clean up files
158 diff --git a/templatefile.py b/templatefile.py
159 index 2789b22..abf9a2c 100644
160 --- a/templatefile.py
161 +++ b/templatefile.py
162 @@ -79,13 +79,13 @@ class TemplateFile:
163 return
164 path = Template(self.path).safe_substitute(item)
165 if os.path.exists(path):
166 - # print "We don't overwrite existing files."
167 + # print("We don't overwrite existing files.")
168 return
169 self.file = open(path, 'w')
170 if not self.file:
171 - print "Couldn't open '%s' (expanded from %s), " \
172 + print("Couldn't open '%s' (expanded from %s), " \
173 "not emitting '%s'." % \
174 - (path, self.path, template)
175 + (path, self.path, template))
176 return
178 def emit(self, template, item=None):
179 @@ -103,7 +103,7 @@ class TemplateFile:
180 self.file.write(templ.safe_substitute(item))
181 self.file.write("\n")
182 else:
183 - print "Warning: Unknown template '%s'." % template
184 + print("Warning: Unknown template '%s'." % template)
186 if self.file_per_item:
187 if self.file:
189 2.10.1