Skip to content

Commit

Permalink
tools: refactor js2c.py for maximal Python3 compatibility
Browse files Browse the repository at this point in the history
* add explicit `--target` argument to enable succinct gyp declaration
* simplify js2c semantics

PR-URL: #25518
Reviewed-By: Christian Clauss <cclauss@me.com>
  • Loading branch information
refack authored and targos committed May 20, 2019
1 parent a66b391 commit 0db846f
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 130 deletions.
7 changes: 4 additions & 3 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@
'action_name': 'node_js2c',
'process_outputs_as_sources': 1,
'inputs': [
# Put the code first so it's a dependency and can be used for invocation.
'tools/js2c.py',
'<@(library_files)',
'config.gypi',
'tools/js2c_macros/check_macros.py'
Expand All @@ -878,9 +880,8 @@
}]
],
'action': [
'python', 'tools/js2c.py',
'<@(_outputs)',
'<@(_inputs)',
'python', '<@(_inputs)',
'--target', '<@(_outputs)',
],
},
],
Expand Down
Loading

0 comments on commit 0db846f

Please sign in to comment.