tags 606898 +patch
thanks

Hi Tim, hi Iustin,

Le 12.12.2010 21:24, Tim a écrit :
> Package: python-pyxattr
> Severity: wishlist
> 
> The latest version of pyxattr supports python3.  However, no package
> exists in Debian for this, so it must be built from source when
> developing for python3.  I am not aware of any other python 3.x
> compatible modules which suit my needs for accessing extended
> filesystem attributes.
> 
> Building from source for python3 is actually quite straight-forward
> and created no problems for me on Sid, so it shouldn't be too much
> trouble to add a python3-pyxattr package.

Here is a patch that creates both the python3-pyxattrs and its -dbg
flavour. It uses the dh_python3 helper and "just works" in a fresh sid
chroot.

Iustin: please consider merging and uploading a fix to this bug.
(Otherwise, no fondue for you...) :-)

Cheers,

OdyX
From 790a4aa7b69c4ae6c8bc9e3f3eed37fdf89a24ba Mon Sep 17 00:00:00 2001
From: Didier Raboud <o...@debian.org>
Date: Thu, 15 Mar 2012 14:20:20 +0100
Subject: [PATCH] Build the python3 flavours.

- Add python3-pyxattr and python3-pyxattr-dbg packages
- Use dh_python3 for the python3 packages.

Closes: #606898
Signed-off-by: Didier Raboud <o...@debian.org>
---
 debian/control |   26 ++++++++++++++++++++++++++
 debian/rules   |   14 ++++++++++++--
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index bdece6b..3efd62c 100644
--- a/debian/control
+++ b/debian/control
@@ -4,11 +4,13 @@ Priority: optional
 Maintainer: Iustin Pop <ius...@debian.org>
 Build-Depends: debhelper (>= 7),
  python-all (>= 2.6.2), python-all-dev (>= 2.6.2), python-all-dbg,
+ python3-all, python3-all-dev, python3-all-dbg,
  python-support (>= 0.6), libattr1-dev, python-setuptools, python-epydoc
 Standards-Version: 3.9.1
 Homepage: http://pyxattr.sourceforge.net/
 Vcs-Browser: http://git.k1024.org/debian-pyxattr.git
 Vcs-Git: git://git.k1024.org/debian-pyxattr.git
+X-Python3-Versions: >= 3.2
 
 Package: python-pyxattr
 Architecture: any
@@ -33,3 +35,27 @@ Description: module for manipulating filesystem extended 
attributes (debug exten
  .
  This package contains the extension built for the Python debug
  interpreter.
+
+Package: python3-pyxattr
+Architecture: any
+Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Provides: ${python3:Provides}
+Suggests: python3-pyxattr-dbg
+Description: module for manipulating filesystem extended attributes
+ pyxattr is a Python interface to the libattr library. It allows
+ manipulation of the filesystem extended attributes present in some
+ operating systems (GNU/Linux included).
+
+Package: python3-pyxattr-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Depends: python3-pyxattr (= ${binary:Version}), python3-dbg, ${shlibs:Depends},
+ ${misc:Depends}
+Description: module for manipulating filesystem extended attributes (debug 
extension)
+ pyxattr is a Python interface to the libattr library. It allows
+ manipulation of the filesystem extended attributes present in some
+ operating systems (GNU/Linux included).
+ .
+ This package contains the extension built for the Python3 debug
+ interpreter.
diff --git a/debian/rules b/debian/rules
index eb56a54..a97aab4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,8 +12,9 @@
 export DH_OPTIONS
 
 PYVERS := $(shell pyversions -vr)
+PY3VERS := $(shell py3versions -vr)
 
-build: $(PYVERS:%=build-python%) build-indep
+build: $(PYVERS:%=build-python%) $(PY3VERS:%=build-python%) build-indep
        touch $@
 
 build-python%:
@@ -32,12 +33,17 @@ clean:
        rm -rf build html
        rm -f xattr.so
        rm -f $(PYVERS:%=build-python%)
+       rm -f $(PY3VERS:%=build-python%)
        dh_clean
 
-install: build $(PYVERS:%=install-python%)
+install: build $(PYVERS:%=install-python%) $(PY3VERS:%=install-python%)
        find debian/python-pyxattr-dbg ! -type d ! -name '*_d.so' | xargs rm -f
        find debian/python-pyxattr-dbg -depth -empty -print0 | xargs -r0 rmdir
 
+install-python3%:
+       python3$* setup.py install --root $(CURDIR)/debian/python3-pyxattr 
--install-layout=deb
+       python3$*-dbg setup.py install --root 
$(CURDIR)/debian/python3-pyxattr-dbg --install-layout=deb
+
 install-python%:
        python$* setup.py install --root $(CURDIR)/debian/python-pyxattr 
--install-layout=deb
        python$*-dbg setup.py install --root 
$(CURDIR)/debian/python-pyxattr-dbg --install-layout=deb
@@ -49,11 +55,15 @@ binary-arch: build install
        dh_installchangelogs
        dh_installdocs
        dh_strip -ppython-pyxattr --dbg-package=python-pyxattr-dbg
+       dh_strip -ppython3-pyxattr --dbg-package=python3-pyxattr-dbg
        rm -rf debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
        ln -s python-pyxattr 
debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
+       rm -rf debian/python3-pyxattr-dbg/usr/share/doc/python3-pyxattr-dbg
+       ln -s python3-pyxattr 
debian/python3-pyxattr-dbg/usr/share/doc/python3-pyxattr-dbg
        dh_compress -X.js
        dh_fixperms
        dh_pysupport
+       dh_python3
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
-- 
1.7.2.5

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to