Package: python-apsw Version: 3.7.6.3-r1-1 Followup-For: Bug #706992 Hi,
I've attached a debdiff for building Python 3 packages. It also fixes bug #710049. Please let me know if that's acceptable, or if you would like me to make any changes. Best, Nikolaus -- System Information: Debian Release: 7.1 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-apsw depends on: ii libc6 2.13-38 ii libsqlite3-0 3.7.17-1 ii python 2.7.3-4 ii python2.6 2.6.8-1.1 ii python2.7 2.7.3-6 python-apsw recommends no packages. Versions of packages python-apsw suggests: pn python-apsw-doc <none> -- no debconf information
diff -Nru python-apsw-3.7.16.1-r1/debian/changelog python-apsw-3.7.16.1-r1/debian/changelog --- python-apsw-3.7.16.1-r1/debian/changelog 2013-03-31 12:27:17.000000000 -0700 +++ python-apsw-3.7.16.1-r1/debian/changelog 2013-06-15 13:40:17.000000000 -0700 @@ -1,3 +1,10 @@ +python-apsw (3.7.16.1-r1-2) UNRELEASED; urgency=low + + * Also build Python 3 package. Closes: #706992 + * Tighten build depends on libsqlite3-dev. Closes: #71004 + + -- Nikolaus Rath <nikol...@rath.org> Sat, 15 Jun 2013 13:16:55 -0700 + python-apsw (3.7.16.1-r1-1) unstable; urgency=low * New upstream release 3.7.16.1-r1 diff -Nru python-apsw-3.7.16.1-r1/debian/control python-apsw-3.7.16.1-r1/debian/control --- python-apsw-3.7.16.1-r1/debian/control 2013-03-31 12:27:17.000000000 -0700 +++ python-apsw-3.7.16.1-r1/debian/control 2013-06-15 13:35:46.000000000 -0700 @@ -1,8 +1,11 @@ Source: python-apsw +X-Python3-Version: >= 3.0 Section: python Priority: optional Maintainer: Joel Rosdahl <j...@debian.org> -Build-Depends: debhelper (>= 8), python-all-dev (>= 2.6.6-3~), python-all-dbg, libsqlite3-dev (>= 3.7.5), dpkg-dev (>= 1.16.1~) +Build-Depends: debhelper (>= 8), python-all-dev (>= 2.6.6-3~), python-all-dbg, + python3-all-dev, python3-all-dbg, libsqlite3-dev (>= 3.7.16), + dpkg-dev (>= 1.16.1~) Standards-Version: 3.9.4 X-Python-Version: all @@ -34,6 +37,36 @@ . This package contains the extension built for the Python debug interpreter. + +Package: python3-apsw +Architecture: any +Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} +Suggests: python-apsw-doc +Provides: ${python:Provides} +Description: another Python SQLite 3 wrapper (Python 3 version) + APSW (Another Python SQLite Wrapper) is an SQLite 3 wrapper that + provides the thinnest layer over SQLite 3 possible. Everything you + can do from the C API to SQLite 3, you can do from Python. Although + APSW's API looks vaguely similar to Python's DB-API, it is not + compliant with that API and instead works the way SQLite 3 does. + . + This package contains the extension built for Python 3. + +Package: python3-apsw-dbg +Section: debug +Priority: extra +Architecture: any +Depends: python3-apsw (= ${binary:Version}), python3-dbg, ${shlibs:Depends}, ${misc:Depends} +Description: another Python 3 SQLite 3 wrapper (debug extension) + APSW (Another Python SQLite Wrapper) is an SQLite 3 wrapper that + provides the thinnest layer over SQLite 3 possible. Everything you + can do from the C API to SQLite 3, you can do from Python. Although + APSW's API looks vaguely similar to Python's DB-API, it is not + compliant with that API and instead works the way SQLite 3 does. + . + This package contains the extension built for the Python 3 debug + interpreter. + Package: python-apsw-doc Section: doc Architecture: all diff -Nru python-apsw-3.7.16.1-r1/debian/python3-apsw.install python-apsw-3.7.16.1-r1/debian/python3-apsw.install --- python-apsw-3.7.16.1-r1/debian/python3-apsw.install 1969-12-31 16:00:00.000000000 -0800 +++ python-apsw-3.7.16.1-r1/debian/python3-apsw.install 2013-06-15 13:20:36.000000000 -0700 @@ -0,0 +1 @@ +usr/lib/python3* diff -Nru python-apsw-3.7.16.1-r1/debian/python-apsw.install python-apsw-3.7.16.1-r1/debian/python-apsw.install --- python-apsw-3.7.16.1-r1/debian/python-apsw.install 1969-12-31 16:00:00.000000000 -0800 +++ python-apsw-3.7.16.1-r1/debian/python-apsw.install 2013-06-15 13:20:55.000000000 -0700 @@ -0,0 +1 @@ +usr/lib/python2* diff -Nru python-apsw-3.7.16.1-r1/debian/rules python-apsw-3.7.16.1-r1/debian/rules --- python-apsw-3.7.16.1-r1/debian/rules 2013-03-31 12:27:17.000000000 -0700 +++ python-apsw-3.7.16.1-r1/debian/rules 2013-06-15 13:34:45.000000000 -0700 @@ -3,7 +3,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE = 1 -PYVERS = $(shell pyversions -r debian/control) +PYVERS=$(shell pyversions -r) $(shell py3versions -r) DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk @@ -12,17 +12,12 @@ build-arch: build-stamp build-indep: build-stamp -build-stamp: $(PYVERS:%=build-ext-%-stamp) $(PYVERS:%=dbg-build-ext-%-stamp) +build-stamp: $(PYVERS:%=build-ext-%-stamp) $(PYVERS:%=build-ext-%-dbg-stamp) touch $@ build-ext-%-stamp: dh_testdir - $* setup.py build --enable=load_extension - touch $@ - -dbg-build-ext-%-stamp: - dh_testdir - $*-dbg setup.py build -g --enable=load_extension + $* setup.py build -g --enable=load_extension touch $@ clean: @@ -34,7 +29,7 @@ rm -f src/shell.c dh_clean -install: build install-prereq $(PYVERS:%=install-ext-%) $(PYVERS:%=dbg-install-ext-%) +install: build install-prereq $(PYVERS:%=install-ext-%) $(PYVERS:%=install-ext-%-dbg) install-prereq: dh_testdir @@ -43,13 +38,8 @@ dh_installdirs install-ext-%: - $* setup.py install --root=debian/python-apsw --install-layout=deb - find debian/python-apsw -name '*.pyc' | xargs rm -f - -dbg-install-ext-%: - $*-dbg setup.py install --root=debian/python-apsw-dbg --install-layout=deb - find debian/python-*-dbg ! -type d ! -name '*.so' | xargs rm -f - find debian/python-*-dbg -depth -empty -exec rmdir {} \; + $* setup.py install --force --root=debian/tmp \ + --no-compile -O0 --install-layout=deb # Build architecture-independent files here. binary-indep: @@ -85,10 +75,27 @@ dh_installdocs -a debian/NEWS.Debian dh_python2 -a + dh_python3 -a + + dh_install + + # Install debugging extension and remove from regular package + (cd debian/python-apsw; \ + find . -name "*_d.so" -printf "%P\0" -delete) \ + | xargs -0 dh_install --autodest -ppython-apsw-dbg + + (cd debian/python3-apsw; \ + find . -regextype posix-egrep -regex ".+-[a-z0-9]*d[a-z]*.so" \ + -printf "%P\0" -delete) \ + | xargs -0 dh_install --autodest -ppython3-apsw-dbg + dh_installchangelogs -a dh_strip -ppython-apsw --dbg-package=python-apsw-dbg + dh_strip -ppython3-apsw --dbg-package=python3-apsw-dbg rm -rf debian/python-apsw-dbg/usr/share/doc/python-apsw-dbg ln -s python-apsw debian/python-apsw-dbg/usr/share/doc/python-apsw-dbg + rm -rf debian/python3-apsw-dbg/usr/share/doc/python3-apsw-dbg + ln -s python3-apsw debian/python3-apsw-dbg/usr/share/doc/python3-apsw-dbg dh_compress -a dh_fixperms -a dh_installdeb -a