[Python-Dev] Compile Python on Windows (OpenSSL)

Victor Stinner victor.stinner at gmail.com
Tue Jan 13 23:04:22 CET 2015


Hi,

To compile Python on Windows, there are a few information in the
Developer Guide:
https://docs.python.org/devguide/setup.html#windows-compiling

Python 3.5 now requires Visual Studio 2010 *SP1*, or newer Visual Studio:
http://bugs.python.org/issue22919#msg233637

I found PCbuild\readme.txt which is not mentionned in the devguide :-/
https://hg.python.org/cpython/file/56f717235c45/PCbuild/readme.txt
(at least not on the Windows section of the setup page)

I found some clues to build OpenSSL to be able to build the Python ssl
module, but I still have issues.

Is there a more complete documentation?

I found how to install svn.exe, perl.exe and nasm.exe, but not how to
install nmake.exe. I don't know the command to build OpenSSL.

I don't care of building OpenSSL, my goal is only to build the Python
ssl module. Is there a way to install a development version of OpenSSL
(.lib files if I remember correctly) from an installer/binary?

My draft notes:

+Compile CPython on Windows
+==========================
+
+To build the Python ssl extension:
+
+Need:
+
+* Visual Studio 2010 SP1 or newer
+* CPython source code (default branch: 3.5)
+* perl binary: ActivePerl
+* svn binary, ex: SilkSVN
+* nasm and nmake binaries: compile NASM (install the binary doesn't
install nmake)
+
+Read PCbuild/readme.txt.
+
+* Build Python (in debug mode)
+* Type: PCbuild\get_externals.bat
+* Type: PCbuild\win32\python_d.exe PCbuild\prepare_ssl.py
externals\openssl-1.0.1j

Victor


More information about the Python-Dev mailing list