File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import re
2222import sys
2323import shutil
24+ import subprocess
2425
2526# Find all "foo.exe" files on the PATH.
2627def find_all_on_path (filename , extras = None ):
@@ -43,22 +44,21 @@ def find_all_on_path(filename, extras = None):
4344# is available.
4445def find_working_perl (perls ):
4546 for perl in perls :
46- fh = os .popen ('"%s" -e "use Win32;"' % perl )
47- fh .read ()
48- rc = fh .close ()
49- if rc :
47+ try :
48+ subprocess .check_output ([perl , "-e" , "use Win32;" ])
49+ except subprocess .CalledProcessError :
5050 continue
51- return perl
52- print ("Can not find a suitable PERL:" )
51+ else :
52+ return perl
53+
5354 if perls :
54- print (" the following perl interpreters were found:" )
55+ print ("The following perl interpreters were found:" )
5556 for p in perls :
5657 print (" " , p )
5758 print (" None of these versions appear suitable for building OpenSSL" )
5859 else :
59- print (" NO perl interpreters were found on this machine at all!" )
60+ print ("NO perl interpreters were found on this machine at all!" )
6061 print (" Please install ActivePerl and ensure it appears on your path" )
61- return None
6262
6363def create_makefile64 (makefile , m32 ):
6464 """Create and fix makefile for 64bit
You can’t perform that action at this time.
0 commit comments