* Olly Betts <o...@survex.com>, 2011-11-15, 21:47:
If there's software which is actually using the bindings with Python 3, I'm happy to try to add a package (even happier to apply patches to do so...)
Sphinx >= 1.1 (which I plan to upload to experimental soon) supports Python 3 and can use Xapian as search engine for so called "web support":
http://sphinx.pocoo.org/web/quickstart.html#websupportquickstart

Can it do both at once though - i.e. use Xapian while running under Python 3?

In theory, yes. I doubt that anybody tested this in practice (which might mean it doesn't work at all).

In fact, my main motivation for python3-xapian in Debian is to be able to run full Sphinx test suite with Python 3.

Given the current rough edges to Xapian's Python3 support, I doubt Sphinx will work with it unless they've added a lot of Unicode conversions to their Xapian support code.

OK. Even if it's completely broken for the moment, the goal it to make it work with Python 3, too.

I wanted to give it a try by compiling the bindings manually, but I got only this:

$ make
make  all-recursive
make[1]: Entering directory `/tmp/xapian-bindings-1.2.7'
Making all in python
make[2]: Entering directory `/tmp/xapian-bindings-1.2.7/python'
make  all-am
make[3]: Entering directory `/tmp/xapian-bindings-1.2.7/python'
/bin/bash ../libtool   --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  
-I/usr/include/python3.2mu  -fno-strict-aliasing -Wall -Wno-unused 
-Wno-uninitialized -fvisibility=hidden  -g -O2 -MT xapian_wrap.lo -MD -MP -MF 
.deps/xapian_wrap.Tpo -c -o xapian_wrap.lo `test -f 'modern/xapian_wrap.cc' || 
echo './'`modern/xapian_wrap.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python3.2mu 
-fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -fvisibility=hidden 
-g -O2 -MT xapian_wrap.lo -MD -MP -MF .deps/xapian_wrap.Tpo -c 
modern/xapian_wrap.cc  -fPIC -DPIC -o .libs/xapian_wrap.o
mv -f .deps/xapian_wrap.Tpo .deps/xapian_wrap.Plo
/bin/bash ../libtool --tag=CXX --mode=link g++ -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -fvisibility=hidden -g -O2 -avoid-version -module -shrext ".cpython-32mu.so" -o _xapian.la -rpath /usr/lib/python3/dist-packages/xapian xapian_wrap.lo -lxapian -lstdc++ libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/i486-linux-gnu/4.6/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i486-linux-gnu/4.6/crtbeginS.o .libs/xapian_wrap.o /usr/lib/libxapian.so -L/usr/lib/gcc/i486-linux-gnu/4.6 -L/usr/lib/gcc/i486-linux-gnu/4.6/../../../i386-linux-gnu -L/usr/lib/gcc/i486-linux-gnu/4.6/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.6/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.6/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.6/../../../i386-linux-gnu/crtn.o -O2 -Wl,-soname -Wl,_xapian.cpython-32mu.so -o .libs/_xapian.cpython-32mu.so
libtool: link: ( cd ".libs" && rm -f "_xapian.la" && ln -s "../_xapian.la" 
"_xapian.la" )
test -d xapian || mkdir xapian
cp `test -f modern/xapian.py || echo './'`modern/xapian.py xapian/__init__.py
test -d xapian || mkdir xapian
/bin/bash ../libtool  --config > libtoolconfig.tmp
. ./libtoolconfig.tmp; cp $objdir/_xapian.cpython-32mu.so xapian
rm -f libtoolconfig.tmp
PYTHONPATH="xapian:$PYTHONPATH" /usr/bin/python3 -c "import _xapian"
PYTHONPATH=".:$PYTHONPATH" /usr/bin/python3 -c "import xapian"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "xapian/__init__.py", line 7090, in <module>
    Query.MatchAll = Query("")
  File "xapian/__init__.py", line 6553, in _query_init
    __query_init_orig(self, *args)
  File "xapian/__init__.py", line 4610, in __init__
    _xapian.Query_swiginit(self,_xapian.new_Query(*args))
TypeError: in method 'new_Query', argument 1 of type 'std::string const &'
make[3]: *** [xapian/__init__.pyc] Error 1
make[3]: Leaving directory `/tmp/xapian-bindings-1.2.7/python'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/xapian-bindings-1.2.7/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/xapian-bindings-1.2.7'
make: *** [all] Error 2

--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to