[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#672553: marked as done (pykde4: Add Python 3 support)



Your message dated Mon, 21 May 2012 09:49:36 +0000
with message-id <E1SWPFA-0003vL-TD@franck.debian.org>
and subject line Bug#672553: fixed in pykde4 4:4.7.4-3
has caused the Debian Bug report #672553,
regarding pykde4: Add Python 3 support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
672553: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672553
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: pykde4
Version: 4:4.7.4-2
Severity: wishlist
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch quantal

pykde4 already supports Python 3 in the upstream code.  Making this
available would be a simple matter of packaging.

Well ... almost.  There are a couple of things that complicate it.
Firstly, there's a patch from newer upstream releases to fix building
with >= 3.2.  Secondly, a bug in kdelibs5-dev (which I've filed
separately as #672552) causes a build failure; I worked around that by
shipping a local cut-down copy of PythonMacros.cmake, which I reckoned
would be temporarily acceptable because the resulting file is so short.

I've tested this by running a Python 3 port of the Ubuntu installer's
KDE frontend with it, and everything appears to be working fine.  I
built my test packages on Ubuntu rather than Debian because I ran into
#671893 and couldn't readily fix that, but I hope it will still be OK
once that's fixed.

  * Add Python 3 support.

diff --git a/debian/control b/debian/control
index 51ac67f..d634f34 100644
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,9 @@ Build-Depends: kde-sc-dev-latest (>= 4:4.7.4),
  libphonon-dev (>= 4:4.6.0really4.4.4), libsoprano-dev (>= 2.7.0),
  libqt4-dev (>= 4:4.7.1), libqt4-opengl-dev (>= 4:4.7.1), libqtwebkit-dev,
  libboost-dev, shared-desktop-ontologies (>= 0.8),
- python, python-all-dev, python-sip-dev (>= 4.12.0),
- python-qt4 (>= 4.8.3-3~), python-qt4-dev (>= 4.8.3-3~)
+ python, python-all-dev, python3-all-dev,
+ python-sip-dev (>= 4.12.0), python3-sip-dev,
+ python-qt4 (>= 4.8.3-3~), python3-pyqt4, python-qt4-dev (>= 4.8.3-3~)
 Uploaders: Sune Vuorela <sune@debian.org>, Modestas Vainius <modax@debian.org>, Michael Meskes <meskes@debian.org>
 Standards-Version: 3.9.2
 X-Python-Version: >= 2.5
@@ -89,3 +90,50 @@ Description: debugging symbols for the PyKDE bindings
  are experiencing crashes of the PyKDE application and wish to report a problem
  to the developers.
 
+Package: python3-kde4
+Architecture: any
+Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends},
+ python3-pyqt4, ${sip:Depends}, python3-sip
+Provides: ${python3:Provides}
+Description: Python 3 bindings for the KDE Development Platform
+ This package contains PyKDE, the Python 3 bindings for the KDE
+ libraries, that allow you to write KDE programs using Python 3 instead of
+ C++. It contains at least the following modules under the
+ PyKDE namespace:
+ .
+  * dnssd
+  * kdecore
+  * kdeui
+  * khtml
+  * kio
+  * knewstuff
+  * kparts
+  * kterminal
+  * ktexteditor
+  * kutils
+  * nepomuk
+  * plasma
+  * solid
+ .
+ And a few KDE related technologies like:
+ .
+  * akonadi
+  * phonon
+  * soprano
+ .
+ This package provides modules for all supported Python 3 versions.
+
+Package: python3-kde4-dbg
+Section: debug
+Architecture: any
+Priority: extra
+Depends: ${misc:Depends}, kdelibs5-dbg, python3-kde4 (= ${binary:Version})
+Recommends: python3-pyqt4-dbg
+Breaks: kdebindings-dbg
+Replaces: kdebindings-dbg
+Description: debugging symbols for the PyKDE bindings
+ This package contains debugging files used to investigate problems with
+ Python 3 bindings for the KDE Development Platform. Install this package if
+ you are experiencing crashes of the PyKDE application and wish to report a
+ problem to the developers.
+
diff --git a/debian/patches/cmake_no_bytecode.diff b/debian/patches/cmake_no_bytecode.diff
new file mode 100644
index 0000000..ab90706
--- /dev/null
+++ b/debian/patches/cmake_no_bytecode.diff
@@ -0,0 +1,31 @@
+Index: b/cmake/modules/PythonMacros.cmake
+===================================================================
+--- /dev/null
++++ b/cmake/modules/PythonMacros.cmake
+@@ -0,0 +1,26 @@
++# Python macros
++# ~~~~~~~~~~~~~
++# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
++# Cloned-and-hacked by Colin Watson <cjwatson@ubuntu.com>, removing bytecode
++# support.
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++#
++# This file defines the following macros:
++#
++# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR)
++#     Install the SOURCE_FILE, which is a Python .py file, into the
++#     destination directory during install.
++
++GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE}  PATH)
++
++MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR)
++
++  FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH})
++
++  ADD_CUSTOM_TARGET(compile_python_files ALL)
++
++  # Install the source file.
++  INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
++ENDMACRO(PYTHON_INSTALL)
diff --git a/debian/patches/python32_compile_fix.diff b/debian/patches/python32_compile_fix.diff
new file mode 100644
index 0000000..5440477
--- /dev/null
+++ b/debian/patches/python32_compile_fix.diff
@@ -0,0 +1,21 @@
+Description: Compile fix for Python 3.2 and higher
+Author: Simon Edwards <simon@simonzone.com>
+Origin: upstream, https://projects.kde.org/projects/kde/kdebindings/pykde4/repository/revisions/54bd6a7628e04efe5e1de53075227713f2526acf
+Last-Update: 2012-05-08
+
+Index: b/sip/kio/kfileitem.sip
+===================================================================
+--- a/sip/kio/kfileitem.sip
++++ b/sip/kio/kfileitem.sip
+@@ -236,7 +236,11 @@
+         
+         len = sipCpp->count();
+         
++#if PY_VERSION_HEX >= 0x03020000
++        if (PySlice_GetIndicesEx(a0, len, &start, &stop, &step, &slicelength) < 0)
++#else
+         if (PySlice_GetIndicesEx((PySliceObject *)a0, len, &start, &stop, &step, &slicelength) < 0)
++#endif
+             sipIsErr = 1;
+         else
+         {
diff --git a/debian/patches/series b/debian/patches/series
index 0474e82..04bb536 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,5 @@ fix_kpythonpluginfactory_build.diff
 make_pykde4_respect_sip_flags.diff
 pythonpluginfactory_use_versioned_python_lib.diff
 optional_install_sip_files.diff
+python32_compile_fix.diff
+cmake_no_bytecode.diff
diff --git a/debian/python-kde4.install b/debian/python-kde4.install
index bb19869..824bdd6 100644
--- a/debian/python-kde4.install
+++ b/debian/python-kde4.install
@@ -1,6 +1,6 @@
 usr/lib/kde4/kpythonpluginfactory.so
-usr/lib/python*/*-packages/PyKDE4/*.so
-usr/lib/python*/*-packages/PyKDE4/__init__.py
-usr/lib/python*/*-packages/PyKDE4/pykdeconfig.py
-usr/lib/python*/*-packages/PyQt4/uic/pykdeuic4.py
-usr/lib/python*/*-packages/PyQt4/uic/widget-plugins/kde4.py
+usr/lib/python2.*/*-packages/PyKDE4/*.so
+usr/lib/python2.*/*-packages/PyKDE4/__init__.py
+usr/lib/python2.*/*-packages/PyKDE4/pykdeconfig.py
+usr/lib/python2.*/*-packages/PyQt4/uic/pykdeuic4.py
+usr/lib/python2.*/*-packages/PyQt4/uic/widget-plugins/kde4.py
diff --git a/debian/python3-kde4.docs b/debian/python3-kde4.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/python3-kde4.docs
@@ -0,0 +1 @@
+README
diff --git a/debian/python3-kde4.install b/debian/python3-kde4.install
new file mode 100644
index 0000000..3367644
--- /dev/null
+++ b/debian/python3-kde4.install
@@ -0,0 +1,5 @@
+usr/lib/python3/*-packages/PyKDE4/*.so
+usr/lib/python3/*-packages/PyKDE4/__init__.py
+usr/lib/python3/*-packages/PyKDE4/pykdeconfig.py
+usr/lib/python3/*-packages/PyQt4/uic/pykdeuic4.py
+usr/lib/python3/*-packages/PyQt4/uic/widget-plugins/kde4.py
diff --git a/debian/rules b/debian/rules
index 90db410..e637de3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
 #! /usr/bin/make -f
 
-dh = --with=python2
+dh = --with=python2,python3
 
 include /usr/share/pkg-kde-tools/qt-kde-team/2/debian-qt-kde.mk
 
@@ -8,6 +8,7 @@ pyversions = $(shell pyversions -vr)
 pydefaultversion = $(shell pyversions -vd)
 pyshared_nondefault = $(foreach v,$(filter-out $(pydefaultversion),$(pyversions)),\
     usr/lib/pyshared/python$v/PyKDE4 usr/lib/python$v/dist-packages/PyKDE4)
+py3versions = $(shell py3versions -vr)
 
 define nl
 
@@ -20,16 +21,24 @@ override_dh_auto_configure:
 	    -DPYTHON_EXECUTABLE=/usr/bin/python$v \
 	    -DDEFAULT_PYTHON_VERSION=$(if $(filter $(pydefaultversion),$v),true,false) \
 	    $(nl))
+	$(foreach v,$(py3versions),$(overridden_command) --builddirectory=builddir-$v -- \
+	    -DPYTHON_EXECUTABLE=/usr/bin/python$v \
+	    -DPYTHON_LIBRARY=/usr/lib/libpython${v}mu.so \
+	    -DPYTHON_SITE_PACKAGES_INSTALL_DIR=/usr/lib/python3/dist-packages \
+	    -DDEFAULT_PYTHON_VERSION=false \
+	    $(nl))
 
 override_dh_auto_build override_dh_auto_install override_dh_auto_test override_dh_auto_clean:
 	$(foreach v,$(pyversions),$(overridden_command) --builddirectory=builddir-$v $(nl))
+	$(foreach v,$(py3versions),$(overridden_command) --builddirectory=builddir-$v $(nl))
 
 override_dh_python2:
 	$(overridden_command)
 	dh_sip -ppython-kde4
 
 override_dh_strip:
-	$(overridden_command) --dbg-package=python-kde4-dbg
+	$(overridden_command) -ppython-kde4 --dbg-package=python-kde4-dbg
+	$(overridden_command) -ppython3-kde4 --dbg-package=python3-kde4-dbg
 
 override_dh_shlibdeps:
 	if [ -d debian/python-kde4 ]; then \

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



--- End Message ---
--- Begin Message ---
Source: pykde4
Source-Version: 4:4.7.4-3

We believe that the bug you reported is fixed in the latest version of
pykde4, which is due to be installed in the Debian FTP archive:

pykde4_4.7.4-3.debian.tar.gz
  to main/p/pykde4/pykde4_4.7.4-3.debian.tar.gz
pykde4_4.7.4-3.dsc
  to main/p/pykde4/pykde4_4.7.4-3.dsc
python-kde4-dbg_4.7.4-3_i386.deb
  to main/p/pykde4/python-kde4-dbg_4.7.4-3_i386.deb
python-kde4-dev_4.7.4-3_all.deb
  to main/p/pykde4/python-kde4-dev_4.7.4-3_all.deb
python-kde4-doc_4.7.4-3_all.deb
  to main/p/pykde4/python-kde4-doc_4.7.4-3_all.deb
python-kde4_4.7.4-3_i386.deb
  to main/p/pykde4/python-kde4_4.7.4-3_i386.deb
python3-pykde4-dbg_4.7.4-3_i386.deb
  to main/p/pykde4/python3-pykde4-dbg_4.7.4-3_i386.deb
python3-pykde4_4.7.4-3_i386.deb
  to main/p/pykde4/python3-pykde4_4.7.4-3_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 672553@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Scott Kitterman <scott@kitterman.com> (supplier of updated pykde4 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 20 May 2012 16:06:19 -0400
Source: pykde4
Binary: python-kde4 python-kde4-dev python-kde4-doc python-kde4-dbg python3-pykde4 python3-pykde4-dbg
Architecture: source i386 all
Version: 4:4.7.4-3
Distribution: unstable
Urgency: low
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Changed-By: Scott Kitterman <scott@kitterman.com>
Description: 
 python-kde4 - Python bindings for the KDE Development Platform
 python-kde4-dbg - debugging symbols for the PyKDE bindings
 python-kde4-dev - UIC compiler and SIP files for PyKDE
 python-kde4-doc - documentation and examples for PyKDE
 python3-pykde4 - Python 3 bindings for the KDE Development Platform
 python3-pykde4-dbg - debugging symbols for PyKDE bindings for Python 3
Closes: 672553
Changes: 
 pykde4 (4:4.7.4-3) unstable; urgency=low
 .
   * Team upload.
   * Add new binary python3-pykde for Python 3 support (Closes: #672553)
     - Adjust debian/rules
     - Add debian/patches/python32_compile_fix.diff to support building with
       python3.2
     - Bump build-dep version for kde4libs to 4:4.7.4-6 due to patch added in
       that revision to support building with Python 3
     - Add Python 3 equivalent packages to build-depends
     - Thanks to Colin Watson for the patch
   * Bump standards version to 3.9.3 without further change
Checksums-Sha1: 
 5a85e8d840045fcd8c6c64e65871e36fa18fb028 2065 pykde4_4.7.4-3.dsc
 297c908e764179a86a7af0827f46d41400a0caae 19274 pykde4_4.7.4-3.debian.tar.gz
 617ceef35e4577e1d482250daaa022ce0d3339dc 12549882 python-kde4_4.7.4-3_i386.deb
 008ecd621e57a7d7a4ebd9c3feae8e44705f547a 375532 python-kde4-dev_4.7.4-3_all.deb
 375d9437d686eedfad48e15df12b0c033ce4f2b5 2626422 python-kde4-doc_4.7.4-3_all.deb
 4c6c034b9fb9f95a0ec96bc26f54d5852e892c07 54393406 python-kde4-dbg_4.7.4-3_i386.deb
 d119864d212f762faca73f72e8bf4668d3d2eb31 6270522 python3-pykde4_4.7.4-3_i386.deb
 3ef915895a514255ad34cab65acd9987b73a43bd 27123524 python3-pykde4-dbg_4.7.4-3_i386.deb
Checksums-Sha256: 
 bdda2f0ee17efa9feda557133edb61fd4211087495b06d2d2a8fcf309a68e818 2065 pykde4_4.7.4-3.dsc
 4dfd0ffa6e45d76bc00b17cf85d3a359f69828632d22e717bfb7a4cdf0ee2c0b 19274 pykde4_4.7.4-3.debian.tar.gz
 8413b94c79c78636dedecbe9463baaa4327978cb37a919dff5eb218b089383d0 12549882 python-kde4_4.7.4-3_i386.deb
 4451d431b9e45eaaa54d9716d43aea42ddc5927f4f713b5752d08bb6c6068daf 375532 python-kde4-dev_4.7.4-3_all.deb
 e27e328a00ee7837770c2d23ecca9b4e8b758ee43669b1874b1f2fedc8acca14 2626422 python-kde4-doc_4.7.4-3_all.deb
 1d03e11184eccb72149116e13e93c28a4fd0c4ba4cf64a7511b5709e6067c145 54393406 python-kde4-dbg_4.7.4-3_i386.deb
 aa06239fcdc92bf37150a342a9b02dd9cac9216d850846b806ec928f66d744d4 6270522 python3-pykde4_4.7.4-3_i386.deb
 a51b9ac61637aab04787b6c109c5f9658792fef1e0bfdb00e1e94263bf2d1f5a 27123524 python3-pykde4-dbg_4.7.4-3_i386.deb
Files: 
 ef1ba57830d0ad281748d790e801dbbe 2065 python optional pykde4_4.7.4-3.dsc
 c94b569f3b4ee38eaef881a16f39cc75 19274 python optional pykde4_4.7.4-3.debian.tar.gz
 63d774d892ac021e22cd6def95cd5316 12549882 python optional python-kde4_4.7.4-3_i386.deb
 af124e88429aae9d975f8943d471a3f0 375532 python optional python-kde4-dev_4.7.4-3_all.deb
 420b0ab8e966d9e961126b240f93a60d 2626422 doc optional python-kde4-doc_4.7.4-3_all.deb
 c710bbbf7c7ac8abdf626645390cb037 54393406 debug extra python-kde4-dbg_4.7.4-3_i386.deb
 cd2146f7edc490d531a1c9cde5c4a2a1 6270522 python optional python3-pykde4_4.7.4-3_i386.deb
 3b53a09939dd1840aea11981db43d25e 27123524 debug extra python3-pykde4-dbg_4.7.4-3_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk+5zokACgkQHajaM93NaGopZACfSzAcIJEaRLyu2KKtHlAkgh9y
koUAn3WzA3sJqHMLD0jRIUU9v/+MqVj7
=zdpa
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: