@@ -3064,6 +3064,9 @@ def test_python_build_config_extensions(self):
30643064 VERSION_INFO_KEYS = ('major' , 'minor' , 'micro' , 'releaselevel' , 'serial' )
30653065 EXTENSION_SUFFIX = '.extension-suffix.so'
30663066 STABLE_ABI_SUFFIX = '.stable-abi-suffix.so'
3067+ # macOS framework builds put libpython in PYTHONFRAMEWORKPREFIX.
3068+ LIBDIR = (sysconfig .get_config_var ('PYTHONFRAMEWORKPREFIX' ) or
3069+ sysconfig .get_config_var ('LIBDIR' ))
30673070
30683071 python_build_config = {
30693072 'schema_version' : '1.0' ,
@@ -3096,8 +3099,8 @@ def test_python_build_config_extensions(self):
30963099 'extensions' : [EXTENSION_SUFFIX , STABLE_ABI_SUFFIX , '.so' ],
30973100 },
30983101 'libpython' : {
3099- 'dynamic' : sysconfig .get_config_var ('LDLIBRARY' ),
3100- 'static' : sysconfig .get_config_var ('LIBRARY' ),
3102+ 'dynamic' : os . path . join ( LIBDIR , sysconfig .get_config_var ('LDLIBRARY' ) ),
3103+ 'static' : os . path . join ( LIBDIR , sysconfig .get_config_var ('LIBRARY' ) ),
31013104 # set it to False on PyPy, since dylib is optional, but also
31023105 # the value is currently wrong:
31033106 # https://github.com/pypy/pypy/issues/5249
@@ -3110,7 +3113,7 @@ def test_python_build_config_extensions(self):
31103113
31113114 py3library = sysconfig .get_config_var ('PY3LIBRARY' )
31123115 if py3library is not None :
3113- python_build_config ['libpython' ]['dynamic_stableabi' ] = py3library
3116+ python_build_config ['libpython' ]['dynamic_stableabi' ] = os . path . join ( LIBDIR , py3library )
31143117
31153118 intro_installed_file = os .path .join (self .builddir , 'meson-info' , 'intro-installed.json' )
31163119 expected_files = [
0 commit comments