Skip to content

Commit b134b12

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 cf6758f commit b134b12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6424,7 +6424,7 @@ LIBPYTHON=''
64246424
# On Android and Cygwin the shared libraries must be linked with libpython.
64256425
if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin"); then
64266426
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(LDLIBRARY)"
6427-
LIBPYTHON="\$(BLDLIBRARY)"
6427+
LIBPYTHON="$(BLDLIBRARY)"
64286428
fi
64296429

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

0 commit comments

Comments
 (0)