linux: Don't set CXX to clang when building node modules.

This commit is contained in:
Cheng Zhao 2014-08-09 09:22:06 +08:00
parent ca522f06d3
commit 9035ffff55
3 changed files with 26 additions and 6 deletions

View file

@ -29,6 +29,18 @@ def scoped_cwd(path):
os.chdir(cwd)
@contextlib.contextmanager
def scoped_env(key, value):
origin = ''
if key in os.environ:
origin = os.environ[key]
os.environ[key] = value
try:
yield
finally:
os.environ[key] = origin
def download(text, url, path):
safe_mkdir(os.path.dirname(path))
with open(path, 'wb') as local_file: