| 1 | | OVERVIEW |
| 2 | | -------- |
| 3 | | |
| 4 | | Some requirements must be met to build the "Official" win32 |
| 5 | | Twisted. The Official build produces four files with the following |
| 6 | | features: |
| 7 | | |
| 8 | | - Two of the four builds contain documentation, and make shortcuts to |
| 9 | | it; the others do not. |
| 10 | | - Two of the four builds are for Python 2.4, the other two are for Python 2.3. |
| 11 | | - There is a shortcut in the start menu for the Twisted Command Prompt |
| 12 | | which is a standard Windows command prompt with PATH and environment |
| 13 | | variables set up to invoke the Twisted commands the same way you would |
| 14 | | on Unix; e.g. "mktap". |
| 15 | | |
| 16 | | There are two ways to get Twisted installed from source. One is to do |
| 17 | | the bare minimum necessary so that 'import twisted' works; the other |
| 18 | | is the Official method. |
| 19 | | |
| 20 | | |
| 21 | | BARE MINIMUM |
| 22 | | ------------ |
| 23 | | This method is only necessary if you are trying to install Twisted |
| 24 | | from e.g. the Subversion repository, and you don't want to acquire all the |
| 25 | | tools necessary to do the Official build. |
| 26 | | |
| 27 | | * Install either Python 2.3 or Python 2.4 |
| 28 | | |
| 29 | | * Install ZopeInterface 3.0.1 or later for Python |
| 30 | | |
| 31 | | * With MSVC *** |
| 32 | | Without Cygwin installed, you need MSVC installed for the cl.exe |
| 33 | | compiler, which is the default on windows. Just issue the command: |
| 34 | | $ python setup.py install |
| 35 | | |
| 36 | | * With Cygwin *** |
| 37 | | With Cygwin installed, you need to make sure these two packages are installed: |
| 38 | | - gcc |
| 39 | | - gcc-mingw |
| 40 | | You also need libpython22.a (or libpython23.a as appropriate). |
| 41 | | Instructions can be found at http://sebsauvage.net/python/mingw.html . |
| 42 | | |
| 43 | | Once that's done, just issue the command: |
| 44 | | |
| 45 | | $ python setup.py build --compiler=mingw32 install |
| 46 | | |
| 47 | | If for some reason extensions won't build, try this instead: |
| 48 | | |
| 49 | | $ python setup.py build_py build_scripts install --skip-build |
| 50 | | |
| 51 | | |
| 52 | | OFFICIAL |
| 53 | | -------- |
| 54 | | The Official Twisted is built with native Python 2.3 (latest), not the |
| 55 | | Cygwin version of Python, however it is built with the help of Cygwin |
| 56 | | packages. |
| 57 | | |
| 58 | | * Python 2.3 AND Python 2.4 *** |
| 59 | | You need both. |
| 60 | | |
| 61 | | |
| 62 | | * ZopeInterface 3.0.1 |
| 63 | | Download and install it for both versions of Python. |
| 64 | | |
| 65 | | |
| 66 | | * A-A-P *** |
| 67 | | This is what actually does the building. |
| 68 | | http://www.a-a-p.org/download.html |
| 69 | | After installing it, make sure the file aap.bat is in your system PATH, using |
| 70 | | (for example) the environment variable applet. |
| 71 | | |
| 72 | | |
| 73 | | * winreg *** |
| 74 | | You need this little module: |
| 75 | | http://www.rutherfurd.net/python/winreg/ # FIXME -- make aap fetch it |
| 76 | | |
| 77 | | |
| 78 | | * Cygwin *** |
| 79 | | You will need Cygwin, with the gcc-mingw package installed. Get |
| 80 | | Cygwin at: |
| 81 | | |
| 82 | | http://cygwin.com |
| 83 | | |
| 84 | | DO NOT INSTALL CYGWIN PYTHON! |
| 85 | | DO NOT INSTALL CYGWIN PYTHON! |
| 86 | | (Install Native Windows Python.) |
| 87 | | |
| 88 | | |
| 89 | | * Inno Setup *** |
| 90 | | This creates nice self-installers with uninstall functionality: |
| 91 | | http://www.jrsoftware.org/isinfo.php |
| 92 | | You need version 4.0.8 or above. (5.0.8 or later preferred.) |
| 93 | | |
| 94 | | |
| 95 | | * Bootstrap Twisted *** |
| 96 | | You will need an existing installation of Twisted, as the build script |
| 97 | | uses some utilities within Twisted. The "bare minimum" install |
| 98 | | described above will suffice. |
| 99 | | |
| 100 | | |
| 101 | | * Issue the build command *** |
| 102 | | |
| 103 | | Bring up a Cygwin prompt. Change directories to the root of your Twisted |
| 104 | | source tree. It should contain the directory "win32/". |
| 105 | | Now run the following: |
| 106 | | |
| 107 | | $ aap.bat -f win32/build.aap |
| 108 | | |
| 109 | | The four distributable files will be in dist/ when this is done. |
| 110 | | |
| 111 | | |
| 112 | | |
| 113 | | TROUBLESHOOTING |
| 114 | | --------------- |
| 115 | | If you have trouble building the official build, try the following: |
| 116 | | 1. Remove "C:\winnt\aap.bat" or "C:\windows\aap.bat" which will have incorrect |
| 117 | | contents. |
| 118 | | 2. Make sure that your system PATH includes C:\Program Files\AAP\Exec |
| 119 | | 3. Make sure your cygwin .bash_profile isn't clobbering this system PATH |
| 120 | | 4. Make sure you don't have Cygwin's Python package installed. |
| 121 | | 5. Make sure both Python 2.3 and Python 2.4 are installed. |
| 122 | | 6. If you're doing an official release, see maintainer-notes.txt. |
| | 1 | Moved to: http://twistedmatrix.com/trac/wiki/WindowsBuilds |