wiki:HowtoBuildPyCryptoOnWindows

How to build eggs for PyCrypto on Win32

Preparation

Download and install 7-zip (to extract .tar.gz) http://downloads.sourceforge.net/sevenzip/7z920.exe

Download hashdeep, extract to PATH (to check SHA-256 checksums) http://sourceforge.net/projects/md5deep/files/md5deep/md5deep-3.9.2/md5deep-3.9.2.zip/download

Download Mingw32 installer and run it. http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20110802/mingw-get-inst-20110802.exe/download

Download pycrypto: http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.4.tar.gz

Check the SHA-256 hash: C:\> hashdeep -c sha256 pycrypto-2.4.tar.gz

Extract pycrypto-2.4.tar.gz with 7-zip.

Download Python 2.6 and install it. http://www.python.org

Add c:\python26 and c:\python26\scripts to your PATH

Compile and build the binary eggs

Run MingW Shell from start menu, cd to pycrypto-2.4 directory and start the compilation: python build --compile=mingw32

Build the egg (will be placed in the \dist subdirectory: python -c "import setuptools; execfile('setup.py')" bdist_egg

Test the build

Run pycrypto test suite: python setup.py test

Download Tahoe-LAFS https://tahoe-lafs.org/source/tahoe-lafs/releases/allmydata-tahoe-1.9.0.zip

Extract it to a short path without spaces (e.g. C:\). Run the test suite: c:\> python setup.py test

Instructions for Python 2.7

Python 2.7 are build in the same way: Download Python 2.7 and install it http://www.python.org

Remove c:\python26 and c:\python26\scripts from your PATH. Add c:\python27 and c:\python27\scripts to your PATH

Compile and test pycrypto-24 in the same way as for Python 2.6.

Last modified at 2011-11-03T21:26:06Z Last modified on 2011-11-03T21:26:06Z