tools: properly convert .gypi in install.py
It was breaking during install when .gypi strings had quotes in them. e.g.: 'foo': 'bar="baz"'
This commit is contained in:
parent
d0a545ca38
commit
5e5ffc81fa
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import ast
|
||||
import errno
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
@ -20,9 +20,7 @@ def abspath(*args):
|
||||
|
||||
def load_config():
|
||||
s = open('config.gypi').read()
|
||||
s = re.sub(r'#.*?\n', '', s) # strip comments
|
||||
s = re.sub(r'\'', '"', s) # convert quotes
|
||||
return json.loads(s)
|
||||
return ast.literal_eval(s)
|
||||
|
||||
def try_unlink(path):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user