From 0aa0ce091c407522b3482a8323a6f30703c7751d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kl=C3=B6tzke?= Date: Mon, 17 Nov 2025 20:39:18 +0100 Subject: [PATCH] python::python3: fix dev package The python-dev package holds a magic sysconf module that is used by setuptools and friends to find crucial paths. In particular, the path to the include files is taken from there. So far, the module did hold absolute paths that pointed to the intended install location. That is completely wrong because the package never ends up there and needs to be relocatable. Patch the module accordingly to rewrite all absolute paths to one relative to the sysconfig module. --- recipes/python/python3.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/python/python3.yaml b/recipes/python/python3.yaml index 7e537d59..8b0b880c 100644 --- a/recipes/python/python3.yaml +++ b/recipes/python/python3.yaml @@ -101,8 +101,16 @@ multiPackage: autotoolsPackageDev mkdir -p usr/lib/python${MAJOR_MINOR} cp $1/install/usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py usr/lib/python${MAJOR_MINOR} - # remove any absolute include-/library-paths - sed -E -e "s|-[LI]/[^ ']+||" usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py + # Remove any absolute include-/library-paths and make the + # data relocatable... + sed -i -E \ + -e '1i prefix = "/".join(__file__.split("/")[:-3])' \ + -e "s|-[LI]/[^ ']*||g" \ + -e "/DESTDIRS/b" \ + -e "/INCLDIRSTOMAKE/b" \ + -e "/TZPATH/b" \ + -e "s|'/usr|prefix + '|" \ + usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py python3 -m compileall usr/lib/python${MAJOR_MINOR} provideDeps: [ "*-dev" ]