summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2016-11-07 19:29:07 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2016-11-07 19:29:07 (GMT)
commit14269d91d14f9d6ddf79a44d9879bd796a86e2f3 (patch)
treea66d167dbcee2556f4f4f92bdbe6b03e9cab588e /PC
parentb26a7d18efa46b2c534d717f67bcfd7e5b9be8e8 (diff)
downloadcpython-14269d91d14f9d6ddf79a44d9879bd796a86e2f3.zip
cpython-14269d91d14f9d6ddf79a44d9879bd796a86e2f3.tar.gz
cpython-14269d91d14f9d6ddf79a44d9879bd796a86e2f3.tar.bz2
Fix PC/VS9.0/build_ssl.py for recent OpenSSL
Diffstat (limited to 'PC')
-rw-r--r--PC/VS9.0/build_ssl.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/PC/VS9.0/build_ssl.py b/PC/VS9.0/build_ssl.py
index 95e0e78..524b4bc 100644
--- a/PC/VS9.0/build_ssl.py
+++ b/PC/VS9.0/build_ssl.py
@@ -26,6 +26,7 @@ from __future__ import with_statement, print_function
from __future__ import with_statement
import os, sys, re, shutil
+import subprocess
# Find all "foo.exe" files on the PATH.
def find_all_on_path(filename, extras = None):
@@ -48,12 +49,12 @@ def find_all_on_path(filename, extras = None):
# is available.
def find_working_perl(perls):
for perl in perls:
- fh = os.popen('"%s" -e "use Win32;"' % perl)
- fh.read()
- rc = fh.close()
- if rc:
+ try:
+ subprocess.check_output([perl, "-e", "use win32;"])
+ except Subprocess.CalledProcessError:
continue
- return perl
+ else:
+ return perl
print("Can not find a suitable PERL:")
if perls:
print(" the following perl interpreters were found:")
@@ -163,6 +164,8 @@ def main():
perl = find_working_perl(perls)
if perl:
print("Found a working perl at '%s'" % (perl,))
+ # Set PERL for the makefile to find it
+ os.environ["PERL"] = perl
else:
print("No Perl installation was found. Existing Makefiles are used.")
sys.stdout.flush()