Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: fix GYP ninja generator for Python 3 #29416

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tools/gyp/pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def WriteCollapsedDependencies(self, name, targets, order_only=None):

Uses a stamp file if necessary."""

assert targets == filter(None, targets), targets
assert targets == list(filter(None, targets)), targets
if len(targets) == 0:
assert not order_only
return None
Expand Down Expand Up @@ -429,8 +429,8 @@ def WriteSpec(self, spec, config_name, generator_flags):
compile_depends.append(target.PreCompileInput())
if target.uses_cpp:
self.target.uses_cpp = True
actions_depends = filter(None, actions_depends)
compile_depends = filter(None, compile_depends)
actions_depends = list(filter(None, actions_depends))
compile_depends = list(filter(None, compile_depends))
actions_depends = self.WriteCollapsedDependencies('actions_depends',
actions_depends)
compile_depends = self.WriteCollapsedDependencies('compile_depends',
Expand Down Expand Up @@ -2378,6 +2378,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,

qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
toolset)
qualified_target_for_hash = qualified_target_for_hash.encode('utf-8')
hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()

base_path = os.path.dirname(build_file)
Expand Down