Reland "Set GN's script_executable to "python3""
This is a reland of commit 6f0d2bf494
Includes a fix for iOS codesigning script to be python3 compatible.
Original change's description:
> Set GN's script_executable to "python3"
>
> In some environments, GN would end up running scripts with python2.
> This change requires that python3 be in the path, but is the safest
> way to guarantee that all scripts are run correctly.
>
> Change-Id: Ifc2601ff9c9f3705ac7f1057a26a87a61211ff67
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528337
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I785909f3c7d51d6fd1c90114d01f114be76981f2
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-iOS
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528441
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
d3d0ee3dc2
commit
1843bee81d
1
.gn
1
.gn
@ -1,4 +1,5 @@
|
||||
buildconfig = "//gn/BUILDCONFIG.gn"
|
||||
script_executable = "python3"
|
||||
|
||||
default_args = {
|
||||
angle_standalone = false
|
||||
|
@ -42,7 +42,7 @@ else:
|
||||
'Provisioning Profiles',
|
||||
'*.mobileprovision')):
|
||||
if re.search(r'''<key>Name</key>
|
||||
\t<string>''' + profile + r'''</string>''', open(p).read(), re.MULTILINE):
|
||||
\t<string>''' + profile + r'''</string>''', open(p, 'rb').read().decode("utf-8", "ignore"), re.MULTILINE):
|
||||
mobileprovision = p
|
||||
if mobileprovision is None:
|
||||
print("Provisioning profile matching '" + profile + "' not found.")
|
||||
@ -56,7 +56,7 @@ shutil.copy(mobileprovision,
|
||||
# Extract the appliciation identitifer prefix from the .mobileprovision.
|
||||
m = re.search(r'''<key>ApplicationIdentifierPrefix</key>
|
||||
\t<array>
|
||||
\t<string>(.*)</string>''', open(mobileprovision).read(), re.MULTILINE)
|
||||
\t<string>(.*)</string>''', open(mobileprovision, 'rb').read().decode("utf-8", "ignore"), re.MULTILINE)
|
||||
prefix = m.group(1)
|
||||
|
||||
app, _ = os.path.splitext(os.path.basename(pkg))
|
||||
@ -70,7 +70,7 @@ with tempfile.NamedTemporaryFile() as f:
|
||||
<key>get-task-allow</key> <true/>
|
||||
</dict>
|
||||
</plist>
|
||||
'''.format(prefix=prefix, app=app))
|
||||
'''.format(prefix=prefix, app=app).encode("utf-8"))
|
||||
f.flush()
|
||||
|
||||
subprocess.check_call(['codesign',
|
||||
|
Loading…
Reference in New Issue
Block a user