blob: 08ef03c0e2a184a40b53c904e2363334c4d6a4f0 [file] [log] [blame]
use the host python when running the h2py code, and have that search sysroot
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -57,6 +57,7 @@ except KeyError:
pass
def main():
+ sysroot = os.getenv('SYSROOT', '')
global filedict
opts, args = getopt.getopt(sys.argv[1:], 'i:')
for o, a in opts:
@@ -70,7 +71,7 @@ def main():
process(sys.stdin.buffer, sys.stdout.buffer)
else:
filename = filename.encode()
- with open(filename, 'rb') as fp:
+ with open(sysroot + filename, 'rb') as fp:
outfile = os.path.basename(filename)
i = outfile.rfind(b'.')
if i > 0: outfile = outfile[:i]