Skip to content

Commit e470d09

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

5 files changed

Lines changed: 24 additions & 7 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,9 @@ Tools/Demos
13831383
Windows
13841384
-------
13851385

1386+
- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
1387+
svn.python.org to build OpenSSL.
1388+
13861389
- Issue #21907: Improved the batch scripts provided for building Python.
13871390

13881391
- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.

PCbuild/get_externals.bat

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ echo.Cleaning up external libraries.
2020
for /D %%d in (
2121
bzip2-*
2222
db-*
23+
nasm-*
2324
openssl-*
2425
tcl-*
2526
tcltk*
@@ -51,6 +52,7 @@ echo.Fetching external libraries...
5152

5253
for %%e in (
5354
bzip2-1.0.6
55+
nasm-2.11.06
5456
openssl-1.0.1j
5557
tcl-8.6.1.0
5658
tk-8.6.1.0
@@ -87,9 +89,9 @@ echo.
8789
echo.**WARNING**: the cleaning options unconditionally remove any directory
8890
echo.that is a child of
8991
echo. %CD%
90-
echo.and matches wildcard patterns beginning with bzip2-, db-, openssl-, tcl-,
91-
echo.tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential to be
92-
echo.very destructive if you are not aware of what it is doing. Use with
92+
echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,
93+
echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential
94+
echo.to be very destructive if you are not aware of what it is doing. Use with
9395
echo.caution!
9496
popd
9597
exit /b -1

PCbuild/pyproject.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<sqlite3Dir>$(externalsDir)\sqlite-3.8.3.1</sqlite3Dir>
2121
<bz2Dir>$(externalsDir)\bzip2-1.0.6</bz2Dir>
2222
<lzmaDir>$(externalsDir)\xz-5.0.5</lzmaDir>
23+
<nasmDir>$(externalsDir)\nasm-2.11.06</nasmDir>
2324
<opensslDir>$(externalsDir)\openssl-1.0.1j</opensslDir>
2425
<tclDir>$(externalsDir)\tcl-8.6.1.0</tclDir>
2526
<tkDir>$(externalsDir)\tk-8.6.1.0</tkDir>
@@ -77,6 +78,9 @@
7778
<BuildMacro Include="lzmaDir">
7879
<Value>$(lzmaDir)</Value>
7980
</BuildMacro>
81+
<BuildMacro Include="nasmDir">
82+
<Value>$(nasmDir)</Value>
83+
</BuildMacro>
8084
<BuildMacro Include="opensslDir">
8185
<Value>$(opensslDir)</Value>
8286
</BuildMacro>

PCbuild/readme.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ Quick Start Guide
33

44
1. Install Microsoft Visual C++ 2010 SP1, any edition.
55
2. Install Subversion, and make sure 'svn.exe' is on your PATH.
6-
3. Install NASM, and make sure 'nasm.exe' is on your PATH.
7-
4. Run "build.bat -e" to build Python in 32-bit Release configuration.
8-
5. (Optional, but recommended) Run the test suite with "rt.bat -q".
6+
3. Run "build.bat -e" to build Python in 32-bit Release configuration.
7+
4. (Optional, but recommended) Run the test suite with "rt.bat -q".
98

109

1110
Building Python using Microsoft Visual C++
@@ -225,7 +224,8 @@ _ssl
225224
to be somewhere on your PATH. More recent versions of OpenSSL may
226225
need a later version of NASM. If OpenSSL's self tests don't pass,
227226
you should first try to update NASM and do a full rebuild of
228-
OpenSSL.
227+
OpenSSL. get_externals.py also downloads a snapshot of NASM, and the
228+
ssl sub-project includes that version of nasm.exe on PATH.
229229

230230
The ssl sub-project expects your OpenSSL sources to have already
231231
been configured and be ready to build. If you get your sources

PCbuild/ssl.vcxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
<PropertyGroup>
120120
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
121121
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
122+
path %PATH%;$(SolutionDir)$(nasmDir)
122123
cd "$(SolutionDir)$(opensslDir)"
123124
copy /Y crypto\buildinf_x86.h crypto\buildinf.h
124125
copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h
@@ -133,6 +134,7 @@ nmake /nologo -f "ms\nt.mak"
133134
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
134135
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
135136
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
137+
path %PATH%;$(SolutionDir)$(nasmDir)
136138
cd "$(SolutionDir)$(opensslDir)"
137139
nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! &amp;&amp; exit
138140
copy /Y crypto\buildinf_amd64.h crypto\buildinf.h
@@ -148,6 +150,7 @@ nmake /nologo -f "ms\nt64.mak"
148150
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
149151
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
150152
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
153+
path %PATH%;$(SolutionDir)$(nasmDir)
151154
cd "$(SolutionDir)$(opensslDir)"
152155
copy /Y crypto\buildinf_x86.h crypto\buildinf.h
153156
copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h
@@ -162,6 +165,7 @@ nmake /nologo -f "ms\nt.mak"
162165
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
163166
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
164167
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
168+
path %PATH%;$(SolutionDir)$(nasmDir)
165169
cd "$(SolutionDir)$(opensslDir)"
166170
nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! &amp;&amp; exit
167171
copy /Y crypto\buildinf_amd64.h crypto\buildinf.h
@@ -177,6 +181,7 @@ nmake /nologo -f "ms\nt64.mak"
177181
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
178182
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
179183
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
184+
path %PATH%;$(SolutionDir)$(nasmDir)
180185
cd "$(SolutionDir)$(opensslDir)"
181186
copy /Y crypto\buildinf_x86.h crypto\buildinf.h
182187
copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h
@@ -191,6 +196,7 @@ nmake /nologo -f "ms\nt.mak"
191196
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
192197
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
193198
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
199+
path %PATH%;$(SolutionDir)$(nasmDir)
194200
cd "$(SolutionDir)$(opensslDir)"
195201
nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! &amp;&amp; exit
196202
copy /Y crypto\buildinf_amd64.h crypto\buildinf.h
@@ -206,6 +212,7 @@ nmake /nologo -f "ms\nt64.mak"
206212
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
207213
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
208214
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
215+
path %PATH%;$(SolutionDir)$(nasmDir)
209216
cd "$(SolutionDir)$(opensslDir)"
210217
copy /Y crypto\buildinf_x86.h crypto\buildinf.h
211218
copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h
@@ -220,6 +227,7 @@ nmake /nologo -f "ms\nt.mak"
220227
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
221228
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
222229
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
230+
path %PATH%;$(SolutionDir)$(nasmDir)
223231
cd "$(SolutionDir)$(opensslDir)"
224232
nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! &amp;&amp; exit
225233
copy /Y crypto\buildinf_amd64.h crypto\buildinf.h

0 commit comments

Comments
 (0)