py-twisted/win32
teratorn 2a5458c93c merge delete-t-im-3507
Author: teratorn
Reviewer: exarkun
Fixes: #3507


git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25178 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
2008-10-29 15:15:13 +00:00
..
README.win32 Merge remove-tkmktap-2020 2006-09-23 22:31:24 +00:00
aapwin.py Apply patch from Cory Dodt for resolution of #3115. 2008-03-30 02:46:51 +00:00
build.aap Apply patch from Cory Dodt for resolution of #3115. 2008-03-30 02:46:51 +00:00
main.aap Fix various issues with win32 build scripts: 2008-04-06 20:35:20 +00:00
maintainer-notes.txt
pyx.x-foo.iss.template Fix windows installer: remove pyc and pyo files of zope.interface package at 2008-04-09 07:36:22 +00:00
twisted-icon.ico Fix various issues with win32 build scripts: 2008-04-06 20:35:20 +00:00
twisted_postinstall.py Fix various issues with win32 build scripts: 2008-04-06 20:35:20 +00:00
twistenv.bat merge delete-t-im-3507 2008-10-29 15:15:13 +00:00

README.win32

OVERVIEW
--------

Some requirements must be met to build the "Official" win32
Twisted.  The Official build produces four files with the following
features:

- Two of the four builds contain documentation, and make shortcuts to
it; the others do not.
- Two of the four builds are for Python 2.4, the other two are for Python 2.3.
- There is a shortcut in the start menu for the Twisted Command Prompt
which is a standard Windows command prompt with PATH and environment
variables set up to invoke the Twisted commands the same way you would
on Unix; e.g. "mktap".

There are two ways to get Twisted installed from source.  One is to do
the bare minimum necessary so that 'import twisted' works; the other
is the Official method.


BARE MINIMUM
------------
This method is only necessary if you are trying to install Twisted
from e.g. the Subversion repository, and you don't want to acquire all the
tools necessary to do the Official build.

* Install either Python 2.3 or Python 2.4

* Install ZopeInterface 3.0.1 or later for Python

* With MSVC ***
Without Cygwin installed, you need MSVC installed for the cl.exe
compiler, which is the default on windows.  Just issue the command:
$ python setup.py install

* With Cygwin ***
With Cygwin installed, you need to make sure these two packages are installed:
- gcc
- gcc-mingw
You also need libpython22.a (or libpython23.a as appropriate).  
Instructions can be found at http://sebsauvage.net/python/mingw.html .

Once that's done, just issue the command:

$ python setup.py build --compiler=mingw32 install

If for some reason extensions won't build, try this instead:

$ python setup.py build_py build_scripts install --skip-build


OFFICIAL
--------
The Official Twisted is built with native Python 2.3 (latest), not the
Cygwin version of Python, however it is built with the help of Cygwin
packages.

* Python 2.3 AND Python 2.4 ***
You need both.


* ZopeInterface 3.0.1
Download and install it for both versions of Python.


* A-A-P ***
This is what actually does the building.
http://www.a-a-p.org/download.html
After installing it, make sure the file aap.bat is in your system PATH, using
(for example) the environment variable applet.


* winreg ***
You need this little module:
http://www.rutherfurd.net/python/winreg/   # FIXME -- make aap fetch it


* Cygwin ***
You will need Cygwin, with the gcc-mingw package installed.  Get
Cygwin at:

http://cygwin.com

DO NOT INSTALL CYGWIN PYTHON!
DO NOT INSTALL CYGWIN PYTHON!
(Install Native Windows Python.)


* Inno Setup ***
This creates nice self-installers with uninstall functionality:
http://www.jrsoftware.org/isinfo.php
You need version 4.0.8 or above.  (5.0.8 or later preferred.)


* Bootstrap Twisted ***
You will need an existing installation of Twisted, as the build script
uses some utilities within Twisted.  The "bare minimum" install
described above will suffice.


* Issue the build command ***

Bring up a Cygwin prompt.  Change directories to the root of your Twisted
source tree.  It should contain the directory "win32/".
Now run the following:

$ aap.bat -f win32/build.aap

The four distributable files will be in dist/ when this is done.



TROUBLESHOOTING
---------------
If you have trouble building the official build, try the following:
1. Remove "C:\winnt\aap.bat" or "C:\windows\aap.bat" which will have incorrect
contents.
2. Make sure that your system PATH includes C:\Program Files\AAP\Exec
3. Make sure your cygwin .bash_profile isn't clobbering this system PATH
4. Make sure you don't have Cygwin's Python package installed. 
5. Make sure both Python 2.3 and Python 2.4 are installed.
6. If you're doing an official release, see maintainer-notes.txt.