diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-02-29 18:54:45 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-02-29 18:54:45 +0000 |
commit | 9e0513591dd283931ac2e28e50e8f8482f68f4f4 (patch) | |
tree | 9cb6287cd053a5c848162376d95ff2ef89887a34 /PCbuild/build_ssl.py | |
parent | 3fd0c442dc0208225f6d7249e45fbec9721bc1e5 (diff) | |
download | cpython-git-9e0513591dd283931ac2e28e50e8f8482f68f4f4.tar.gz |
Port build_ssl.py to 2.4; support HOST_PYTHON variable
Diffstat (limited to 'PCbuild/build_ssl.py')
-rw-r--r-- | PCbuild/build_ssl.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py index 2ccceec080..f24c9068ae 100644 --- a/PCbuild/build_ssl.py +++ b/PCbuild/build_ssl.py @@ -102,8 +102,11 @@ def create_makefile64(makefile, m32): """ if not os.path.isfile(m32): return - with open(m32) as fin: - with open(makefile, 'w') as fout: + # 2.4 compatibility + fin = open(m32) + if 1: # with open(m32) as fin: + fout = open(makefile, 'w') + if 1: # with open(makefile, 'w') as fout: for line in fin: line = line.replace("=tmp32", "=tmp64") line = line.replace("=out32", "=out64") @@ -121,9 +124,13 @@ def fix_makefile(makefile): """ if not os.path.isfile(makefile): return - with open(makefile) as fin: + # 2.4 compatibility + fin = open(makefile) + if 1: # with open(makefile) as fin: lines = fin.readlines() - with open(makefile, 'w') as fout: + fin.close() + fout = open(makefile, 'w') + if 1: # with open(makefile, 'w') as fout: for line in lines: if line.startswith("PERL="): continue @@ -139,6 +146,7 @@ def fix_makefile(makefile): line = line + noalgo line = line + '\n' fout.write(line) + fout.close() def run_configure(configure, do_script): print("perl Configure "+configure) |