File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424# python.exe build_ssl.py Release Win32
2525
2626import os , sys , re , shutil
27+ import subprocess
2728
2829# Find all "foo.exe" files on the PATH.
2930def find_all_on_path (filename , extras = None ):
@@ -46,22 +47,21 @@ def find_all_on_path(filename, extras = None):
4647# is available.
4748def find_working_perl (perls ):
4849 for perl in perls :
49- fh = os .popen ('"%s" -e "use Win32;"' % perl )
50- fh .read ()
51- rc = fh .close ()
52- if rc :
50+ try :
51+ subprocess .check_output ([perl , "-e" , "use Win32;" ])
52+ except subprocess .CalledProcessError :
5353 continue
54- return perl
55- print ("Can not find a suitable PERL:" )
54+ else :
55+ return perl
56+
5657 if perls :
57- print (" the following perl interpreters were found:" )
58+ print ("The following perl interpreters were found:" )
5859 for p in perls :
5960 print (" " , p )
6061 print (" None of these versions appear suitable for building OpenSSL" )
6162 else :
62- print (" NO perl interpreters were found on this machine at all!" )
63+ print ("NO perl interpreters were found on this machine at all!" )
6364 print (" Please install ActivePerl and ensure it appears on your path" )
64- return None
6565
6666# Fetch SSL directory from VC properties
6767def get_ssl_dir ():
You can’t perform that action at this time.
0 commit comments