Index: pylib/gyp/mac_tool.py |
=================================================================== |
--- pylib/gyp/mac_tool.py (revision 1733) |
+++ pylib/gyp/mac_tool.py (working copy) |
@@ -116,13 +116,18 @@ |
else: |
return None |
- def ExecCopyInfoPlist(self, source, dest): |
+ def ExecCopyInfoPlist(self, source, dest, *keys): |
"""Copies the |source| Info.plist to the destination directory |dest|.""" |
# Read the source Info.plist into memory. |
fd = open(source, 'r') |
lines = fd.read() |
fd.close() |
+ # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild). |
+ plist = plistlib.readPlistFromString(lines) |
+ plist = dict(plist.items() + zip(keys[::2], keys[1::2])) |
+ lines = plistlib.writePlistToString(plist) |
+ |
# Go through all the environment variables and replace them as variables in |
# the file. |
IDENT_RE = re.compile('[/\s]') |