Package: pyparted Version: 3.6-6 Severity: normal Tags: patch
Please provide a Python 3 binding of pyparted. Building 3.6 with Python 3 support caused a build failure. The upstream changelog showed changes regarding Python 3. I therefore updated the package to the latest release (3.10) and was able to successfully build a Python 3 module. A working patch is attched. The patch just covers the diff for the debian directory.
diff --git a/debian/changelog b/debian/changelog index caa9156..40572fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +pyparted (3.10-1) UNRELEASED; urgency=medium + + * New upstream release. + * Switch to pybuild. + * Add Python 3 support. + + -- Benjamin Drung <benjamin.dr...@profitbricks.com> Fri, 11 Apr 2014 14:56:24 +0200 + pyparted (3.6-6) unstable; urgency=low [ Tim Gardner ] diff --git a/debian/control b/debian/control index 270e807..6406487 100644 --- a/debian/control +++ b/debian/control @@ -3,9 +3,10 @@ Section: python Priority: optional Maintainer: Parted Maintainer Team <parted-maintain...@lists.alioth.debian.org> Uploaders: Luca Falavigna <dktrkr...@debian.org>, Colin Watson <cjwat...@debian.org> -Build-Depends: debhelper (>= 7.0.50~), python-all-dev (>= 2.6.6-13~), python-all-dbg (>= 2.6.6-13~), pkg-config, libparted0-dev (>= 2.3), dh-autoreconf +Build-Depends: debhelper (>= 7.0.50~), python-all-dev (>= 2.6.6-13~), python-all-dbg (>= 2.6.6-13~), pkg-config, libparted0-dev (>= 2.3), python3-all-dev, python3-all-dbg Standards-Version: 3.9.2 X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.0 Homepage: http://fedorahosted.org/pyparted/ Vcs-Git: git://git.debian.org/git/parted/debian/pyparted.git Vcs-Browser: http://git.debian.org/?p=parted/debian/pyparted.git @@ -32,3 +33,14 @@ Description: Python interface for libparted - Debugging symbols library for disk partitioning and file system manipulation. . This package contains debugging symbols. + +Package: python3-parted +Architecture: any +Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends} +Provides: ${python3:Provides} +Description: Python 3 interface for libparted + pyparted is a set of Python modules that provide Python programmers an + interface to libparted (http://www.gnu.org/software/parted), the GNU parted + library for disk partitioning and file system manipulation. + . + This package contains Python 3 extension itself. diff --git a/debian/patches/py26.patch b/debian/patches/py26.patch deleted file mode 100644 index 2bc2667..0000000 --- a/debian/patches/py26.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Enable support for python2.6 -Author: Luca Falavigna <dktrkr...@debian.org> -Bug: http://bugs.debian.org/642545 -Forwarded: not-needed - -Index: pyparted/configure.ac -=================================================================== ---- pyparted.orig/configure.ac 2011-09-24 01:05:14.616973338 +0200 -+++ pyparted/configure.ac 2011-09-24 01:07:24.116977306 +0200 -@@ -19,7 +19,7 @@ - dnl Red Hat Author(s): David Cantrell <dcantr...@redhat.com> - - m4_define(libparted_required_version, 2.3) --m4_define(python_required_version, 2.7) -+m4_define(python_required_version, 2.6) - - AC_PREREQ(2.59) - AC_INIT([pyparted], [3.6], [pyparted-de...@redhat.com]) diff --git a/debian/patches/series b/debian/patches/series index f9703da..74ae2f7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ -py26.patch no-last-flag-check.patch diff --git a/debian/rules b/debian/rules index e4527af..df987a7 100755 --- a/debian/rules +++ b/debian/rules @@ -1,36 +1,6 @@ #!/usr/bin/make -f -PYTHONS := $(shell pyversions -vr debian/control) +export PYBUILD_NAME=parted %: - dh $@ --with python2,autoreconf - -clean: - rm -fr build - dh $@ - -override_dh_auto_configure: - set -e; for pyvers in ${PYTHONS}; do \ - mkdir -p build/py$$pyvers; cp -Rl `ls . | grep -v build | grep -v debian` build/py$$pyvers;\ - (cd build/py$$pyvers && ./configure --prefix=/usr PYTHON=/usr/bin/python$$pyvers); \ - mkdir -p build/py$$pyvers-dbg; cp -Rl `ls . | grep -v build | grep -v debian` build/py$$pyvers-dbg; \ - (cd build/py$$pyvers-dbg && ./configure --prefix=/usr PYTHON=/usr/bin/python$$pyvers-dbg CFLAGS="-g -ggdb "); \ - done - -override_dh_auto_build: - set -e; for pyvers in ${PYTHONS}; do \ - $(MAKE) -C build/py$$pyvers/; \ - $(MAKE) -C build/py$$pyvers-dbg/; \ - done - -override_dh_auto_install: - set -e; for pyvers in ${PYTHONS}; do \ - $(MAKE) -C build/py$$pyvers/ install DESTDIR=$(CURDIR)/debian/python-parted; \ - $(MAKE) -C build/py$$pyvers-dbg/ install DESTDIR=$(CURDIR)/debian/python-parted-dbg; \ - (cd $(CURDIR)/debian/python-parted-dbg/usr/lib/python$$pyvers/*-packages && mv _pedmodule.so _pedmodule_d.so); \ - done - find $(CURDIR)/debian/python-parted -name "*.la" -delete - find $(CURDIR)/debian/python-parted-dbg -name "*parted" -exec rm -fr {} + - -override_dh_strip: - dh_strip --dbg-package=python-parted-dbg -X_pedmodule_d.so + dh $@ --buildsystem pybuild --with python2,python3