cpython/PC/VS8.0/build_ssl.py

251 lines
9.0 KiB
Python
Raw Normal View History

# Script for building the _ssl and _hashlib modules for Windows.
# Uses Perl to setup the OpenSSL environment correctly
# and build OpenSSL, then invokes a simple nmake session
# for the actual _ssl.pyd and _hashlib.pyd DLLs.
# THEORETICALLY, you can:
# * Unpack the latest SSL release one level above your main Python source
# directory. It is likely you will already find the zlib library and
# any other external packages there.
# * Install ActivePerl and ensure it is somewhere on your path.
# * Run this script from the PC/VS8.0 directory.
#
# it should configure and build SSL, then build the _ssl and _hashlib
# Python extensions without intervention.
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
# Modified by Christian Heimes
# Now this script supports pre-generated makefiles and assembly files.
# Developers don't need an installation of Perl anymore to build Python. A svn
# checkout from our svn repository is enough.
#
# In Order to create the files in the case of an update you still need Perl.
# Run build_ssl in this order:
# python.exe build_ssl.py Release x64
# python.exe build_ssl.py Release Win32
import os, sys, re, shutil
# Find all "foo.exe" files on the PATH.
def find_all_on_path(filename, extras = None):
entries = os.environ["PATH"].split(os.pathsep)
ret = []
for p in entries:
fname = os.path.abspath(os.path.join(p, filename))
if os.path.isfile(fname) and fname not in ret:
ret.append(fname)
if extras:
for p in extras:
fname = os.path.abspath(os.path.join(p, filename))
if os.path.isfile(fname) and fname not in ret:
ret.append(fname)
return ret
# Find a suitable Perl installation for OpenSSL.
# cygwin perl does *not* work. ActivePerl does.
# Being a Perl dummy, the simplest way I can check is if the "Win32" package
# 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:
continue
return perl
print("Can not find a suitable PERL:")
if perls:
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(" Please install ActivePerl and ensure it appears on your path")
return None
# Locate the best SSL directory given a few roots to look into.
def find_best_ssl_dir(sources):
candidates = []
for s in sources:
try:
# note: do not abspath s; the build will fail if any
# higher up directory name has spaces in it.
fnames = os.listdir(s)
except os.error:
fnames = []
for fname in fnames:
fqn = os.path.join(s, fname)
if os.path.isdir(fqn) and fname.startswith("openssl-"):
candidates.append(fqn)
# Now we have all the candidates, locate the best.
best_parts = []
best_name = None
for c in candidates:
parts = re.split("[.-]", os.path.basename(c))[1:]
# eg - openssl-0.9.7-beta1 - ignore all "beta" or any other qualifiers
if len(parts) >= 4:
continue
if parts > best_parts:
best_parts = parts
best_name = c
if best_name is not None:
print("Found an SSL directory at '%s'" % (best_name,))
else:
print("Could not find an SSL directory in '%s'" % (sources,))
sys.stdout.flush()
return best_name
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
def create_makefile64(makefile, m32):
"""Create and fix makefile for 64bit
Replace 32 with 64bit directories
"""
if not os.path.isfile(m32):
return
with open(m32) as fin:
with open(makefile, 'w') as fout:
for line in fin:
line = line.replace("=tmp32", "=tmp64")
line = line.replace("=out32", "=out64")
line = line.replace("=inc32", "=inc64")
# force 64 bit machine
line = line.replace("MKLIB=lib", "MKLIB=lib /MACHINE:X64")
line = line.replace("LFLAGS=", "LFLAGS=/MACHINE:X64 ")
# don't link against the lib on 64bit systems
line = line.replace("bufferoverflowu.lib", "")
fout.write(line)
os.unlink(m32)
def fix_makefile(makefile):
"""Fix some stuff in all makefiles
"""
if not os.path.isfile(makefile):
return
with open(makefile) as fin:
lines = fin.readlines()
with open(makefile, 'w') as fout:
for line in lines:
if line.startswith("PERL="):
continue
if line.startswith("CP="):
line = "CP=copy\n"
if line.startswith("MKDIR="):
line = "MKDIR=mkdir\n"
if line.startswith("CFLAG="):
line = line.strip()
for algo in ("RC5", "MDC2", "IDEA"):
noalgo = " -DOPENSSL_NO_%s" % algo
if noalgo not in line:
line = line + noalgo
line = line + '\n'
fout.write(line)
def run_configure(configure, do_script):
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
print("perl Configure "+configure)
os.system("perl Configure "+configure)
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
print(do_script)
os.system(do_script)
def main():
build_all = "-a" in sys.argv
if sys.argv[1] == "Release":
debug = False
elif sys.argv[1] == "Debug":
debug = True
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
else:
raise ValueError(str(sys.argv))
if sys.argv[2] == "Win32":
arch = "x86"
configure = "VC-WIN32"
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
do_script = "ms\\do_nasm"
makefile="ms\\nt.mak"
m32 = makefile
elif sys.argv[2] == "x64":
arch="amd64"
configure = "VC-WIN64A"
do_script = "ms\\do_win64a"
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
makefile = "ms\\nt64.mak"
m32 = makefile.replace('64', '')
#os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON"
else:
raise ValueError(str(sys.argv))
make_flags = ""
if build_all:
make_flags = "-a"
# perl should be on the path, but we also look in "\perl" and "c:\\perl"
# as "well known" locations
perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"])
perl = find_working_perl(perls)
if perl:
print("Found a working perl at '%s'" % (perl,))
else:
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
print("No Perl installation was found. Existing Makefiles are used.")
sys.stdout.flush()
# Look for SSL 3 levels up from PC/VS8.0 - ie, same place zlib etc all live.
ssl_dir = find_best_ssl_dir(("..\\..\\..",))
if ssl_dir is None:
sys.exit(1)
old_cd = os.getcwd()
try:
os.chdir(ssl_dir)
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
# rebuild makefile when we do the role over from 32 to 64 build
if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile):
os.unlink(m32)
# If the ssl makefiles do not exist, we invoke Perl to generate them.
# Due to a bug in this script, the makefile sometimes ended up empty
# Force a regeneration if it is.
if not os.path.isfile(makefile) or os.path.getsize(makefile)==0:
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
if perl is None:
print("Perl is required to build the makefiles!")
sys.exit(1)
print("Creating the makefiles...")
sys.stdout.flush()
# Put our working Perl at the front of our path
os.environ["PATH"] = os.path.dirname(perl) + \
os.pathsep + \
os.environ["PATH"]
run_configure(configure, do_script)
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
if debug:
print("OpenSSL debug builds aren't supported.")
#if arch=="x86" and debug:
# # the do_masm script in openssl doesn't generate a debug
# # build makefile so we generate it here:
# os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile)
if arch == "amd64":
create_makefile64(makefile, m32)
fix_makefile(makefile)
shutil.copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
shutil.copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
# Now run make.
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
if arch == "amd64":
rc = os.system("ml64 -c -Foms\\uptable.obj ms\\uptable.asm")
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
if rc:
print("ml64 assembler has failed.")
sys.exit(rc)
shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
#makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
makeCommand = "nmake /nologo -f \"%s\"" % makefile
print("Executing ssl makefiles:", makeCommand)
sys.stdout.flush()
rc = os.system(makeCommand)
if rc:
print("Executing "+makefile+" failed")
print(rc)
sys.exit(rc)
finally:
os.chdir(old_cd)
sys.exit(rc)
if __name__=='__main__':
main()