Skip to content

Commit 0db846f

Browse files
refacktargos
authored andcommitted
tools: refactor js2c.py for maximal Python3 compatibility
* add explicit `--target` argument to enable succinct gyp declaration * simplify js2c semantics PR-URL: #25518 Reviewed-By: Christian Clauss <[email protected]>
1 parent a66b391 commit 0db846f

File tree

2 files changed

+171
-130
lines changed

2 files changed

+171
-130
lines changed

node.gyp

+4-3
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,8 @@
859859
'action_name': 'node_js2c',
860860
'process_outputs_as_sources': 1,
861861
'inputs': [
862+
# Put the code first so it's a dependency and can be used for invocation.
863+
'tools/js2c.py',
862864
'<@(library_files)',
863865
'config.gypi',
864866
'tools/js2c_macros/check_macros.py'
@@ -878,9 +880,8 @@
878880
}]
879881
],
880882
'action': [
881-
'python', 'tools/js2c.py',
882-
'<@(_outputs)',
883-
'<@(_inputs)',
883+
'python', '<@(_inputs)',
884+
'--target', '<@(_outputs)',
884885
],
885886
},
886887
],

0 commit comments

Comments
 (0)