| 1 | = How to build eggs for !PyCrypto on Win32 = |
| 2 | |
| 3 | == Preparation == |
| 4 | Download and install 7-zip (to extract .tar.gz) |
| 5 | |
| 6 | http://downloads.sourceforge.net/sevenzip/7z920.exe |
| 7 | |
| 8 | Download hashdeep, extract to PATH (to check SHA-256 checksums) |
| 9 | http://sourceforge.net/projects/md5deep/files/md5deep/md5deep-3.9.2/md5deep-3.9.2.zip/download |
| 10 | |
| 11 | Download Mingw32 installer and run it. |
| 12 | http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20110802/mingw-get-inst-20110802.exe/download |
| 13 | |
| 14 | Download pycrypto: |
| 15 | http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.4.tar.gz |
| 16 | |
| 17 | Check the SHA-256 hash: |
| 18 | {{{C:\> hashdeep -c sha256 pycrypto-2.4.tar.gz}}} |
| 19 | |
| 20 | Extract pycrypto-2.4.tar.gz with 7-zip. |
| 21 | |
| 22 | Download Python 2.6 and install it. |
| 23 | http://www.python.org |
| 24 | |
| 25 | Add {{{c:\python26}}} and {{{c:\python26\scripts}}} to your PATH |
| 26 | |
| 27 | == Compile and build the binary eggs == |
| 28 | |
| 29 | Run MingW Shell from start menu, cd to pycrypto-2.4 directory and start the compilation: |
| 30 | {{{ python build --compile=mingw32}}} |
| 31 | |
| 32 | Build the egg (will be placed in the \dist subdirectory: |
| 33 | {{{ python -c "import setuptools; execfile('setup.py')" bdist_egg}}} |
| 34 | |
| 35 | == Test the build == |
| 36 | |
| 37 | Run pycrypto test suite: |
| 38 | {{{ python setup.py test}}} |
| 39 | |
| 40 | Download Tahoe-LAFS https://tahoe-lafs.org/source/tahoe-lafs/releases/allmydata-tahoe-1.9.0.zip |
| 41 | |
| 42 | Extract it to a short path without spaces (e.g. C:\). Run the test suite: |
| 43 | {{{c:\> python setup.py test}}} |
| 44 | |
| 45 | |
| 46 | == Instructions for Python 2.7 == |
| 47 | |
| 48 | Python 2.7 are build in the same way: |
| 49 | Download Python 2.7 and install it |
| 50 | http://www.python.org |
| 51 | |
| 52 | Remove {{{c:\python26}}} and {{{c:\python26\scripts}}} from your PATH. |
| 53 | Add {{{c:\python27}}} and {{{c:\python27\scripts}}} to your PATH |
| 54 | |
| 55 | Compile and test pycrypto-24 in the same way as for Python 2.6. |