wiki:WindowsBuilds

Building Twisted on Windows

OVERVIEW

Some requirements must be met to build the "Official" win32 Twisted.

Installation requirements

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 bdist_wheel

With Mingw

The easiest way to build the extensions without MSVC is to install MinGW, for example using the automated installer. Then, create a distutils.cfg file in your distutils installation path (for example, C:\Python2.5\Lib\distutils\distutils.cfg), and put the following content:

[build]
compiler=mingw32

And then issue $ python setup.py install. You can also pass the --compiler=mingw32 option to the build command instead of using distutils.cfg.

With Cygwin

With Cygwin installed, you need to make sure these two packages are installed:

  • gcc
  • gcc-mingw

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.7 (latest), not the Cygwin version of Python, however it is built with the help of Cygwin packages.

You need both.

  • ZopeInterface 3.3.0

Download and install it for both versions of Python.

  • winreg

You need this little module: http://www.rutherfurd.net/python/winreg/

  • 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.

TROUBLESHOOTING

If you have trouble building the official build, try the following:

  1. Make sure your cygwin .bash_profile isn't clobbering this system PATH
  2. Make sure you don't have Cygwin's Python package installed.
  3. If you're doing an official release, see maintainer-notes.txt.
Last modified 8 days ago Last modified on 05/21/2016 06:49:15 PM