[Twisted-Python] Installing Twisted on Win32 Cygwin

Stephen Leake stephen_leake at stephe-leake.org
Sat Feb 23 04:12:41 EST 2008

I'm attempting to install Twisted using the Cygwin installation of
Python. This is my first time using Python; I'm setting up a buildbot
for monotone (http://www.venge.net/mtn-wiki/BuildBot).

I could probably make things work with a native Win32 installation of
Python, but I suspect it would be simpler in the long run to get the
Cygwin version working.

The first problem is the location and name of the Python library.
Cygwin puts it in:


But the default Twisted install scripts use this link option:


Changing that to:

-L/lib/python2.5/config -lpython2.5.dll

lets some of the links succeed. 

I'm doing this by manually re-executing the link step, after editing
the command line options.

How do I tell the Twisted install system where the Python library is,
so it gets the link command correct? I read setup.py, and poked around
in some other scripts, but I don't see where this option is set. I'm
used to debuging Gnu configure scripts, but Python setup is new to me.  

Another link problem is with TwistedRunner:

gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.5.25-i686-2.5/twisted/runner/portmap.o -L/lib/python2.5/config -lpython2.5.dll -o build/lib.cygwin-1.5.25-i686-2.5/twisted/runner/portmap.dll
/Apps/Twisted-2.5.0/TwistedRunner-0.2.0/twisted/runner/portmap.c:24: undefined reference to `_pmap_unset'
/Apps/Twisted-2.5.0/TwistedRunner-0.2.0/twisted/runner/portmap.c:25: undefined reference to `_pmap_set'
build/temp.cygwin-1.5.25-i686-2.5/twisted/runner/portmap.o: In function `portmap_unset':
/Apps/Twisted-2.5.0/TwistedRunner-0.2.0/twisted/runner/portmap.c:39: undefined reference to `_pmap_unset'

pmap_set and pmap_unset are defined in <rpc/pmap_clnt.h>. What library
are these functions in?

-- Stephe

More information about the Twisted-Python mailing list