Skip to content

Commit

Permalink
build: Convert ppapi/native_client/src/untrusted/pnacl_support_extens…
Browse files Browse the repository at this point in the history
…ion/BUILD.gn to py3

Bug: 11850
Change-Id: Iefe17308b14099a6c39f58a6079cad335855bed4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2915273
Auto-Submit: Nico Weber <[email protected]>
Commit-Queue: Raymes Khoury <[email protected]>
Reviewed-by: Raymes Khoury <[email protected]>
Cr-Commit-Position: refs/heads/master@{#886109}
  • Loading branch information
nico authored and Chromium LUCI CQ committed May 24, 2021
1 parent 8769b99 commit bd7b677
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/python.gni")
import("//components/nacl/features.gni")

assert(enable_nacl)
Expand All @@ -11,8 +10,7 @@ assert(enable_nacl)
# toolchain and copies the latest PNaCl IRT shim library.
# We could use 'copies', but we want to rename the files in a white-listed
# way first. Thus use an action.
# TODO(crbug.com/1112471): Get this to run cleanly under Python 3.
python2_action("pnacl_support_extension") {
action("pnacl_support_extension") {
script = "pnacl_component_crx_gen.py"
inputs = [
"//native_client/build/package_version/package_version.py",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ def GeneratePnaclInfo(target_dir, abi_version, arch):
# by the NaCl repo, while abi_version is bumped when the NaCl sandbox
# actually changes.
pnacl_version = PnaclPackaging.PnaclToolsRevision()
with open(PnaclPackaging.pnacl_template, 'r') as pnacl_template_fd:
with open(PnaclPackaging.pnacl_template, 'rb') as pnacl_template_fd:
pnacl_template = json.load(pnacl_template_fd)
out_name = J(target_dir, UseWhitelistedChars(PnaclPackaging.pnacl_json,
None))
with open(out_name, 'w') as output_fd:
pnacl_template['pnacl-arch'] = arch
pnacl_template['pnacl-version'] = pnacl_version
json.dump(pnacl_template, output_fd, sort_keys=True, indent=4)
out_name = J(target_dir, UseWhitelistedChars(PnaclPackaging.pnacl_json,
None))
with open(out_name, 'w') as output_fd:
pnacl_template['pnacl-arch'] = arch
pnacl_template['pnacl-version'] = pnacl_version.decode()
json.dump(pnacl_template, output_fd, sort_keys=True, indent=4)


######################################################################
Expand Down

0 comments on commit bd7b677

Please sign in to comment.