[PATCH 6/7] Update Python installation on Debian

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]: https://salsa.debian.org/selinux-team/libselinux/-/commit/cbfb31a0925e01591a9cce1eb3a0e517f42b144c

Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
---
 README.md              | 6 +++++-
 scripts/run-scan-build | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 8c475126..765b5626 100644
--- a/README.md
+++ b/README.md
@@ -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):
diff --git a/scripts/run-scan-build b/scripts/run-scan-build
index 931ffd2a..7b731f3e 100755
--- a/scripts/run-scan-build
+++ b/scripts/run-scan-build
@@ -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
-- 
2.42.0




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux