[tor-commits] [tor-browser-bundle/master] Build twisted for windows.

mikeperry at torproject.org mikeperry at torproject.org
Tue Jan 21 04:47:04 UTC 2014


commit c323341793b42c7b457650426d50195d42717e16
Author: David Fifield <david at bamsoftware.com>
Date:   Mon Nov 18 05:22:49 2013 +0000

    Build twisted for windows.
---
 .../descriptors/windows/gitian-pluggable-transports.yml |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gitian/descriptors/windows/gitian-pluggable-transports.yml b/gitian/descriptors/windows/gitian-pluggable-transports.yml
index 89cd34a..750d69a 100644
--- a/gitian/descriptors/windows/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/windows/gitian-pluggable-transports.yml
@@ -22,6 +22,7 @@ files:
 - "setuptools.tar.gz"
 - "pycrypto.tar.gz"
 - "zope.interface.zip"
+- "twisted.tar.bz2"
 - "ubuntu-wine.gpg"
 - "wine-wrappers"
 - "python.msi"
@@ -115,6 +116,20 @@ script: |
   touch $INSTDIR/python/Lib/site-packages/zope/__init__.py
   cd ..
   #
+  tar xjf twisted.tar.bz2
+  cd Twisted-*
+  find -type f | xargs touch --date="$REFERENCE_DATETIME"
+  # twisted/internet/iocpreactor/iocpsupport/iocpsupport.c includes "python.h" rather than "Python.h".
+  ln -sf Python.h $INSTDIR/python/include/python.h
+  # We need to set the "mingw32" compiler to avoid an error in build_ext, but
+  # Twisted's "install" command calls build_ext unconditionally, whether the
+  # extensions have been built already or not, so we can't just call build_ext
+  # separately as with other packages. The "install" command doesn't recognize
+  # the -c option, so we set the compiler in a configuration file.
+  echo $'[build_ext]\ncompiler=mingw32' > setup.cfg
+  LD_PRELOAD= $INSTPYTHON setup.py install --single-version-externally-managed --record /dev/null
+  cd ..
+  #
   cd openssl
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
   ./Configure -shared --cross-compile-prefix=i686-w64-mingw32- mingw --prefix=$INSTDIR/openssl





More information about the tor-commits mailing list