This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e437fd4b18 python: fix delivery of the platform-mangled _sysconfigdata 
module (Linux)
e437fd4b18 is described below

commit e437fd4b181d8afb88e297891cb033b5c52337e1
Author: Jim Jagielski <[email protected]>
AuthorDate: Tue Aug 4 10:29:57 2026 -0400

    python: fix delivery of the platform-mangled _sysconfigdata module (Linux)
---
 main/python/makefile.mk | 9 +++++++++
 main/python/prj/d.lst   | 6 ++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/main/python/makefile.mk b/main/python/makefile.mk
index 55712c9097..900435c1e2 100644
--- a/main/python/makefile.mk
+++ b/main/python/makefile.mk
@@ -116,6 +116,15 @@ CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) ./configure 
--prefix=$(MYCWD)/python-in
 CONFIGURE_ACTION += --disable-ipv6
 .ENDIF
 BUILD_ACTION=$(ENV_BUILD) $(GNUMAKE) -j$(EXTMAXPROCESS) && $(GNUMAKE) install 
&& chmod -R ug+w $(MYCWD)/python-inst && chmod g+w Include
+
+.IF "$(OS)"=="LINUX"
+# CPython's sysconfig module names its generated data module after the
+# platform/ABI (e.g. _sysconfigdata__linux_x86_64-linux-gnu.py) instead of
+# the plain "_sysconfigdata.py" that main/python/prj/d.lst delivers. Rename
+# it in place so delivery finds the name it's looking for.
+BUILD_ACTION+= && for d in $(MYCWD)/python-inst/lib/python3.11 
$(MYCWD)/python-inst/lib64/python3.11; do test -d "$$d" && (cd "$$d" && for f 
in _sysconfigdata_*.py; do test -f "$$f" && mv -f "$$f" _sysconfigdata.py; 
done); done; true
+.ENDIF
+
 .ELSE
 # ----------------------------------
 # WINDOWS
diff --git a/main/python/prj/d.lst b/main/python/prj/d.lst
index 3a8d7d22c6..b6c100a2f3 100644
--- a/main/python/prj/d.lst
+++ b/main/python/prj/d.lst
@@ -58,8 +58,10 @@ mkdir: %_DEST%\lib%_EXT%\python\python3.11\config
 ..\%__SRC%\misc\build\Python-3.11.15\Lib\multiprocessing\dummy\* 
%_DEST%\lib%_EXT%\python\multiprocessing\dummy\*
 ..\%__SRC%\misc\build\Python-3.11.15\Lib\unittest\* 
%_DEST%\lib%_EXT%\python\unittest\*
 ..\%__SRC%\misc\build\Python-3.11.15\Makefile 
%_DEST%\lib%_EXT%\python\python3.11\config\Makefile
-# TODO: _sysconfigdata filename is platform-mangled (e.g. 
_sysconfigdata__darwin_darwin.py on macOS,
-# _sysconfigdata__linux_x86_64-linux-gnu.py on Linux). Verify exact name from 
built tree.
+# _sysconfigdata filename is platform-mangled (e.g. 
_sysconfigdata__darwin_darwin.py on macOS,
+# _sysconfigdata__linux_x86_64-linux-gnu.py on Linux). On Linux, makefile.mk's 
BUILD_ACTION
+# renames the generated file to the plain name below before delivery runs. Not 
yet handled
+# for other platforms.
 ..\%__SRC%\misc\build\python-inst\lib\python3.11\_sysconfigdata*.py 
%_DEST%\lib%_EXT%\python\_sysconfigdata.py
 ..\pyversion.mk %_DEST%\inc%_EXT%\pyversion.mk
 ..\pyversion_dmake.mk %_DEST%\inc%_EXT%\pyversion_dmake.mk

Reply via email to