]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Close #23963: Fix building with original OpenSSL sources.
authorZachary Ware <zachary.ware@gmail.com>
Thu, 16 Jul 2015 04:33:15 +0000 (23:33 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Thu, 16 Jul 2015 04:33:15 +0000 (23:33 -0500)
Backport of bcf93e3766e8.

PCbuild/build_ssl.py

index dd8bb185a90a98cece0556818568dc8957f5108a..bda9c818e0f83faff8a6b0279f0046e806bf159e 100644 (file)
@@ -24,6 +24,7 @@ from __future__ import with_statement, print_function
 # python.exe build_ssl.py Release x64
 # python.exe build_ssl.py Release Win32
 
+from __future__ import with_statement
 import os, sys, re, shutil
 
 # Find all "foo.exe" files on the PATH.
@@ -98,13 +99,10 @@ def fix_makefile(makefile):
     """
     if not os.path.isfile(makefile):
         return
-    # 2.4 compatibility
     fin = open(makefile)
-    if 1: # with open(makefile) as fin:
+    with open(makefile) as fin:
         lines = fin.readlines()
-        fin.close()
-    fout = open(makefile, 'w')
-    if 1: # with open(makefile, 'w') as fout:
+    with open(makefile, 'w') as fout:
         for line in lines:
             if line.startswith("PERL="):
                 continue
@@ -120,11 +118,10 @@ 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)
-    os.system("perl Configure "+configure)
+    print("perl Configure "+configure+" no-idea no-mdc2")
+    os.system("perl Configure "+configure+" no-idea no-mdc2")
     print(do_script)
     os.system(do_script)