Opened 17 years ago

Closed 16 years ago

#253 closed enhancement (fixed)

Change namespace for Python bindings

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

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 (3)

comment:1 by Richard Boulton, 17 years ago

Owner: changed from New Bugs to Richard Boulton

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.

comment:2 by Olly Betts, 17 years ago

Operating System: Microsoft WindowsAll

comment:3 by Richard Boulton, 16 years ago

Resolution: fixed
Status: newclosed

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.