* Torsten Werner <twer...@debian.org>, 2010-03-21, 10:49:
Hi,

On Sat, Mar 20, 2010 at 7:37 PM, Jakub Wilk <jw...@debian.org> wrote:
- Ideally, a package which builds Python extensions should build them for
all supported Python version.

I have enabled python 2.6 in libavg and it fails on mipsel now:
<https://buildd.debian.org/fetch.cgi?pkg=libavg&arch=mipsel&ver=0.8.0-7&stamp=1269129029&file=log&as=raw>.

dh_pycentral -ppython-libavg
pycentral: pycentral debhelper: both directories site-packages and
dist-packages exist for python2.6.
pycentral debhelper: both directories site-packages and dist-packages
exist for python2.6.
dh_pycentral: pycentral debhelper python-libavg debian/python-libavg
returned exit code 1

Do you have an idea what is wrong here?

I'm not entirely sure what is happening here, but I have some clues. The most important part of diff between mips (good) and mipsel (failed) builds is:

 checking for SWSCALE_LIBS... -lswscale
 checking for python version... 2.6
 checking for python platform... linux2
-checking for python script directory... ${prefix}/lib/python2.6/site-packages
-checking for python extension module directory... 
${exec_prefix}/lib/python2.6/site-packages
+checking for python script directory... ${prefix}/lib/python2.6/dist-packages
+checking for python extension module directory... 
${exec_prefix}/lib/python2.6/dist-packages
 checking for headers required to compile python extensions... found
 checking for libpython2.6... found
 checking whether the compiler implements namespaces... yes

(I don't known where does this difference come from. But, oh well, running aclocal and company at build time is always a risky business.)

Normally it doesn't matter that much if you install files to pyhton2.6/site-packages or python2.6/dist-packages, as python-central will move the former one to the latter anyway.

However, in your debian/rules you also install files directly into python2.6/site-packages, and python-central is confused if there are files in both directories.

The attached patch should make the problem go away.

BTW While comparing build logs I saw some scary things, like failing tests. You should probably take a look at that.

--
Jakub Wilk
diff -u libavg-0.8.0/debian/rules libavg-0.8.0/debian/rules
--- libavg-0.8.0/debian/rules
+++ libavg-0.8.0/debian/rules
@@ -27,7 +27,7 @@
 debian/stamp-install%:
 	-make -C build$*/src check SUBDIRS="$(CHECK_DIRS)"
 	make -C build$* install DESTDIR=$(DEB_DESTDIR)
-	dh_install debian/libavg.pth /usr/lib/python$*/site-packages/
+	dh_install debian/libavg.pth /usr/lib/python$*/*-packages/
 	rmdir -p --ignore-fail-on-non-empty $(DEB_DESTDIR)/usr/share/avg
 	mv $(DEB_DESTDIR)/usr/bin/avg_showfont.py \
 	  $(DEB_DESTDIR)/usr/bin/avg_showfont

Reply via email to