diffstat of debian/ for twisted_13.2.0-1 twisted_13.2.0-1ubuntu1 changelog | 62 +++++++++++++++++++++++ control | 40 ++++++++++++++ patches/lp1098127.diff | 30 +++++++++++ patches/lp1102685.diff | 37 +++++++++++++ patches/python3.diff | 28 ++++++++++ patches/python3_modules.diff | 68 +++++++++++++++++++++++++ patches/series | 4 + python-twisted-core.postinst | 2 python3-twisted-core.postinst | 28 ++++++++++ python3-twisted-core.triggers | 1 rules | 113 ++++++++++++++++++++++++++++++++++++++++-- 11 files changed, 407 insertions(+), 6 deletions(-) diff -Nru twisted-13.2.0/debian/changelog twisted-13.2.0/debian/changelog --- twisted-13.2.0/debian/changelog 2014-01-07 22:53:28.000000000 +0000 +++ twisted-13.2.0/debian/changelog 2014-01-07 23:33:23.000000000 +0000 @@ -1,3 +1,13 @@ +twisted (13.2.0-1ubuntu1) trusty; urgency=medium + + * Merge with Debian; remaining changes: + - Keep the preliminary python3 support, but don't enable it. + - Try to use plain pygtkcompat and fall back to gi.pygtkcompat, to + avoid a DeprecationWarning, and a crash. + - Use new io_add_watch api on new versions of pygobject. + + -- Matthias Klose Wed, 08 Jan 2014 00:19:41 +0100 + twisted (13.2.0-1) unstable; urgency=medium * New upstream release. @@ -11,12 +21,64 @@ -- Free Ekanayaka Fri, 04 Oct 2013 14:20:11 +0200 +twisted (13.0.0-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Keep the preliminary python3 support, but don't enable it. + - Try to use plain pygtkcompat and fall back to gi.pygtkcompat, to + avoid a DeprecationWarning, and a crash. + - Use new io_add_watch api on new versions of pygobject. + - Point html documentation to the generated api docs. + + -- Matthias Klose Thu, 20 Jun 2013 13:30:20 +0200 + twisted (13.0.0-1) unstable; urgency=low * New upstream release -- Free Ekanayaka Wed, 05 Jun 2013 20:48:54 +0200 +twisted (12.3.0-1ubuntu6) raring; urgency=low + + * Stop building the python3 packages (will be built from a separate + source until the python3 support is complete). + + -- Matthias Klose Thu, 04 Apr 2013 10:14:52 +0200 + +twisted (12.3.0-1ubuntu5) raring; urgency=low + + * debian/patches/lp1098127.diff: + - Use new io_add_watch api on new versions of pygobject. (LP: #1098127) + + -- Rodney Dawes Thu, 14 Mar 2013 17:24:59 -0400 + +twisted (12.3.0-1ubuntu4) raring; urgency=low + + * debian/patches/lp1102685.diff: + - Try to use plain pygtkcompat and fall back to gi.pygtkcompat, to + avoid a DeprecationWarning, and a crash. (LP: #1102685) + + -- Rodney Dawes Wed, 23 Jan 2013 12:19:06 -0500 + +twisted (12.3.0-1ubuntu3) raring; urgency=low + + * Explicitly call 2to3 to build the py3k source. + + -- Matthias Klose Wed, 23 Jan 2013 11:41:25 +0100 + +twisted (12.3.0-1ubuntu2) raring; urgency=low + + * Port Py_InitModule* calls to PyModule_Create for python3. + + -- Adam Conrad Mon, 21 Jan 2013 13:43:44 -0700 + +twisted (12.3.0-1ubuntu1) raring; urgency=low + + * Build python3 packages. + * Add '3' as the suffix for the binaries using python3. + + -- Matthias Klose Wed, 16 Jan 2013 17:44:26 +0100 + twisted (12.3.0-1) experimental; urgency=low * New upstream release diff -Nru twisted-13.2.0/debian/control twisted-13.2.0/debian/control --- twisted-13.2.0/debian/control 2014-01-07 23:10:17.000000000 +0000 +++ twisted-13.2.0/debian/control 2014-01-07 23:30:37.000000000 +0000 @@ -1,11 +1,14 @@ Source: twisted Section: python Priority: optional -Maintainer: Matthias Klose +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Matthias Klose Uploaders: Free Ekanayaka Build-Depends: debhelper (>=7.0.50~), python-all-dev (>= 2.6.6-3~), python-all-dbg, - python-zope.interface-dbg, patch + python-zope.interface-dbg, patch, + python3-all-dev (>= 3.3), python3-all-dbg, python3-zope.interface-dbg +#Build-Depends-Indep: python-pydoctor XS-Python-Version: all Standards-Version: 3.9.5 @@ -149,6 +152,39 @@ - Prototypes of chat server and client frameworks built on top of the protocols. +#Package: python3-twisted-core +#Architecture: all +#Depends: ${python3:Depends}, python3 (>= 3.3), python3-twisted-bin (>= ${source:Version}), python3-zope.interface (>= 3.6), ${misc:Depends} +#Suggests: python3-tk, python3-gtk2, python3-glade2, python3-qt4, python3-wxgtk2.8 +#Recommends: python3-openssl, python3-pam, python3-serial +#Provides: ${python:Provides} +#Description: Event-based framework for internet applications +# It includes a web server, a telnet server, a multiplayer RPG engine, a +# generic client and server for remote object access, and APIs for creating +# new protocols. + +#Package: python3-twisted-bin +#Architecture: any +#Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends} +#Provides: ${python:Provides} +#Suggests: python3-twisted-bin-dbg +#Description: Event-based framework for internet applications +# It includes a web server, a telnet server, a multiplayer RPG engine, a +# generic client and server for remote object access, and APIs for creating +# new protocols. + +#Package: python3-twisted-bin-dbg +#Priority: extra +#Section: debug +#Architecture: any +#Depends: python3-zope.interface-dbg, python3-twisted-bin (= ${binary:Version}), python3-dbg, ${shlibs:Depends}, ${misc:Depends} +#Description: Event-based framework for internet applications (debug extension) +# It includes a web server, a telnet server, a multiplayer RPG engine, a +# generic client and server for remote object access, and APIs for creating +# new protocols. +# . +# This package contains the extension built for the Python debug interpreter. + Package: twisted-doc Section: doc Priority: extra diff -Nru twisted-13.2.0/debian/patches/lp1098127.diff twisted-13.2.0/debian/patches/lp1098127.diff --- twisted-13.2.0/debian/patches/lp1098127.diff 1970-01-01 00:00:00.000000000 +0000 +++ twisted-13.2.0/debian/patches/lp1098127.diff 2014-01-07 23:30:37.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Use new io_add_watch api on new versions of pygobject. +Bug: https://twistedmatrix.com/trac/ticket/6369 +Author: Rodney Dawes + +=== modified file 'twisted/internet/_glibbase.py' +Index: b/twisted/internet/_glibbase.py +=================================================================== +--- a/twisted/internet/_glibbase.py ++++ b/twisted/internet/_glibbase.py +@@ -157,9 +157,17 @@ + else: + fileno = source + wrapper = callback +- return self._glib.io_add_watch( +- fileno, condition, wrapper, +- priority=self._glib.PRIORITY_DEFAULT_IDLE) ++ try: ++ from gi import version_info as gi_version ++ except ImportError: ++ gi_version = (2, 32, 0) ++ if gi_version < (3, 7, 3): ++ return self._glib.io_add_watch( ++ fileno, condition, wrapper, ++ priority=self._glib.PRIORITY_DEFAULT_IDLE) ++ else: ++ return self._glib.io_add_watch( ++ fileno, self._glib.PRIORITY_DEFAULT, condition, wrapper) + + + def _ioEventCallback(self, source, condition): diff -Nru twisted-13.2.0/debian/patches/lp1102685.diff twisted-13.2.0/debian/patches/lp1102685.diff --- twisted-13.2.0/debian/patches/lp1102685.diff 1970-01-01 00:00:00.000000000 +0000 +++ twisted-13.2.0/debian/patches/lp1102685.diff 2014-01-07 23:30:37.000000000 +0000 @@ -0,0 +1,37 @@ +Description: Use pygtkcompat directly and fall back to gi.pygtkcompat +Bug: https://twistedmatrix.com/trac/ticket/6280 +Author: Rodney Dawes + +=== modified file 'twisted/internet/gireactor.py' +--- old/twisted/internet/gireactor.py 2013-01-16 17:44:26 +0000 ++++ new/twisted/internet/gireactor.py 2013-01-23 17:13:29 +0000 +@@ -37,9 +37,12 @@ else: + from twisted.python.modules import theSystemPath + _pygtkcompatPresent = True + try: +- theSystemPath["gi.pygtkcompat"] ++ theSystemPath["pygtkcompat"] + except KeyError: +- _pygtkcompatPresent = False ++ try: ++ theSystemPath["gi.pygtkcompat"] ++ except KeyError: ++ _pygtkcompatPresent = False + + + # Modules that we want to ensure aren't imported if we're on older versions of +@@ -75,8 +78,11 @@ else: + # Newer version of gi, so we can try to initialize compatibility layer; if + # real pygtk was already imported we'll get ImportError at this point + # rather than segfault, so unconditional import is fine. +- import gi.pygtkcompat +- gi.pygtkcompat.enable() ++ try: ++ import pygtkcompat ++ except ImportError: ++ from gi import pygtkcompat ++ pygtkcompat.enable() + # At this point importing gobject will get you gi version, and importing + # e.g. gtk will either fail in non-segfaulty way or use gi version if user + # does gi.pygtkcompat.enable_gtk(). So, no need to prevent imports of + diff -Nru twisted-13.2.0/debian/patches/python3.diff twisted-13.2.0/debian/patches/python3.diff --- twisted-13.2.0/debian/patches/python3.diff 1970-01-01 00:00:00.000000000 +0000 +++ twisted-13.2.0/debian/patches/python3.diff 2014-01-07 23:30:37.000000000 +0000 @@ -0,0 +1,28 @@ +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -10,7 +10,7 @@ + import sys + + if sys.version_info < (2, 6): +- print >>sys.stderr, "You must use at least Python 2.6 for Twisted" ++ print("You must use at least Python 2.6 for Twisted", sys.stderr) + sys.exit(3) + + if os.path.exists('twisted'): +Index: b/twisted/python/dist.py +=================================================================== +--- a/twisted/python/dist.py ++++ b/twisted/python/dist.py +@@ -313,8 +313,8 @@ + for specialExclusion in ['.svn', '_preamble.py', '_preamble.pyc']: + if specialExclusion in thingies: + thingies.remove(specialExclusion) +- return filter(os.path.isfile, +- [os.path.join(scriptdir, x) for x in thingies]) ++ return list(filter(os.path.isfile, ++ [os.path.join(scriptdir, x) for x in thingies])) + + + ## Helpers and distutil tweaks diff -Nru twisted-13.2.0/debian/patches/python3_modules.diff twisted-13.2.0/debian/patches/python3_modules.diff --- twisted-13.2.0/debian/patches/python3_modules.diff 1970-01-01 00:00:00.000000000 +0000 +++ twisted-13.2.0/debian/patches/python3_modules.diff 2014-01-07 23:30:37.000000000 +0000 @@ -0,0 +1,68 @@ +Description: Port Py_InitModule* calls to PyModule_Create for python3. +Author: Adam Conrad +Forwarded: no + +--- twisted-12.3.0.orig/twisted/python/_initgroups.c ++++ twisted-12.3.0/twisted/python/_initgroups.c +@@ -58,9 +58,27 @@ static PyMethodDef InitgroupsMethods[] = + + #endif /* defined(__unix__) || defined(unix) */ + ++#if PY_MAJOR_VERSION >= 3 ++static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "_initgroups", /* m_name */ ++ NULL, /* m_doc */ ++ -1, /* m_size */ ++ InitgroupsMethods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++}; ++#endif ++ + void + init_initgroups(void) + { ++#if PY_MAJOR_VERSION >= 3 ++ PyModule_Create(&moduledef); ++#else + Py_InitModule("_initgroups", InitgroupsMethods); ++#endif + } + +--- twisted-12.3.0.orig/twisted/python/sendmsg.c ++++ twisted-12.3.0/twisted/python/sendmsg.c +@@ -116,6 +116,19 @@ static PyMethodDef sendmsg_methods[] = { + {NULL, NULL, 0, NULL} + }; + ++#if PY_MAJOR_VERSION >= 3 ++static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "sendmsg", /* m_name */ ++ sendmsg_doc, /* m_doc */ ++ -1, /* m_size */ ++ sendmsg_methods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++}; ++#endif + + PyMODINIT_FUNC initsendmsg(void) { + PyObject *module; +@@ -123,7 +136,11 @@ PyMODINIT_FUNC initsendmsg(void) { + sendmsg_socket_error = NULL; /* Make sure that this has a known value + before doing anything that might exit. */ + ++#if PY_MAJOR_VERSION >= 3 ++ module = PyModule_Create(&moduledef); ++#else + module = Py_InitModule3("sendmsg", sendmsg_methods, sendmsg_doc); ++#endif + + if (!module) { + return; diff -Nru twisted-13.2.0/debian/patches/series twisted-13.2.0/debian/patches/series --- twisted-13.2.0/debian/patches/series 2013-11-06 19:51:30.000000000 +0000 +++ twisted-13.2.0/debian/patches/series 2014-01-07 23:32:54.000000000 +0000 @@ -1 +1,5 @@ tap2deb.diff +#python3.diff +#python3_modules.diff +lp1102685.diff +lp1098127.diff diff -Nru twisted-13.2.0/debian/python-twisted-core.postinst twisted-13.2.0/debian/python-twisted-core.postinst --- twisted-13.2.0/debian/python-twisted-core.postinst 2013-11-06 19:51:30.000000000 +0000 +++ twisted-13.2.0/debian/python-twisted-core.postinst 2014-01-07 23:30:37.000000000 +0000 @@ -7,7 +7,7 @@ rebuild_cache() { # remove all cache files, then rebuild for the installed python versions - rm -f /usr/lib/python[23].?/*-packages/twisted/plugins/dropin.cache + rm -f /usr/lib/python2.?/*-packages/twisted/plugins/dropin.cache for p in $(pyversions -i); do $p -c 'from twisted.plugin import IPlugin, getPlugins; list(getPlugins(IPlugin))' \ >/dev/null 2>&1 || true diff -Nru twisted-13.2.0/debian/python3-twisted-core.postinst twisted-13.2.0/debian/python3-twisted-core.postinst --- twisted-13.2.0/debian/python3-twisted-core.postinst 1970-01-01 00:00:00.000000000 +0000 +++ twisted-13.2.0/debian/python3-twisted-core.postinst 2014-01-07 23:30:37.000000000 +0000 @@ -0,0 +1,28 @@ +#! /bin/sh + +set -e + +#DEBHELPER# + +rebuild_cache() +{ + # remove all cache files, then rebuild for the installed python versions + rm -f /usr/lib/python3/*-packages/twisted/plugins/dropin.cache + for p in $(py3versions -i); do + $p -c 'from twisted.plugin import IPlugin, getPlugins; list(getPlugins(IPlugin))' \ + >/dev/null 2>&1 || true + done +} + +case "$1" in + triggered) + if [ "$2" = twisted-plugins-cache ]; then + rebuild_cache + fi + ;; + configure) + rebuild_cache + ;; +esac + +exit 0 diff -Nru twisted-13.2.0/debian/python3-twisted-core.triggers twisted-13.2.0/debian/python3-twisted-core.triggers --- twisted-13.2.0/debian/python3-twisted-core.triggers 1970-01-01 00:00:00.000000000 +0000 +++ twisted-13.2.0/debian/python3-twisted-core.triggers 2014-01-07 23:30:37.000000000 +0000 @@ -0,0 +1 @@ +interest twisted-plugins-cache diff -Nru twisted-13.2.0/debian/rules twisted-13.2.0/debian/rules --- twisted-13.2.0/debian/rules 2013-11-06 19:51:30.000000000 +0000 +++ twisted-13.2.0/debian/rules 2014-01-07 23:37:33.000000000 +0000 @@ -5,24 +5,52 @@ # all versions PYVERS := $(shell pyversions -vs) VER := $(shell /usr/bin/python -c 'import sys; print sys.version[:3]') +PY3VERS := $(shell py3versions -vs) +VER3 := $(shell /usr/bin/python3 -c 'import sys; print(sys.version[:3])') DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') twversion := $(subst twisted-,,$(notdir $(CURDIR))) include /usr/share/python/python.mk +ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) + with_docs=yes +endif +with_docs= + build: build-stamp build-arch: build-stamp build-indep: build-stamp -build-stamp: $(PYVERS:%=build-python%) +build-indep: build-stamp build-doc +build-stamp: $(PYVERS:%=build-python%) # $(PY3VERS:%=build3-python%) touch $@ build-python%: python$* setup.py build python$*-dbg setup.py build touch $@ +build-2to3: + rm -rf py3 + mkdir -p py3 + cp -a CREDITS ChangeLog.Old LICENSE NEWS README bin doc setup.py twisted \ + py3/. + 2to3 --write --nobackups py3 + touch $@ + +build3-python%: build-2to3 + cd py3 && python$* setup.py build + cd py3 && python$*-dbg setup.py build + touch $@ + +build-doc: +ifeq ($(with_docs),yes) + -pydoctor --html-write-function-pages --add-package twisted +endif + clean: rm -rf *-stamp build-python* build tmp + rm -rf build3-python* build-2to3 + rm -rf apidocs py3 rm -rf $(addprefix debian/,$(packages)) debian/files debian/substvars rm -rf _trial_temp test.log rm -rf Twisted.egg-info @@ -31,6 +59,7 @@ dh_clean install: build-stamp install-prereq $(PYVERS:%=install-python%) install-nover +#install: build-stamp install-prereq $(PYVERS:%=install-python%) $(PY3VERS:%=install3-python%) install-nover install-prereq: build-stamp dh_testdir @@ -106,6 +135,53 @@ fi; \ done +install3-python%: install-prereq + : # python3-twisted-core + cd py3 && python$* setup.py install \ + --root=$(CURDIR)/debian/python3-twisted-core --install-layout=deb + + -find debian/python3-twisted-core -name '*.py[co]' | xargs rm -f + -find debian/python3-twisted-core -name '__pycache__' | xargs rm -rf + rm -rf debian/python3-twisted-core/usr/lib/python$*/*-packages/twisted/python/pymodules + + : # python3-twisted-bin +ifeq ($(DEB_HOST_ARCH_OS), linux) + dh_movefiles -ppython3-twisted-bin \ + --sourcedir=debian/python3-twisted-core \ + $(call py_libdir,$*)/twisted/python/sendmsg.cpython-$(subst .,,$*)m.so \ + $(call py_libdir,$*)/twisted/test/raiser.cpython-$(subst .,,$*)m.so +else + dh_movefiles -ppython3-twisted-bin \ + --sourcedir=debian/python3-twisted-core \ + $(call py_libdir,$*)/twisted/python/sendmsg.cpython-$(subst .,,$*)m.so \ + $(call py_libdir,$*)/twisted/test/raiser.cpython-$(subst .,,$*)m.so +endif + +ifeq (0,1) + : # python3-twisted + mkdir -p debian/python-twisted/$(call py_libdir,$*) + sed 's/@twversion@/$(twversion)/' debian/Twisted.egg-info.in \ + > debian/python-twisted/$(call py_libdir,$*)/Twisted-$(twversion).egg-info +endif + : # Replace all '#!' calls to python with /usr/bin/python3 + : # and make them executable + for i in `find debian/python3-twisted-* -mindepth 3 -type f`; do \ + sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python3\1,' \ + $$i > $$i.temp; \ + if cmp --quiet $$i $$i.temp; then \ + rm -f $$i.temp; \ + else \ + mv -f $$i.temp $$i; \ + chmod 755 $$i; \ + echo "fixed interpreter: $$i"; \ + fi; \ + done + : # python-twisted-bin-dbg + cd py3 && python$*-dbg setup.py install \ + --root=$(CURDIR)/debian/python3-twisted-bin-dbg --no-compile --install-layout=deb + find debian/python3-twisted-bin-dbg ! -type d ! -name '*.so' | xargs rm -f + find debian/python3-twisted-bin-dbg -depth -empty -exec rmdir {} \; + install-nover: : # man pages for i in conch core lore mail; do \ @@ -126,11 +202,35 @@ cp -a doc/core/* debian/twisted-doc/usr/share/doc/twisted-doc/ -find debian/twisted-doc -type d -name man | xargs rm -rf -binary-indep: build install +ifeq (0,1) + for i in debian/python3-twisted-core/usr/bin/*; do \ + mv $$i $${i}3; \ + done + + mkdir -p debian/python3-twisted-core/usr/share/man/man1 + for i in doc/man/{manhole,*tap*,trial,twistd,pyhtmlizer}.1; do \ + i2=$$(basename $$i .1)3.1; \ + cp -p $$i debian/python3-twisted-core/usr/share/man/man1/$$i2; \ + done +endif + +binary-indep: build-indep install dh_testdir dh_testroot dh_installchangelogs -i dh_installdocs -i +ifeq ($(with_docs),yes) + cp -ua apidocs debian/twisted-doc/usr/share/doc/twisted-doc/ + # Replace links to Twisted website API doc by links to the local doc. We + # need to compute path to the API which goes up enough in the folder + # hierarchy to access the doc. + for i in $$(cd debian/twisted-doc/usr/share/doc/twisted-doc/ && \ + grep -rl "http://twistedmatrix.com/documents/$(twversion)/api/" .); do \ + path="$$(echo $$i | sed "s:[^/]::g" | sed "s:/:../:g" | cut -c 4-)apidocs/"; \ + sed -i "s:http\://twistedmatrix.com/documents/$(twversion)/api/:$$path:g" \ + debian/twisted-doc/usr/share/doc/twisted-doc/$$i; \ + done +endif dh_installmenu -i dh_compress -i -X.py dh_fixperms -i @@ -147,7 +247,7 @@ -ppython-twisted-words -ptwisted-doc -ppython-twisted dh_builddeb -ppython-twisted-conch -binary-arch: build install +binary-arch: build-arch install dh_testdir dh_testroot dh_installchangelogs -a @@ -161,9 +261,16 @@ rm -rf debian/python-twisted-runner-dbg/usr/share/doc/python-twisted-runner-dbg ln -s python-twisted-runner \ debian/python-twisted-runner-dbg/usr/share/doc/python-twisted-runner-dbg +ifeq (0,1) + dh_strip -ppython3-twisted-bin --dbg-package=python3-twisted-bin-dbg + rm -rf debian/python3-twisted-bin-dbg/usr/share/doc/python3-twisted-bin-dbg + ln -s python3-twisted-bin \ + debian/python3-twisted-bin-dbg/usr/share/doc/python3-twisted-bin-dbg +endif dh_compress -a -X.py dh_fixperms -a dh_python2 -a +# dh_python3 -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a