| 1 | Building PySoy on Windows |
|---|
| 2 | by Kirk McDonald |
|---|
| 3 | |
|---|
| 4 | You will need: |
|---|
| 5 | |
|---|
| 6 | * A C compiler. I use MinGW. (Versions 3.4.2 and 5.1.3 have been tested to |
|---|
| 7 | work.) Visual Studio will probably work, though it is untested. |
|---|
| 8 | |
|---|
| 9 | * Download the Windows dependencies package from |
|---|
| 10 | http://www.pysoy.org/releases/windows_deps-1.0_beta3.zip and follow the README. |
|---|
| 11 | |
|---|
| 12 | * Ensure that the Python installation dir and MinGW's bin folder (if you use |
|---|
| 13 | MinGW) are on the path. |
|---|
| 14 | |
|---|
| 15 | Pyrex 0.9.6.4 fix: |
|---|
| 16 | |
|---|
| 17 | There is a bug in 0.9.6.4 which causes PySoy's compilation to fail on Windows. |
|---|
| 18 | In the file Pyrex\Compiler\Parsing.py, line 1191 reads: |
|---|
| 19 | |
|---|
| 20 | result = PassStatNode(pos) |
|---|
| 21 | |
|---|
| 22 | Change this to: |
|---|
| 23 | |
|---|
| 24 | result = Nodes.PassStatNode(pos) |
|---|
| 25 | |
|---|
| 26 | Building: |
|---|
| 27 | |
|---|
| 28 | Distutils gets a little strange when compiling with MinGW. To build PySoy, you |
|---|
| 29 | should issue the following command: |
|---|
| 30 | |
|---|
| 31 | > python setup.py build --compiler=mingw32 |
|---|
| 32 | |
|---|
| 33 | To install PySoy into site-packages, you should issue the following command: |
|---|
| 34 | |
|---|
| 35 | > python setup.py build --compiler=mingw32 install |
|---|
| 36 | |
|---|
| 37 | If you are using Visual C++, the usual "python setup.py install" should work. |
|---|
| 38 | |
|---|
| 39 | Note that, when you "import soy", the DLLs for PySoy's various dependencies |
|---|
| 40 | will need to be somewhere on the DLL search path. If you've followed the README |
|---|
| 41 | in the Windows dependencies package, it should automatically work. Otherwise, |
|---|
| 42 | the easiest place to put them is in the 'soy' directory under |
|---|
| 43 | Python25\Lib\site-packages\ (next to the compiled .pyd files), though anywhere |
|---|
| 44 | on the PATH will work. |
|---|
| 45 | |
|---|
| 46 | Building the Installer: |
|---|
| 47 | |
|---|
| 48 | This is a four-step process. |
|---|
| 49 | |
|---|
| 50 | 1) Build PySoy. |
|---|
| 51 | 2) Copy the 'examples' directory into the build\lib.plat-version\soy directory. |
|---|
| 52 | 3) Copy the various DLL dependencies into that directory, too. |
|---|
| 53 | 4) Issue the following command: |
|---|
| 54 | > python setup.py build --compiler=mingw32 bdist_wininst --install-script=win32_postinstall.py |
|---|
| 55 | |
|---|