Skip to content

Commit e30a3cf

Browse files
GH-138800: fix variable substitution in python3.pc for Android
$(BLDLIBRARY) substitution works in Makefiles where variables are expanded at the time of execution. This expansion does not happen in static files like .pc, so use value of BLDLIBRARY instead of trying to substitute the value. Patch stolen from downstream distribution of Python for Termux (Android): termux/termux-packages#27739 Preferably needs to be backported to both Python 3.13 as well as Python 3.14, along with the main branch Fixes #138800
1 parent 945bf8c commit e30a3cf

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix variable substitution in python3.pc for Android

configure

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6452,7 +6452,7 @@ LIBPYTHON=''
64526452
# On Android and Cygwin the shared libraries must be linked with libpython.
64536453
if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin"); then
64546454
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(LDLIBRARY)"
6455-
LIBPYTHON="\$(BLDLIBRARY)"
6455+
LIBPYTHON="$(BLDLIBRARY)"
64566456
fi
64576457

64586458
# On iOS the shared libraries must be linked with the Python framework

0 commit comments

Comments
 (0)