@@ -3087,7 +3087,7 @@ def test_python_build_config_extensions(self):
30873087 if not attr .startswith ('__' )
30883088 },
30893089 'abi' : {
3090- 'flags' : [] ,
3090+ 'flags' : list ( sys . abiflags ) ,
30913091 'extension_suffix' : EXTENSION_SUFFIX ,
30923092 'stable_abi_suffix' : STABLE_ABI_SUFFIX ,
30933093 },
@@ -3115,16 +3115,23 @@ def test_python_build_config_extensions(self):
31153115 if py3library is not None :
31163116 python_build_config ['libpython' ]['dynamic_stableabi' ] = os .path .join (LIBDIR , py3library )
31173117
3118+ build_stable_abi = sysconfig .get_config_var ('Py_GIL_DISABLED' ) != 1 or sys .version_info >= (3 , 15 )
31183119 intro_installed_file = os .path .join (self .builddir , 'meson-info' , 'intro-installed.json' )
31193120 expected_files = [
31203121 os .path .join (self .builddir , 'foo' + EXTENSION_SUFFIX ),
3121- os .path .join (self .builddir , 'foo_stable' + STABLE_ABI_SUFFIX ),
31223122 ]
3123+ if build_stable_abi :
3124+ expected_files += [
3125+ os .path .join (self .builddir , 'foo_stable' + STABLE_ABI_SUFFIX ),
3126+ ]
31233127 if is_cygwin ():
31243128 expected_files += [
31253129 os .path .join (self .builddir , 'foo' + EXTENSION_SUFFIX .replace ('.so' , '.dll.a' )),
3126- os .path .join (self .builddir , 'foo_stable' + STABLE_ABI_SUFFIX .replace ('.so' , '.dll.a' )),
31273130 ]
3131+ if build_stable_abi :
3132+ expected_files += [
3133+ os .path .join (self .builddir , 'foo_stable' + STABLE_ABI_SUFFIX .replace ('.so' , '.dll.a' )),
3134+ ]
31283135
31293136 for with_pkgconfig in (False , True ):
31303137 with self .subTest (with_pkgconfig = with_pkgconfig ):
@@ -3154,6 +3161,7 @@ def test_python_build_config_extensions(self):
31543161 ):
31553162 with self .subTest (extra_args = extra_args ):
31563163 self .init (testdir , extra_args = extra_args )
3164+ self .build ()
31573165 with open (intro_installed_file ) as f :
31583166 intro_installed = json .load (f )
31593167 self .assertEqual (expected_files , list (intro_installed ))
0 commit comments