[Python-3000-checkins] r57555 - python/branches/py3k/PCbuild/build_ssl.py

thomas.heller python-3000-checkins at python.org
Mon Aug 27 11:42:33 CEST 2007


Author: thomas.heller
Date: Mon Aug 27 11:42:33 2007
New Revision: 57555

Modified:
   python/branches/py3k/PCbuild/build_ssl.py
Log:
Port the build_ssl.py script to Python 3.

Modified: python/branches/py3k/PCbuild/build_ssl.py
==============================================================================
--- python/branches/py3k/PCbuild/build_ssl.py	(original)
+++ python/branches/py3k/PCbuild/build_ssl.py	Mon Aug 27 11:42:33 2007
@@ -42,16 +42,16 @@
         if rc:
             continue
         return perl
-    print "Can not find a suitable PERL:"
+    print("Can not find a suitable PERL:")
     if perls:
-        print " the following perl interpreters were found:"
+        print(" the following perl interpreters were found:")
         for p in perls:
-            print " ", p
-        print " None of these versions appear suitable for building OpenSSL"
+            print(" ", p)
+        print(" None of these versions appear suitable for building OpenSSL")
     else:
-        print " NO perl interpreters were found on this machine at all!"
-    print " Please install ActivePerl and ensure it appears on your path"
-    print "The Python SSL module was not built"
+        print(" NO perl interpreters were found on this machine at all!")
+    print(" Please install ActivePerl and ensure it appears on your path")
+    print("The Python SSL module was not built")
     return None
 
 # Locate the best SSL directory given a few roots to look into.
@@ -80,9 +80,9 @@
             best_parts = parts
             best_name = c
     if best_name is not None:
-        print "Found an SSL directory at '%s'" % (best_name,)
+        print("Found an SSL directory at '%s'" % (best_name,))
     else:
-        print "Could not find an SSL directory in '%s'" % (sources,)
+        print("Could not find an SSL directory in '%s'" % (sources,))
     sys.stdout.flush()
     return best_name
 
@@ -128,7 +128,7 @@
     if perl is None:
         sys.exit(1)
 
-    print "Found a working perl at '%s'" % (perl,)
+    print("Found a working perl at '%s'" % (perl,))
     sys.stdout.flush()
     # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live.
     ssl_dir = find_best_ssl_dir(("..\\..",))
@@ -142,7 +142,7 @@
         # Due to a bug in this script, the makefile sometimes ended up empty
         # Force a regeneration if it is.
         if not os.path.isfile(makefile) or os.path.getsize(makefile)==0:
-            print "Creating the makefiles..."
+            print("Creating the makefiles...")
             sys.stdout.flush()
             # Put our working Perl at the front of our path
             os.environ["PATH"] = os.path.dirname(perl) + \
@@ -156,12 +156,12 @@
 
         # Now run make.
         makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
-        print "Executing ssl makefiles:", makeCommand
+        print("Executing ssl makefiles:", makeCommand)
         sys.stdout.flush()
         rc = os.system(makeCommand)
         if rc:
-            print "Executing "+makefile+" failed"
-            print rc
+            print("Executing "+makefile+" failed")
+            print(rc)
             sys.exit(rc)
     finally:
         os.chdir(old_cd)
@@ -172,7 +172,7 @@
     if arch in ('amd64', 'ia64'):
         defs = defs + " EXTRA_CFLAGS=/GS- EXTRA_LIBS=bufferoverflowU.lib"
     makeCommand = 'nmake /nologo -f _ssl.mak ' + defs + " " + make_flags
-    print "Executing:", makeCommand
+    print("Executing:", makeCommand)
     sys.stdout.flush()
     rc = os.system(makeCommand)
     sys.exit(rc)


More information about the Python-3000-checkins mailing list