Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eceebd3

Browse filesBrowse files
cclaussBridgeAR
authored andcommitted
tools: fix Python 3 issues in gyp/generator/make.py
PR-URL: #29214 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent aeafb91 commit eceebd3
Copy full SHA for eceebd3

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Filter options
  • tools/gyp/pylib/gyp/generator
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Collapse file

‎tools/gyp/pylib/gyp/generator/make.py‎

Copy file name to clipboardExpand all lines: tools/gyp/pylib/gyp/generator/make.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs,
929929
'%s%s'
930930
% (name, cd_action, command))
931931
self.WriteLn()
932-
outputs = map(self.Absolutify, outputs)
932+
outputs = [self.Absolutify(o) for o in outputs]
933933
# The makefile rules are all relative to the top dir, but the gyp actions
934934
# are defined relative to their containing dir. This replaces the obj
935935
# variable for the action rule with an absolute version so that the output
@@ -1019,7 +1019,7 @@ def WriteRules(self, rules, extra_sources, extra_outputs,
10191019
outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs]
10201020
inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs]
10211021

1022-
outputs = map(self.Absolutify, outputs)
1022+
outputs = [self.Absolutify(o) for o in outputs]
10231023
all_outputs += outputs
10241024
# Only write the 'obj' and 'builddir' rules for the "primary" output
10251025
# (:1); it's superfluous for the "extra outputs", and this avoids
@@ -1725,8 +1725,8 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
17251725
output is just a name to run the rule
17261726
command: (optional) command name to generate unambiguous labels
17271727
"""
1728-
outputs = map(QuoteSpaces, outputs)
1729-
inputs = map(QuoteSpaces, inputs)
1728+
outputs = [QuoteSpaces(o) for o in outputs]
1729+
inputs = [QuoteSpaces(i) for i in inputs]
17301730

17311731
if comment:
17321732
self.WriteLn('# ' + comment)
@@ -1755,7 +1755,7 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
17551755
# - The multi-output rule will have an do-nothing recipe.
17561756

17571757
# Hash the target name to avoid generating overlong filenames.
1758-
cmddigest = hashlib.sha1(command if command else self.target).hexdigest()
1758+
cmddigest = hashlib.sha1((command or self.target).encode("utf-8")).hexdigest()
17591759
intermediate = "%s.intermediate" % (cmddigest)
17601760
self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
17611761
self.WriteLn('\t%s' % '@:')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.