Skip to content

Commit ac039c6

Browse files
committed
Fix build with Debian + Heimdal
Signed-off-by: Alexander Scheel <[email protected]>
1 parent 32cb94c commit ac039c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,21 @@ def _get_output(*args, **kwargs):
8282
import ctypes.util
8383

8484
main_lib = os.environ.get('GSSAPI_MAIN_LIB', None)
85+
main_path = ""
8586
if main_lib is None and osx_has_gss_framework:
8687
main_lib = ctypes.util.find_library('GSS')
8788
elif main_lib is None:
8889
for opt in link_args:
8990
if opt.startswith('-lgssapi'):
9091
main_lib = 'lib%s.so' % opt[2:]
92+
if opt.startswith('-Wl,/') and "heimdal" in opt:
93+
main_path = opt[4:] + "/"
9194

9295
if main_lib is None:
9396
raise Exception("Could not find main GSSAPI shared library. Please "
9497
"try setting GSSAPI_MAIN_LIB yourself or setting "
9598
"ENABLE_SUPPORT_DETECTION to 'false'")
96-
97-
GSSAPI_LIB = ctypes.CDLL(main_lib)
99+
GSSAPI_LIB = ctypes.CDLL(main_path + main_lib)
98100

99101

100102
# add in the flag that causes us not to compile from Cython when

0 commit comments

Comments
 (0)