linux: Don't set CXX to clang when building node modules.
This commit is contained in:
parent
ca522f06d3
commit
9035ffff55
3 changed files with 26 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue