@@ -265,14 +265,14 @@ function _brew_parse_bottle_json {
265265
266266 local JSON; JSON=" ${1:? } " ; shift
267267
268- local JSON_DATA; JSON_DATA=$( python2.7 -c ' if True:
268+ local JSON_DATA; JSON_DATA=$( python3 -c ' if True:
269269 import sys,json; j=json.load(open(sys.argv[1],"rb")); [name]=j.keys(); [pdata]=j.values()
270- print name
271- print pdata["formula"]["pkg_version"]
272- print pdata["bottle"]["rebuild"]
270+ print( name)
271+ print( pdata["formula"]["pkg_version"])
272+ print( pdata["bottle"]["rebuild"])
273273 [(tag_name, tag_dict)]=pdata["bottle"]["tags"].items()
274- print tag_name
275- print tag_dict["sha256"]
274+ print( tag_name)
275+ print( tag_dict["sha256"])
276276 ' " $JSON " )
277277
278278 unset JSON
@@ -292,15 +292,15 @@ function _brew_parse_package_info {
292292 PACKAGE=" ${1:? } " ; shift
293293 OS_CODENAME=" ${1:? } " ; shift
294294
295- local JSON_DATA; JSON_DATA=$( python2.7 -c ' if True:
295+ local JSON_DATA; JSON_DATA=$( python3 -c ' if True:
296296 import sys, json, subprocess; j=json.loads(subprocess.check_output(("brew","info","--json=v1",sys.argv[1])))
297297 data=j[0]
298298 revision=data["revision"]
299299 # in bottle' ' s json, revision is included into version; here, they are separate
300- print data["versions"]["stable"]+("_"+str(revision) if revision else "")
300+ print( data["versions"]["stable"]+("_"+str(revision) if revision else "") )
301301 bottle_data=data["bottle"].get("stable",{"rebuild":"","files":{}})
302- print bottle_data["rebuild"]
303- print bottle_data["files"].get(sys.argv[2],{"sha256":"!?"})["sha256"] #prevent losing trailing blank line to command substitution
302+ print( bottle_data["rebuild"])
303+ print( bottle_data["files"].get(sys.argv[2],{"sha256":"!?"})["sha256"]) #prevent losing trailing blank line to command substitution
304304 ' \
305305 " $PACKAGE " " $OS_CODENAME " ) ; JSON_DATA=" ${JSON_DATA% \!\? } " #! ? can't occur in a hash
306306
0 commit comments