File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -389,6 +389,12 @@ def test_SO_in_vars(self):
389389 self .assertIsNotNone (vars ['SO' ])
390390 self .assertEqual (vars ['SO' ], vars ['EXT_SUFFIX' ])
391391
392+ @unittest .skipUnless (sys .platform == 'linux' , 'Linux-specific test' )
393+ def test_bitness_in_ext_suffix (self ):
394+ suffix = sysconfig .get_config_var ('EXT_SUFFIX' )
395+ bitness = '-32b' if sys .maxsize < 2 ** 32 else '-64b'
396+ self .assertTrue (suffix .endswith (bitness + '.so' ), suffix )
397+
392398
393399class MakefileTests (unittest .TestCase ):
394400
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ Release date: 2015-03-08
1010Core and Builtins
1111-----------------
1212
13+ - Issue #22980: Under Linux, C extensions now include bitness in the file
14+ name, to make it easy to test 32-bit and 64-bit builds in the same
15+ working tree.
16+
1317- Issue #23571: PyObject_Call() and PyCFunction_Call() now raise a SystemError
1418 if a function returns a result and raises an exception. The SystemError is
1519 chained to the previous exception.
Original file line number Diff line number Diff line change @@ -14200,7 +14200,15 @@ $as_echo_n "checking ABIFLAGS... " >&6; }
1420014200$as_echo " $ABIFLAGS " >&6 ; }
1420114201{ $as_echo " $as_me :${as_lineno-$LINENO } : checking SOABI" >&5
1420214202$as_echo_n " checking SOABI... " >&6 ; }
14203- SOABI=' cpython-' ` echo $VERSION | tr -d .` ${ABIFLAGS}
14203+
14204+ case $ac_sys_system in
14205+ Linux* |GNU* )
14206+ BITNESS_SUFFIX=-$(( $ac_cv_sizeof_void_p * 8 )) b;;
14207+ * )
14208+ BITNESS_SUFFIX=;;
14209+ esac
14210+ SOABI=' cpython-' ` echo $VERSION | tr -d .` ${ABIFLAGS}${BITNESS_SUFFIX}
14211+
1420414212{ $as_echo " $as_me :${as_lineno-$LINENO } : result: $SOABI " >&5
1420514213$as_echo " $SOABI " >&6 ; }
1420614214
Original file line number Diff line number Diff line change @@ -4175,7 +4175,15 @@ AC_SUBST(SOABI)
41754175AC_MSG_CHECKING ( ABIFLAGS )
41764176AC_MSG_RESULT ( $ABIFLAGS )
41774177AC_MSG_CHECKING ( SOABI )
4178- SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
4178+
4179+ case $ac_sys_system in
4180+ Linux*|GNU*)
4181+ BITNESS_SUFFIX=-$(($ac_cv_sizeof_void_p * 8))b;;
4182+ *)
4183+ BITNESS_SUFFIX=;;
4184+ esac
4185+ SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${BITNESS_SUFFIX}
4186+
41794187AC_MSG_RESULT ( $SOABI )
41804188
41814189AC_SUBST ( EXT_SUFFIX )
You can’t perform that action at this time.
0 commit comments