Xapian Python Bindings (Win32)

The following is a build of the Python Bindings for the Xapian Open Source Search Engine Library for the Microsoft Windows platform.

It comes packaged with an easy, standard (distutils) installer. This may help with some of the headaches associated with running Xapian on Python and Windows.

Getting the whole thing to compile was not exactly a walk in the park, so I assumed people would be glad to have an easy Binary installer handy. I plan to use this library for a few internal projects, and I want the said project to be as multi platform as possible.

System Requirements:

  • Python 2.4 or 2.5, built with MSVC. The official distribution from python.org or ActivePython will do. This will most likely not work with a cygwin-built python, and might work with mingw32-built Python. Please ensure your download the correct package for your version of Python..
  • Microsoft Windows NT, 2000, XP or Server 2003, 32bit. It remains untested on win9x and on the x86_64 versions of windows so you’re on your own. I have not tried it on Vista either, but do let me know if it works.

Download

Current Version: 1.0.6
Last updated: 25 Mar 2008

  Python 2.4 Python 2.5
HTTP xapian-1.0.6.python-2.4.win32.exe xapian-1.0.6.python-2.5.win32.exe
FTP xapian-1.0.6.python-2.4.win32.exe xapian-1.0.6.python-2.5.win32.exe

Checksums:
8aacdf9af1b1670f4a4efb7a5e0c1bed *xapian-1.0.6.python-2.4.win32.exe
6354c8e3e97b7de29c0d645ba92ef935 *xapian-1.0.6.python-2.5.win32.exe

Previous Versions…

Note: Mirrors are welcome, in case my servers all decide to go down at once.

Source and Documentation

This build of Xapian and its Python Bindings was accomplished on a Windows Server 2003 machine, with Visual C++ 2005 Express and the Microsoft Platform SDK for Windows Server 2003 R2. It was linked against zlib 1.2.3 (2027).

This build would not have been possible without the makefiles for compiling with MSVC, originally put together by Ulrik Petersen, and further refined and currently maintained by Charlie Hull.

The Xapian Source is available here: xapian.org/downloads.php

The Zlib source is available here: zlib.net

I have built the bindings using the Lemur Consulting makefiles, and then packaged them with Python Distutils.

Notes:

I have extended the binding’s namespace to be libxapian. The SWIG generated bindings now import from that namespace, where the pyd file and zlib1.dll are located.

This was done because I really was not comfortable with the idea of tossing zlib1.dll in the site-packages directory. So the two modifications that were done are:

  • Created the folder “libxapian” and moved _xapian.pyd and zlib1.dll into it
  • Edited xapian.py to import from the correct namespace (”from libxapian import _xapian“, instead of “import _xapian“).
  • Created an __init__.py script into the libxapian folder to make it a package.

This should not affect any Python programs using the library.

Questions and comments are welcome.