diff options
author | Ted Mielczarek <ted@mielczarek.org> | 2016-11-09 15:25:07 -0500 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2016-11-09 15:25:07 -0500 |
commit | 29fbe1bb783bb9cb0629a9e150cfcbd34434218d (patch) | |
tree | e64a94efe2a38bc389cdbffe800b0732c44497a8 /coreconf/shlibsign.py | |
parent | c5060249dfce0e311c03c41c1ae525bcb81e3740 (diff) | |
download | nss-hg-29fbe1bb783bb9cb0629a9e150cfcbd34434218d.tar.gz |
bug 1315231 - fix gyp build on windows. r=franziskus
Diffstat (limited to 'coreconf/shlibsign.py')
-rw-r--r-- | coreconf/shlibsign.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/coreconf/shlibsign.py b/coreconf/shlibsign.py index ce090d2a0..dc40a8c89 100644 --- a/coreconf/shlibsign.py +++ b/coreconf/shlibsign.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -18,10 +18,13 @@ def sign(lib_file): bin_path = os.path.realpath(os.path.join(ld_lib_path, '../bin')) env = os.environ.copy() - env['LD_LIBRARY_PATH'] = env['DYLD_LIBRARY_PATH'] = ld_lib_path + if sys.platform == 'win32': + env['PATH'] = os.pathsep.join((env['PATH'], ld_lib_path)) + else: + env['LD_LIBRARY_PATH'] = env['DYLD_LIBRARY_PATH'] = ld_lib_path dev_null = open(os.devnull, 'wb') - subprocess.Popen([os.path.join(bin_path, 'shlibsign'), '-v', '-i', lib_file], env=env, stdout=dev_null, stderr=dev_null).wait() + subprocess.check_call([os.path.join(bin_path, 'shlibsign'), '-v', '-i', lib_file], env=env, stdout=dev_null, stderr=dev_null) if __name__ == '__main__': main() |