Issue10752 Be more robust when finding a PERL interpreter to build OpenSSL. Initial patch by Gabi Davar
This commit is contained in:
commit
faf4d9ca8b
|
@ -21,6 +21,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import shutil
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
|
||||||
# Find all "foo.exe" files on the PATH.
|
# Find all "foo.exe" files on the PATH.
|
||||||
def find_all_on_path(filename, extras = None):
|
def find_all_on_path(filename, extras = None):
|
||||||
|
@ -43,22 +44,21 @@ def find_all_on_path(filename, extras = None):
|
||||||
# is available.
|
# is available.
|
||||||
def find_working_perl(perls):
|
def find_working_perl(perls):
|
||||||
for perl in perls:
|
for perl in perls:
|
||||||
fh = os.popen('"%s" -e "use Win32;"' % perl)
|
try:
|
||||||
fh.read()
|
subprocess.check_output([perl, "-e", "use Win32;"])
|
||||||
rc = fh.close()
|
except subprocess.CalledProcessError:
|
||||||
if rc:
|
|
||||||
continue
|
continue
|
||||||
return perl
|
else:
|
||||||
print("Can not find a suitable PERL:")
|
return perl
|
||||||
|
|
||||||
if perls:
|
if perls:
|
||||||
print(" the following perl interpreters were found:")
|
print("The following perl interpreters were found:")
|
||||||
for p in perls:
|
for p in perls:
|
||||||
print(" ", p)
|
print(" ", p)
|
||||||
print(" None of these versions appear suitable for building OpenSSL")
|
print(" None of these versions appear suitable for building OpenSSL")
|
||||||
else:
|
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")
|
print(" Please install ActivePerl and ensure it appears on your path")
|
||||||
return None
|
|
||||||
|
|
||||||
def create_makefile64(makefile, m32):
|
def create_makefile64(makefile, m32):
|
||||||
"""Create and fix makefile for 64bit
|
"""Create and fix makefile for 64bit
|
||||||
|
|
Loading…
Reference in New Issue