Skip to content

Commit 6452907

Browse files
committed
pythonGH-108819: fix LIBDEST not honoring --with-platlibdir
We look for the pure-Python part of the standard library in PLATSTDLIBDIR, which may not match the default LIBDIR subdir. From ``getpath.py``: ```python ... STDLIB_SUBDIR = f'{platlibdir}/python{VERSION_MAJOR}.{VERSION_MINOR}{ABI_THREAD}' STDLIB_LANDMARKS = [f'{STDLIB_SUBDIR}/os.py', f'{STDLIB_SUBDIR}/os.pyc'] PLATSTDLIB_LANDMARK = f'{platlibdir}/python{VERSION_MAJOR}.{VERSION_MINOR}{ABI_THREAD}/lib-dynload' ... ``` Signed-off-by: Filipe Laíns <[email protected]>
1 parent ccf1b0b commit 6452907

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ WHEEL_PKG_DIR= @WHEEL_PKG_DIR@
166166

167167
# Detailed destination directories
168168
BINLIBDEST= @BINLIBDEST@
169-
LIBDEST= $(SCRIPTDIR)/python$(VERSION)$(ABI_THREAD)
169+
LIBDEST= @LIBDEST@
170170
INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION)
171171
CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)
172172

configure

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6249,7 +6249,9 @@ if test "$ac_sys_system" = "iOS"; then
62496249
fi
62506250

62516251

6252+
AC_SUBST([LIBDEST])
62526253
AC_SUBST([BINLIBDEST])
6254+
LIBDEST='$(LIBDIR)/python$(VERSION)$(ABI_THREAD)'
62536255
BINLIBDEST='$(LIBDIR)/python$(VERSION)$(ABI_THREAD)'
62546256

62556257

@@ -6273,6 +6275,7 @@ if test -n "$withval" -a "$withval" != yes -a "$withval" != no
62736275
then
62746276
AC_MSG_RESULT([yes])
62756277
PLATLIBDIR="$withval"
6278+
LIBDEST='${prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'
62766279
BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'
62776280
else
62786281
AC_MSG_RESULT([no])
@@ -6283,9 +6286,9 @@ fi],
62836286
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
62846287
AC_SUBST([PY_ENABLE_SHARED])
62856288
if test x$PLATFORM_TRIPLET = x; then
6286-
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}${ABI_THREAD}/config-${LDVERSION}"
6289+
LIBPL='$(LIBDEST)'"/config-${LDVERSION}"
62876290
else
6288-
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}${ABI_THREAD}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
6291+
LIBPL='$(LIBDEST)'"/config-${LDVERSION}-${PLATFORM_TRIPLET}"
62896292
fi
62906293
AC_SUBST([LIBPL])
62916294

0 commit comments

Comments
 (0)