[pycrypto] Compiling on Windows tips

Max Polk maxpolk at gmail.com
Mon Jun 1 22:25:31 PDT 2015


I have some notes for compiling pip packages on Windows that may be of use.

To build pycrypto with Visual Studio Express 10, edit the python
msvc9compiler.py, add the line here above the existing line:

    ld_args.append('/MANIFEST')
    ld_args.append('/MANIFESTFILE:' + temp_manifest)

Then use this to build:

    set VS90COMNTOOLS=%VS100COMNTOOLS%
    python setup.py bdist_wininst

The above creates an .exe in the dist directory such as
pycrypto-2.5.win32-py2.7.exe

In general, for various pip packages that require compiling on Windows such
as tornado, to compile with Visual Studio from Python, trick Python into
using an old variable name before calling pip install:

Visual Studio 2010 (VS10):
SET VS90COMNTOOLS=%VS100COMNTOOLS%

Visual Studio 2012 (VS11):
SET VS90COMNTOOLS=%VS110COMNTOOLS%

Visual Studio 2013 (VS12):
SET VS90COMNTOOLS=%VS120COMNTOOLS%

If it is looking for Visual C++ 10, you will set VS100COMNTOOLS instead of
setting VS90COMNTOOLS.

The above worked for pip install tornado on Windows python 2 and 3.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dlitz.net/pipermail/pycrypto/attachments/20150602/9f9ef5cd/attachment.html>


More information about the pycrypto mailing list