diff options
author | Tim Golden <mail@timgolden.me.uk> | 2014-05-09 17:19:13 (GMT) |
---|---|---|
committer | Tim Golden <mail@timgolden.me.uk> | 2014-05-09 17:19:13 (GMT) |
commit | 877013fe14d6e20ab917e64badec3c8aab3fac59 (patch) | |
tree | ce7739eb8fbc30647a42eb4ee66f81c53538a871 /PCbuild | |
parent | 55c2364561c3107e7ab86b2fc4af0deab7b56cc2 (diff) | |
parent | 9c18fcf16141558616ecf201e5eaac0e8f899a44 (diff) | |
download | cpython-877013fe14d6e20ab917e64badec3c8aab3fac59.zip cpython-877013fe14d6e20ab917e64badec3c8aab3fac59.tar.gz cpython-877013fe14d6e20ab917e64badec3c8aab3fac59.tar.bz2 |
Merge
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/build_ssl.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py index 5a7a89e..dc51781 100644 --- a/PCbuild/build_ssl.py +++ b/PCbuild/build_ssl.py @@ -24,6 +24,7 @@ # python.exe build_ssl.py Release Win32 import os, sys, re, shutil +import subprocess # Find all "foo.exe" files on the PATH. def find_all_on_path(filename, extras = None): @@ -46,22 +47,21 @@ 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 - print("Can not find a suitable PERL:") + else: + return 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") else: - print(" NO perl interpreters were found on this machine at all!") + print("NO perl interpreters were found on this machine at all!") print(" Please install ActivePerl and ensure it appears on your path") - return None # Fetch SSL directory from VC properties def get_ssl_dir(): |