Ticket #253 (closed enhancement: fixed)

Opened 7 months ago

Last modified 5 months ago

Change namespace for Python bindings

Reported by: charliejuggler Owned by: richard
Priority: normal Milestone: 1.1.0
Component: Xapian-bindings Version: SVN trunk
Severity: normal Keywords: python bindings windows
Cc: Blocked By:
Operating System: All Blocking:

Description

Alexandre Gauthier has suggested we change the namespace for the Python bindings, as this fixes an issue with Windows installations where Python extensions should be in a subdir of site-packages (including any dependent DLLs). His reasoning is here: http://www.raptorized.com/xapian-python-win32/ Richard suggests 'xapian' not 'libxapian' as the subdir name.

Further discussion on #xapian-devel suggested use of the .pth system for Python, and some wider issues about namespaces and packaging for other bindings.

Change History

Changed 7 months ago by richard

  • owner changed from newbugs to richard

Even further discussion on IRC has lead us to think that .pth system is not quite as good as simply putting the .py and .so (on unix) or .dll (on windows) files in a subdirectory called "xapian", and renaming xapian.py to init.py This option makes the xapian directory into a package, and provides the best encapsulation and is nicer in future if we want to shove any additional "pythonic" wrappers into the distribution. I'll change the SVN HEAD autoconf system to do this shortly; we should change the nmake system to do similarly.

Changed 7 months ago by olly

  • platform changed from Microsoft Windows to All

Changed 5 months ago by richard

  • status changed from new to closed
  • resolution set to fixed

This was been implemented on head shortly after the last comment - from 1.1.0 onwards, the python bindings will exist as a package consisting of xapian/init.py (containing what used to be in xapian.py), and xapian/_xapian.{so,dll,whatever}.

Note: See TracTickets for help on using tickets.