Update Python installation on Debian
Between Debian 11 and 12 the way to install Python packages into the
system location under /usr, and not /usr/local, changed[1]. The
previous setup argument --install-layout=deb is now unsupported and the
environment variable DEB_PYTHON_INSTALL_LAYOUT needs to be set instead.
See also [2].
[1]: https://lists.debian.org/debian-devel/2023/07/msg00307.html
[2]: cbfb31a092
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
9fcf4ccad3
commit
a7a829530e
|
@ -108,7 +108,11 @@ To build and install everything under a private directory, run:
|
|||
|
||||
make DESTDIR=~/obj install install-rubywrap install-pywrap
|
||||
|
||||
On Debian `PYTHON_SETUP_ARGS='--install-option "--install-layout=deb"'` needs to be set when installing the python wrappers in order to create the correct python directory structure.
|
||||
On Debian the environment variable `DEB_PYTHON_INSTALL_LAYOUT` needs to be set
|
||||
to `deb` when installing the Python wrappers in order to create the correct
|
||||
Python directory structure.
|
||||
On Debian systems older than bookworm set
|
||||
`PYTHON_SETUP_ARGS='--install-option "--install-layout=deb"'` instead.
|
||||
|
||||
To run tests with the built libraries and programs, several paths (relative to `$DESTDIR`) need to be added to variables `$LD_LIBRARY_PATH`, `$PATH` and `$PYTHONPATH`.
|
||||
This can be done using [./scripts/env_use_destdir](./scripts/env_use_destdir):
|
||||
|
|
|
@ -25,7 +25,7 @@ export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysc
|
|||
export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')"
|
||||
|
||||
if [ -f /etc/debian_version ] && [ -z "${IS_CIRCLE_CI:-}" ] ; then
|
||||
export PYTHON_SETUP_ARGS='--install-layout=deb'
|
||||
export DEB_PYTHON_INSTALL_LAYOUT='deb'
|
||||
fi
|
||||
|
||||
# Build and analyze
|
||||
|
|
Loading…
Reference in New Issue