Opened 5 days ago

Closed 5 days ago

#835 closed defect (wontfix)

./configure --prefix=/ ignored when --with-python3 is used

Reported by: Дилян Палаузов Owned by: Richard Boulton
Priority: normal Milestone:
Component: Xapian-bindings (Python) Version: 1.4.26
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

./configure --prefix=/ --with-python3 && make install DESTDIR=/home/mailmanweb

prints

checking for directory to install python3 bindings in... /usr/local/lib/python3.10/site-packages

and installs under /home/mailmanweb/usr/local/lib/python3.10/site-packages/xapian/ __init__.py and _xapian.cpython-310-x86_64-linux-gnu.so .

The files should be installed instead in /home/mailmanweb/lib/python3.10/site-packages/xapian/ ( /usr/local/ must be stripped from the installation path).

I want to put the python3 bindings in a chrooted directory, when I am outside that directory and this currently does not work out of the box.

Change History (1)

comment:1 by Olly Betts, 5 days ago

Resolution: wontfix
Status: newclosed

That's a deliberate choice - we ignore configure's prefix for some files and instead install in the location which the interpreter/toolchain for the target language tells us it will look for bindings in (as documented in INSTALL).

If we installed under configure's prefix the bindings would typically not work without extra configuration (for Python, setting PYTHONPATH is one way). It's not ideal that the specified prefix is ignored for some files, but before we changed to do this users were frequently being tripped up by things not working out of the box - the current approach causes much less user frustration and support load.

DESTDIR then simply prefixes these install paths (which is what it is meant to do).

You can achieve what you want by specifying the install location directly and overriding PYTHON3_LIB to be where you want (as documented in the INSTALL file):

./configure --with-python3 --prefix=/home/mailmanweb PYTHON3_LIB=/home/mailmanweb/lib/python3.10/site-packages

If you prefer to use DESTDIR this will probably work:

./configure --with-python3 --prefix=/ PYTHON3_LIB=/lib/python3.10/site-packages
Note: See TracTickets for help on using tickets.