@@ -265,14 +265,14 @@ function _brew_parse_bottle_json {
265
265
266
266
local JSON; JSON=" ${1:? } " ; shift
267
267
268
- local JSON_DATA; JSON_DATA=$( python2.7 -c ' if True:
268
+ local JSON_DATA; JSON_DATA=$( python3 -c ' if True:
269
269
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"])
273
273
[(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"])
276
276
' " $JSON " )
277
277
278
278
unset JSON
@@ -292,15 +292,15 @@ function _brew_parse_package_info {
292
292
PACKAGE=" ${1:? } " ; shift
293
293
OS_CODENAME=" ${1:? } " ; shift
294
294
295
- local JSON_DATA; JSON_DATA=$( python2.7 -c ' if True:
295
+ local JSON_DATA; JSON_DATA=$( python3 -c ' if True:
296
296
import sys, json, subprocess; j=json.loads(subprocess.check_output(("brew","info","--json=v1",sys.argv[1])))
297
297
data=j[0]
298
298
revision=data["revision"]
299
299
# 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 "") )
301
301
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
304
304
' \
305
305
" $PACKAGE " " $OS_CODENAME " ) ; JSON_DATA=" ${JSON_DATA% \!\? } " #! ? can't occur in a hash
306
306
0 commit comments