Skip to content

Commit 5bcd3c1

Browse files
committed
Try fix SOABI for mingw to match C sources
1 parent f6de844 commit 5bcd3c1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

configure.ac

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6704,15 +6704,21 @@ AC_SUBST([SOABI])
67046704
AC_MSG_CHECKING([ABIFLAGS])
67056705
AC_MSG_RESULT([$ABIFLAGS])
67066706
AC_MSG_CHECKING([SOABI])
6707-
SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${SOABI_PLATFORM:+-$SOABI_PLATFORM}
6707+
case $host_os in
6708+
mingw*) SOABI='cp'`echo $VERSION | tr -d .`${ABIFLAGS}${SOABI_PLATFORM:+-$SOABI_PLATFORM};;
6709+
*) SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${SOABI_PLATFORM:+-$SOABI_PLATFORM};;
6710+
esac
67086711
AC_MSG_RESULT([$SOABI])
67096712

67106713
# Release build, debug build (Py_DEBUG), and trace refs build (Py_TRACE_REFS)
67116714
# are ABI compatible
67126715
if test "$Py_DEBUG" = 'true'; then
67136716
# Similar to SOABI but remove "d" flag from ABIFLAGS
67146717
AC_SUBST([ALT_SOABI])
6715-
ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${SOABI_PLATFORM:+-$SOABI_PLATFORM}
6718+
case $host_os in
6719+
mingw*) ALT_SOABI='cp'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${SOABI_PLATFORM:+-$SOABI_PLATFORM};;
6720+
*) ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${SOABI_PLATFORM:+-$SOABI_PLATFORM};;
6721+
esac
67166722
AC_DEFINE_UNQUOTED([ALT_SOABI], ["${ALT_SOABI}"],
67176723
[Alternative SOABI used in debug build to load C extensions built in release mode])
67186724
fi

0 commit comments

Comments
 (0)