Skip to content

GH-108819: fix LIBDEST not honoring --with-platlibdir #133163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ WHEEL_PKG_DIR= @WHEEL_PKG_DIR@

# Detailed destination directories
BINLIBDEST= @BINLIBDEST@
LIBDEST= $(SCRIPTDIR)/python$(VERSION)$(ABI_THREAD)
LIBDEST= @LIBDEST@
INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION)
CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Honor :option:`--with-platlibdir` in the pure-Python standard library
installation path, if ``PLATLIBDIR`` doesn't match the value used in
``LIBDIR``.
19 changes: 9 additions & 10 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6248,15 +6248,10 @@ if test "$ac_sys_system" = "iOS"; then
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)"
fi


AC_SUBST([BINLIBDEST])
BINLIBDEST='$(LIBDIR)/python$(VERSION)$(ABI_THREAD)'


# Check for --with-platlibdir
# /usr/$PLATLIBDIR/python$(VERSION)$(ABI_THREAD)
AC_SUBST([PLATLIBDIR])
PLATLIBDIR="lib"
PLATLIBDIR="lib" # XXX: We should probably calculate the defauly from libdir, if defined.
AC_MSG_CHECKING([for --with-platlibdir])
AC_ARG_WITH(
[platlibdir],
Expand All @@ -6273,19 +6268,22 @@ if test -n "$withval" -a "$withval" != yes -a "$withval" != no
then
AC_MSG_RESULT([yes])
PLATLIBDIR="$withval"
BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'
else
AC_MSG_RESULT([no])
fi],
[AC_MSG_RESULT([no])])

AC_SUBST([LIBDEST])
AC_SUBST([BINLIBDEST])
LIBDEST='${prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'
BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'

dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST([PY_ENABLE_SHARED])
if test x$PLATFORM_TRIPLET = x; then
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}${ABI_THREAD}/config-${LDVERSION}"
LIBPL='$(LIBDEST)'"/config-${LDVERSION}"
else
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}${ABI_THREAD}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
LIBPL='$(LIBDEST)'"/config-${LDVERSION}-${PLATFORM_TRIPLET}"
fi
AC_SUBST([LIBPL])

Expand Down
Loading