[Python-checkins] cpython (2.7): Issue #17717: Pull NASM from svn.python.org for OpenSSL build.

zach.ware python-checkins at python.org
Sun Nov 2 00:43:49 CET 2014


https://hg.python.org/cpython/rev/28d18fdc52c4
changeset:   93338:28d18fdc52c4
branch:      2.7
parent:      93332:ea7b64406396
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Sat Nov 01 17:11:08 2014 -0500
summary:
  Issue #17717: Pull NASM from svn.python.org for OpenSSL build.

files:
  Misc/NEWS                          |   3 +++
  PCbuild/build_ssl.py               |  11 +++++++++++
  PCbuild/readme.txt                 |   4 +++-
  Tools/buildbot/external-common.bat |   4 ++++
  4 files changed, 21 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -305,6 +305,9 @@
 Windows
 -------
 
+- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
+  svn.python.org to build OpenSSL.
+
 - Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
 
 
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py
--- a/PCbuild/build_ssl.py
+++ b/PCbuild/build_ssl.py
@@ -170,6 +170,17 @@
     if ssl_dir is None:
         sys.exit(1)
 
+    # add our copy of NASM to PATH.  It will be on the same level as openssl
+    for dir in os.listdir(os.path.join(ssl_dir, os.pardir)):
+        if dir.startswith('nasm'):
+            nasm_dir = os.path.join(ssl_dir, os.pardir, dir)
+            nasm_dir = os.path.abspath(nasm_dir)
+            os.environ['PATH'] += os.pathsep.join(['', nasm_dir])
+            break
+    else:
+        print('NASM was not found, make sure it is on PATH')
+
+
     old_cd = os.getcwd()
     try:
         os.chdir(ssl_dir)
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt
--- a/PCbuild/readme.txt
+++ b/PCbuild/readme.txt
@@ -144,7 +144,9 @@
 
     You must install the NASM assembler from
         http://nasm.sf.net
-    for x86 builds.  Put nasm.exe anywhere in your PATH.
+    for x86 builds.  Put nasm.exe anywhere in your PATH.  If you use the
+    Tools\buildbot\external(-amd64).bat method for getting sources, it also
+    downloads a version of NASM, which the ssl build script will add to PATH.
 
     You can also install ActivePerl from
         http://www.activestate.com/activeperl/
diff --git a/Tools/buildbot/external-common.bat b/Tools/buildbot/external-common.bat
--- a/Tools/buildbot/external-common.bat
+++ b/Tools/buildbot/external-common.bat
@@ -37,6 +37,10 @@
 if exist db-4.4.20 rd /s/q db-4.4.20
 if not exist db-4.7.25.0 svn export http://svn.python.org/projects/external/db-4.7.25.0
 
+ at rem NASM, for OpenSSL build
+ at rem if exist nasm-2.11.06 rd /s/q nasm-2.11.06
+if not exist nasm-2.11.06 svn export http://svn.python.org/projects/external/nasm-2.11.06
+
 @rem OpenSSL
 if exist openssl-1.0.1i rd /s/q openssl-1.0.1i
 if not exist openssl-1.0.1j svn export http://svn.python.org/projects/external/openssl-1.0.1j

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list