diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2014-03-17 15:57:38 -0500 |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2014-03-17 15:57:38 -0500 |
commit | 6373ba5199fe706f174aed482d77e2bb4b29e2f0 (patch) | |
tree | a0e0196e138f1197e1d7dc8e5e013307dbea4f50 /PC/python35gen.py | |
parent | 42867c73c9794f8f4968abef0572fd950748559c (diff) | |
download | cpython-git-6373ba5199fe706f174aed482d77e2bb4b29e2f0.tar.gz |
Bump Windows build to 3.5
Diffstat (limited to 'PC/python35gen.py')
-rw-r--r-- | PC/python35gen.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/PC/python35gen.py b/PC/python35gen.py new file mode 100644 index 0000000000..609cb9d22f --- /dev/null +++ b/PC/python35gen.py @@ -0,0 +1,26 @@ +# Generate python35stub.def out of python3.def +# The regular import library cannot be used, +# since it doesn't provide the right symbols for +# data forwarding +out = open("python35stub.def", "w") +out.write('LIBRARY "python35"\n') +out.write('EXPORTS\n') + +inp = open("python3.def") +line = inp.readline() +while line.strip().startswith(';'): + line = inp.readline() +line = inp.readline() # LIBRARY +assert line.strip()=='EXPORTS' + +for line in inp: + # SYM1=python35.SYM2[ DATA] + head, tail = line.split('.') + if 'DATA' in tail: + symbol, tail = tail.split(' ') + else: + symbol = tail.strip() + out.write(symbol+'\n') + +inp.close() +out.close() |