Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: Source/core/scripts/in_generator.py

Issue 15095002: Use jinja2 for make_runtime_features and make_internal_runtime_flags (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Updated for Eric's suggestions Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gyp/core_derived_sources.gyp ('k') | Source/core/scripts/make_internal_runtime_flags.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/scripts/in_generator.py
diff --git a/Source/core/scripts/in_generator.py b/Source/core/scripts/in_generator.py
index dad625ee354cab4a1ba1b969a087ab4175f0e357..175fb46861ead5b3bf6e55d0e8e541137938f46b 100644
--- a/Source/core/scripts/in_generator.py
+++ b/Source/core/scripts/in_generator.py
@@ -30,6 +30,7 @@ import os.path
import shutil
from in_file import InFile
+import template_expander
class Writer(object):
@@ -84,6 +85,8 @@ class Writer(object):
def _write_file(self, output_dir, generator, file_name):
contents = generator()
+ if type(contents) is dict:
+ contents = template_expander.apply_template(file_name + ".tmpl", contents)
if not contents:
return
path = os.path.join(output_dir, file_name)
« no previous file with comments | « Source/core/core.gyp/core_derived_sources.gyp ('k') | Source/core/scripts/make_internal_runtime_flags.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698