Skip to content

Commit

Permalink
Fix build with Debian + Heimdal
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
  • Loading branch information
cipherboy committed Jul 14, 2017
1 parent 32cb94c commit 0be0230
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,24 @@ def _get_output(*args, **kwargs):
import ctypes.util

main_lib = os.environ.get('GSSAPI_MAIN_LIB', None)
main_path = ""
if main_lib is None and osx_has_gss_framework:
main_lib = ctypes.util.find_library('GSS')
elif main_lib is None:
for opt in link_args:
if opt.startswith('-lgssapi'):
main_lib = 'lib%s.so' % opt[2:]

# To support Heimdal on Debian, read the linker path.
if opt.startswith('-Wl,/'):
main_path = opt[4:] + "/"

if main_lib is None:
raise Exception("Could not find main GSSAPI shared library. Please "
"try setting GSSAPI_MAIN_LIB yourself or setting "
"ENABLE_SUPPORT_DETECTION to 'false'")

GSSAPI_LIB = ctypes.CDLL(main_lib)
GSSAPI_LIB = ctypes.CDLL(main_path + main_lib)


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

0 comments on commit 0be0230

Please sign in to comment.