This is an automated email from the ASF dual-hosted git repository.
damjan 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 f134535 As of Python 3.8, the pkg-config "--libs" needed to build
with Python, differ between Python modules and applications that embed Python
(see https://bugs.python.org/issue36721).
f134535 is described below
commit f134535553051695dfbb71310003ab610fda2c83
Author: Damjan Jovanovic <[email protected]>
AuthorDate: Sun Apr 3 15:15:46 2022 +0200
As of Python 3.8, the pkg-config "--libs" needed to build with Python,
differ
between Python modules and applications that embed Python (see
https://bugs.python.org/issue36721).
Detect the Python version, and if >= 3.8, query the "python-X.Y-embed"
package with pkg-config instead of "python-X.Y".
This is needed to build pyuno with Python 3.8.
Patch by: me
---
main/configure.ac | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/main/configure.ac b/main/configure.ac
index 5a87d6e..51522cc 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -3987,7 +3987,13 @@ elif test -n "$with_system_python" -o -n
"$with_system_libs" && \
python_include=`$PYTHON -c "import distutils.sysconfig;
print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
python_version=`$PYTHON -c "import distutils.sysconfig;
print(distutils.sysconfig.get_config_var('VERSION'));"`
- PKG_CHECK_MODULES(PYTHON, python-$python_version, PYTHON_PC="TRUE",
PYTHON_PC="" )
+ # Python 3.8 and later distinguish building Python modules from linking to
the libpython:
+ # (https://bugs.python.org/issue36721)
+ if test "$python_version" -lt "3.8"; then
+ PKG_CHECK_MODULES(PYTHON, python-$python_version, PYTHON_PC="TRUE",
PYTHON_PC="" )
+ else
+ PKG_CHECK_MODULES(PYTHON, python-$python_version-embed,
PYTHON_PC="TRUE", PYTHON_PC="" )
+ fi
if test "$PYTHON_PC" != "TRUE"; then
PYTHON_CFLAGS="-I$python_include"
PYTHON_LIBS="-lpython$python_version"