summaryrefslogtreecommitdiff
path: root/tools/gyp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gyp')
-rw-r--r--tools/gyp/pylib/gyp/input.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py
index a046a15cc1..cdf33fd946 100644
--- a/tools/gyp/pylib/gyp/input.py
+++ b/tools/gyp/pylib/gyp/input.py
@@ -881,6 +881,7 @@ def ExpandVariables(input, phase, variables, build_file):
oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.
if build_file_dir: # build_file_dir may be None (see above).
os.chdir(build_file_dir)
+ sys.path.append(os.getcwd())
try:
parsed_contents = shlex.split(contents)
@@ -891,6 +892,7 @@ def ExpandVariables(input, phase, variables, build_file):
"module (%s): %s" % (parsed_contents[0], e))
replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
finally:
+ sys.path.pop()
os.chdir(oldwd)
assert replacement != None
elif command_string: