Package: python-sip
Version: 4.10.2-1
Severity: wishlist
Tags: patch

SIP supports Python3 for more than 12 month now.
It is time to enable this feature in Debian too.

See the related bug #558389 filled against python-qt4

diff -Nru sip4-qt3-4.10.2/debian/changelog sip4-qt3-4.10.2/debian/changelog
--- sip4-qt3-4.10.2/debian/changelog    2010-04-18 18:07:17.000000000 +0200
+++ sip4-qt3-4.10.2/debian/changelog    2010-04-30 00:19:13.000000000 +0200
@@ -1,3 +1,10 @@
+sip4-qt3 (4.10.2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Added python3 support
+
+ -- Per W. <debian.perf...@safersignup.com>  Thu, 29 Apr 2010 00:00:00 +0200
+
 sip4-qt3 (4.10.2-1) unstable; urgency=low
 
   * New upstream release
diff -Nru sip4-qt3-4.10.2/debian/control sip4-qt3-4.10.2/debian/control
--- sip4-qt3-4.10.2/debian/control      2010-04-15 09:24:56.000000000 +0200
+++ sip4-qt3-4.10.2/debian/control      2010-04-30 00:23:09.000000000 +0200
@@ -2,8 +2,10 @@
 Section: devel
 Priority: optional
 Maintainer: Debian Python Modules Team 
<python-modules-t...@lists.alioth.debian.org>
-Uploaders: Torsten Marek <shlo...@debian.org>, Bernd Zeimetz 
<b...@debian.org>, Michael Casadevall <mcasadev...@debian.org>
-Build-Depends: debhelper (>= 7), python-all-dev (>= 2.3.5-10), python-all-dbg, 
python-support (>= 0.7.1)
+Uploaders: Torsten Marek <shlo...@debian.org>, Bernd Zeimetz <b...@debian.org>,
+ Michael Casadevall <mcasadev...@debian.org>
+Build-Depends: debhelper (>= 7), python-all-dev (>= 2.3.5-10), python-all-dbg,
+ python-support (>= 0.7.1), python3-all-dev, python3-all-dbg
 Standards-Version: 3.8.4
 Homepage: http://www.riverbankcomputing.co.uk/software/sip/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/sip4-qt3/trunk
diff -Nru sip4-qt3-4.10.2/debian/rules sip4-qt3-4.10.2/debian/rules
--- sip4-qt3-4.10.2/debian/rules        2010-03-24 19:37:13.000000000 +0100
+++ sip4-qt3-4.10.2/debian/rules        2010-04-29 22:20:51.000000000 +0200
@@ -14,7 +14,7 @@
        CFLAGS += -O2 -g
 endif
 
-PYTHONS        := $(shell pyversions -vr debian/control)
+PYTHONS        := $(shell pyversions -vr debian/control) 3.1
 
 -include /usr/share/python/python.mk
 ifeq (,$(py_sitename))
@@ -96,7 +96,12 @@
        $(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/tmp
        $(MAKE) -C dbg-build-$* install DESTDIR=$(CURDIR)/debian/python-sip-dbg
        mkdir -p debian/python-sip/usr/lib/python$*/$(call py_sitename,$*)/
-       install -m 644 -o root -g root debian/sipconfig.py 
debian/python-sip/usr/lib/python$*/$(call py_sitename,$*)/
+       echo "$*"
+       if [ "$*" \< "3" ]; then \
+               install -m 644 -o root -g root debian/sipconfig.py 
debian/python-sip/usr/lib/python$*/$(call py_sitename,$*)/; \
+       else \
+               install -m 644 -o root -g root debian/sipconfig_py3.py 
debian/python-sip/usr/lib/python$*/$(call py_sitename,$*)/sipconfig.py; \
+       fi
        install -m 644 -o root -g root build-$*/sipconfig.py 
debian/python-sip/usr/lib/python$*/$(call py_sitename,$*)/sipconfig_nd.py
        install -m 644 -o root -g root dbg-build-$*/sipconfig.py 
debian/python-sip-dbg/usr/lib/python$*/$(call py_sitename,$*)/sipconfig_d.py
        mkdir -p debian/python-sip-dev/usr/include/python$*
diff -Nru sip4-qt3-4.10.2/debian/sipconfig_py3.py 
sip4-qt3-4.10.2/debian/sipconfig_py3.py
--- sip4-qt3-4.10.2/debian/sipconfig_py3.py     1970-01-01 01:00:00.000000000 
+0100
+++ sip4-qt3-4.10.2/debian/sipconfig_py3.py     2010-04-29 15:54:49.000000000 
+0200
@@ -0,0 +1,13 @@
+# import the sipconfig.py for the normal or the debug build
+
+import sys
+
+if getattr(sys, "pydebug", False):
+    try:
+        from sipconfig_d import *
+        from sipconfig_d import _pkg_config, _default_macros
+    except ImportError as msg:
+        raise ImportError('No module named sipconfig; package python-sip4-dbg 
not installed')
+else:
+    from sipconfig_nd import *
+    from sipconfig_nd import _pkg_config, _default_macros

Reply via email to