Skip to content

Commit a862c27

Browse files
jborean93frozencemetery
authored andcommitted
Fix GSSAPI detection on macOS Big Sur
CPython on macOS Big Sur has a bug in the ctypes.util.find_library function. This has been fixed recently but has not made its way to an actual release yet. This change adds a fallback GSS framework path to try incase ctypes fails to find the path. [rharwood@redhat.com: whitespace, wrapping]
1 parent 5ee095e commit a862c27

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: setup.py

+8
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ def get_output(*args, **kwargs):
162162
main_path = ""
163163
if main_lib is None and osx_has_gss_framework:
164164
main_lib = ctypes.util.find_library('GSS')
165+
if not main_lib:
166+
# https://github.com/pythongssapi/python-gssapi/issues/235
167+
# CPython has a bug on Big Sur where find_library will fail to
168+
# find the library path of shared frameworks. This has been fixed
169+
# in newer versions but we have this fallback in case an older
170+
# version is still in use. This fix is expected to be included in
171+
# 3.8.8 and 3.9.2.
172+
main_lib = '/System/Library/Frameworks/GSS.framework/GSS'
165173
elif os.environ.get('MINGW_PREFIX'):
166174
main_lib = os.environ.get('MINGW_PREFIX')+'/bin/libgss-3.dll'
167175
elif sys.platform == 'msys':

0 commit comments

Comments
 (0)