Skip to content

Commit 247b644

Browse files
committed
Issue python#17717: Pull NASM from svn.python.org for OpenSSL build.
1 parent a79d6f4 commit 247b644

4 files changed

Lines changed: 21 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ Build
305305
Windows
306306
-------
307307

308+
- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
309+
svn.python.org to build OpenSSL.
310+
308311
- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
309312

310313

PCbuild/build_ssl.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,17 @@ def main():
170170
if ssl_dir is None:
171171
sys.exit(1)
172172

173+
# add our copy of NASM to PATH. It will be on the same level as openssl
174+
for dir in os.listdir(os.path.join(ssl_dir, os.pardir)):
175+
if dir.startswith('nasm'):
176+
nasm_dir = os.path.join(ssl_dir, os.pardir, dir)
177+
nasm_dir = os.path.abspath(nasm_dir)
178+
os.environ['PATH'] += os.pathsep.join(['', nasm_dir])
179+
break
180+
else:
181+
print('NASM was not found, make sure it is on PATH')
182+
183+
173184
old_cd = os.getcwd()
174185
try:
175186
os.chdir(ssl_dir)

PCbuild/readme.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ _ssl
144144

145145
You must install the NASM assembler from
146146
http://nasm.sf.net
147-
for x86 builds. Put nasm.exe anywhere in your PATH.
147+
for x86 builds. Put nasm.exe anywhere in your PATH. If you use the
148+
Tools\buildbot\external(-amd64).bat method for getting sources, it also
149+
downloads a version of NASM, which the ssl build script will add to PATH.
148150

149151
You can also install ActivePerl from
150152
http://www.activestate.com/activeperl/

Tools/buildbot/external-common.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ if not exist bzip2-1.0.6 (
3737
if exist db-4.4.20 rd /s/q db-4.4.20
3838
if not exist db-4.7.25.0 svn export http://svn.python.org/projects/external/db-4.7.25.0
3939

40+
@rem NASM, for OpenSSL build
41+
@rem if exist nasm-2.11.06 rd /s/q nasm-2.11.06
42+
if not exist nasm-2.11.06 svn export http://svn.python.org/projects/external/nasm-2.11.06
43+
4044
@rem OpenSSL
4145
if exist openssl-1.0.1i rd /s/q openssl-1.0.1i
4246
if not exist openssl-1.0.1j svn export http://svn.python.org/projects/external/openssl-1.0.1j

0 commit comments

Comments
 (0)