Package: python-thrift
Version: 0.11.0-3+py3
Severity: important
Tags: patch

Dear Maintainer,

Here is a debdiff implementing Python 3 packages support (including multiple
version builds for transition supports).

It has been tested successfully on Debian Stretch (you may consider releasing
it as a backport) as well as Debian Bust (3.6 -> 3.7 transition).


diff -Nru thrift-0.11.0/debian/changelog thrift-0.11.0/debian/changelog
--- thrift-0.11.0/debian/changelog      2018-10-27 22:57:18.000000000 +0200
+++ thrift-0.11.0/debian/changelog      2018-11-14 10:19:24.000000000 +0100
@@ -1,3 +1,10 @@
+thrift (0.11.0-3+py3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Build python3 packages.
+
+ -- Adam Cecile <acec...@le-vert.net>  Wed, 14 Nov 2018 10:19:24 +0100
+
 thrift (0.11.0-3) unstable; urgency=medium

   * Build with latest PHP package version.
diff -Nru thrift-0.11.0/debian/python3-thrift.install
thrift-0.11.0/debian/python3-thrift.install
--- thrift-0.11.0/debian/python3-thrift.install 1970-01-01 01:00:00.000000000
+0100
+++ thrift-0.11.0/debian/python3-thrift.install 2018-11-14 10:19:24.000000000
+0100
@@ -0,0 +1,2 @@
+usr/lib/python3/*-packages/*.egg-info
+usr/lib/python3/*-packages/thrift/
diff -Nru thrift-0.11.0/debian/python-thrift.install
thrift-0.11.0/debian/python-thrift.install
--- thrift-0.11.0/debian/python-thrift.install  2015-06-13 09:26:49.000000000
+0200
+++ thrift-0.11.0/debian/python-thrift.install  2018-11-14 10:19:24.000000000
+0100
@@ -1,2 +1,2 @@
-usr/lib/python*/*-packages/*.egg-info
-usr/lib/python*/*-packages/thrift/
+usr/lib/python2.*/*-packages/*.egg-info
+usr/lib/python2.*/*-packages/thrift/
diff -Nru thrift-0.11.0/debian/rules thrift-0.11.0/debian/rules
--- thrift-0.11.0/debian/rules  2018-10-27 22:57:18.000000000 +0200
+++ thrift-0.11.0/debian/rules  2018-11-14 10:19:24.000000000 +0100
@@ -24,6 +24,9 @@

 RUBY_LIBDIR := $(shell ruby -rrbconfig -e'print
RbConfig::CONFIG["vendordir"]')

+PYTHON2_VERSIONS = $(shell pyversions -r)
+PYTHON3_VERSIONS = $(shell py3versions -r)
+
 override_dh_auto_clean:
        # delete symlinks
        rm -f $(CURDIR)/lib/go/test/gopath/src/github.com
@@ -67,10 +70,16 @@
        ln -s /usr/share/gocode/src/github.com \
                $(CURDIR)/test/go/src/
        dh_auto_build --parallel
+       set -ex; cd lib/py && for python in $(PYTHON2_VERSIONS)
$(PYTHON3_VERSIONS); do \
+         $$python setup.py build; \
+       done
 #      jh_build thrift.jar $(CURDIR)/lib/java/src/

 override_dh_auto_install:
        dh_auto_install -- INSTALLDIRS=vendor
+       set -ex; cd lib/py && for python in $(PYTHON2_VERSIONS)
$(PYTHON3_VERSIONS); do \
+         $$python setup.py install --install-layout=deb
--root=$(CURDIR)/debian/tmp; \
+       done
 #      jh_installlibs -plibthrift-java thrift.jar
 #      jh_installjavadoc
 #      jh_depends
@@ -89,7 +98,7 @@
        dh_strip

 %:
-       dh $@ --with python2,python3,ruby,phpcomposer --install-layout=deb
--parallel
+       dh $@ --with python2,python3,ruby,phpcomposer --parallel
 #      dh $@ --with python2,javahelper,golang,ruby --install-layout=deb \
                --buildsystem=golang --parallel
 #      dh $@ --with python2,javahelper --install-layout=deb --parallel


Best regards, Adam.



-- System Information:
Debian Release: 9.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-thrift depends on:
ii  libc6       2.24-11+deb9u3
ii  libgcc1     1:6.3.0-18+deb9u1
ii  libstdc++6  6.3.0-18+deb9u1
ii  python      2.7.13-2
ii  python-six  1.10.0-3

python-thrift recommends no packages.

python-thrift suggests no packages.

-- no debconf information
diff -Nru thrift-0.11.0/debian/changelog thrift-0.11.0/debian/changelog
--- thrift-0.11.0/debian/changelog      2018-10-27 22:57:18.000000000 +0200
+++ thrift-0.11.0/debian/changelog      2018-11-14 10:19:24.000000000 +0100
@@ -1,3 +1,10 @@
+thrift (0.11.0-3+py3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Build python3 packages.
+
+ -- Adam Cecile <acec...@le-vert.net>  Wed, 14 Nov 2018 10:19:24 +0100
+
 thrift (0.11.0-3) unstable; urgency=medium
 
   * Build with latest PHP package version.
diff -Nru thrift-0.11.0/debian/python3-thrift.install 
thrift-0.11.0/debian/python3-thrift.install
--- thrift-0.11.0/debian/python3-thrift.install 1970-01-01 01:00:00.000000000 
+0100
+++ thrift-0.11.0/debian/python3-thrift.install 2018-11-14 10:19:24.000000000 
+0100
@@ -0,0 +1,2 @@
+usr/lib/python3/*-packages/*.egg-info
+usr/lib/python3/*-packages/thrift/
diff -Nru thrift-0.11.0/debian/python-thrift.install 
thrift-0.11.0/debian/python-thrift.install
--- thrift-0.11.0/debian/python-thrift.install  2015-06-13 09:26:49.000000000 
+0200
+++ thrift-0.11.0/debian/python-thrift.install  2018-11-14 10:19:24.000000000 
+0100
@@ -1,2 +1,2 @@
-usr/lib/python*/*-packages/*.egg-info
-usr/lib/python*/*-packages/thrift/
+usr/lib/python2.*/*-packages/*.egg-info
+usr/lib/python2.*/*-packages/thrift/
diff -Nru thrift-0.11.0/debian/rules thrift-0.11.0/debian/rules
--- thrift-0.11.0/debian/rules  2018-10-27 22:57:18.000000000 +0200
+++ thrift-0.11.0/debian/rules  2018-11-14 10:19:24.000000000 +0100
@@ -24,6 +24,9 @@
 
 RUBY_LIBDIR := $(shell ruby -rrbconfig -e'print RbConfig::CONFIG["vendordir"]')
 
+PYTHON2_VERSIONS = $(shell pyversions -r)
+PYTHON3_VERSIONS = $(shell py3versions -r)
+
 override_dh_auto_clean:
        # delete symlinks
        rm -f $(CURDIR)/lib/go/test/gopath/src/github.com
@@ -67,10 +70,16 @@
        ln -s /usr/share/gocode/src/github.com \
                $(CURDIR)/test/go/src/
        dh_auto_build --parallel
+       set -ex; cd lib/py && for python in $(PYTHON2_VERSIONS) 
$(PYTHON3_VERSIONS); do \
+         $$python setup.py build; \
+       done
 #      jh_build thrift.jar $(CURDIR)/lib/java/src/
 
 override_dh_auto_install:
        dh_auto_install -- INSTALLDIRS=vendor
+       set -ex; cd lib/py && for python in $(PYTHON2_VERSIONS) 
$(PYTHON3_VERSIONS); do \
+         $$python setup.py install --install-layout=deb 
--root=$(CURDIR)/debian/tmp; \
+       done
 #      jh_installlibs -plibthrift-java thrift.jar
 #      jh_installjavadoc
 #      jh_depends
@@ -89,7 +98,7 @@
        dh_strip
 
 %:
-       dh $@ --with python2,python3,ruby,phpcomposer --install-layout=deb 
--parallel
+       dh $@ --with python2,python3,ruby,phpcomposer --parallel
 #      dh $@ --with python2,javahelper,golang,ruby --install-layout=deb \
                --buildsystem=golang --parallel
 #      dh $@ --with python2,javahelper --install-layout=deb --parallel

Reply via email to