Package: python-clearsilver
Version: 0.10.4-1
Severity: normal

While trying to get the trac development tree to work, I run into a bug
in the python-clearsilver package. Namely, the module is built against 
python2.4 but also installed as a python2.5 package: 

[EMAIL PROTECTED]:~$ python2.5 -c 'import neo_cgi'
-c:1: RuntimeWarning: Python C API version mismatch for module neo_util:
This Python has API version 1013, module neo_util has version 1012.
-c:1: RuntimeWarning: Python C API version mismatch for module neo_cs:
This Python has API version 1013, module neo_cs has version 1012.
-c:1: RuntimeWarning: Python C API version mismatch for module neo_cgi:
This Python has API version 1013, module neo_cgi has version 1012.


The reason is that the package just installs the python module that was 
generated by the upstream build, without adapting it for the different
python version. The attached patch fixes that (while I would agree that
the solution is not perfect):

transit:/home/torsten# dpkg -i python-clearsilver_0.10.4-1.1_i386.deb 
(Reading database ... 381032 files and directories currently installed.)
Preparing to replace python-clearsilver 0.10.4-1 (using
python-clearsilver_0.10.4-1.1_i386.deb) ...
Unpacking replacement python-clearsilver ...
Setting up python-clearsilver (0.10.4-1.1) ...

[EMAIL PROTECTED]:~$ python2.5 -c 'import neo_cgi'
[EMAIL PROTECTED]:~$ 

Thanks for considering, 

  Torsten Landschoff


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23-rc3 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-clearsilver depends on:
ii  libc6                   2.6.1-6          GNU C Library: Shared libraries
ii  zlib1g                  1:1.2.3.3.dfsg-7 compression library - runtime

python-clearsilver recommends no packages.

-- no debconf information
diff -u clearsilver-0.10.4/debian/rules clearsilver-0.10.4/debian/rules
--- clearsilver-0.10.4/debian/rules
+++ clearsilver-0.10.4/debian/rules
@@ -44,6 +44,9 @@
 
 build-python-%:
 	install -d debian/tmp/usr/lib/python$*/site-packages
+	make -C $(DEB_BUILDDIR)/python distclean
+	make -C $(DEB_BUILDDIR)/python \
+		PYTHON=/usr/bin/python$* PYTHON_INC=/usr/include/python$*
 	install -m644 $(DEB_BUILDDIR)/python/neo_cgi.so \
     	    debian/tmp/usr/lib/python$*/site-packages/neo_cgi.so
 
diff -u clearsilver-0.10.4/debian/changelog clearsilver-0.10.4/debian/changelog
--- clearsilver-0.10.4/debian/changelog
+++ clearsilver-0.10.4/debian/changelog
@@ -1,3 +1,10 @@
+clearsilver (0.10.4-1.1) unstable; urgency=low
+
+  * debian/rules: Build python bindings for each python version (instead
+    of using the same binary for all python versions).
+
+ -- Torsten Landschoff <[EMAIL PROTECTED]>  Sat, 24 Nov 2007 01:31:31 +0100
+
 clearsilver (0.10.4-1) unstable; urgency=low
 
   * New upstream release

Reply via email to