[Xapian-tickets] [Xapian] #346: Python 3 support

Xapian nobody at xapian.org
Wed Nov 6 23:24:12 GMT 2013


#346: Python 3 support
--------------------------------------+------------------------------
 Reporter:  olly                      |             Owner:  richard
     Type:  defect                    |            Status:  assigned
 Priority:  highest                   |         Milestone:  1.3.x
Component:  Xapian-bindings (Python)  |           Version:  SVN trunk
 Severity:  normal                    |        Resolution:
 Keywords:                            |        Blocked By:
 Blocking:                            |  Operating System:  All
--------------------------------------+------------------------------
\
\
\
\
\
\

Comment (by barry):

 Hi all - really fantastic to see all the great progress since I last had
 the opportunity to look.  I just re-grabbed the svn trunk, but I had to
 make one change to get Xapian Python 3 bindings to build on Ubuntu Trusty:

 {{{
 diff --git a/configure.in b/configure.in
 index d04c76f..851b644 100644
 --- a/configure.in
 +++ b/configure.in
 @@ -764,7 +764,7 @@ else
      # Find the directory for libraries this is necessary to deal with
      # platforms that can have apps built for multiple archs: e.g. x86_64
      AC_MSG_CHECKING([for Python 3.x lib dir])
 -    PY3LIBDIR=`($PYTHON3 -c "import sys; print(sys.lib)") 2>/dev/null`
 +    PY3LIBDIR=`($PYTHON3 -c "import sysconfig;
 print(sysconfig.get_config_var('LIBPL'))") 2>/dev/null`
      if test -z "$PY3LIBDIR"; then
        # some dists don't have sys.lib  so the best we can do is assume
 lib
        PY3LIBDIR="lib"
 }}}

 The original code doesn't make any sense to me, since {{{sys.lib}}} is
 certainly a non-standard attribute.  Where did you find that?

 In any case, using sysconfig is a more standard way of locating the multi-
 arch location for the Python 3 libraries on Debian and Ubuntu (and very
 likely other Linux distros).

 With this change, I was able to build Python 3 support and actually import
 `xapian._xapian`.  I haven't tried running the tests yet.  What's the ETA
 for releasing an official Python 3 supporting Xapian version?
\
\
\

--
Ticket URL: <http://trac.xapian.org/ticket/346#comment:74>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list