From 3aa297570b792c99550560c37b97823da538dc86 Mon Sep 17 00:00:00 2001 From: yangbill Date: Fri, 16 Apr 2021 16:00:28 +0800 Subject: Change par file generate rules. Make sure the shebang of the par file is consistent with the main python script rather than use /usr/bin/python arbitrarily. Bug: 185399398 Bug: 185094069 Test: m atest ; atest-dev --help m atest-py2 ; atest-py2-dev --help Change-Id: Ice4590b3d173e6d11e608c2ca29b297df0dc4089 --- python/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/builder.go') diff --git a/python/builder.go b/python/builder.go index dc2d1f127..7d7239c55 100644 --- a/python/builder.go +++ b/python/builder.go @@ -45,7 +45,7 @@ var ( hostPar = pctx.AndroidStaticRule("hostPar", blueprint.RuleParams{ Command: `sed -e 's/%interpreter%/$interp/g' -e 's/%main%/$main/g' $template > $stub && ` + - `echo "#!/usr/bin/env python" >${out}.prefix &&` + + `echo "#!/usr/bin/env $interp" >${out}.prefix &&` + `$mergeParCmd -p --prefix ${out}.prefix -pm $stub $out $srcsZips && ` + `chmod +x $out && (rm -f $stub; rm -f ${out}.prefix)`, CommandDeps: []string{"$mergeParCmd"}, -- cgit v1.2.3-59-g8ed1b