File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,19 @@ def get_output(*args, **kwargs):
38
38
39
39
# get the compile and link args
40
40
kc = "krb5-config"
41
+ autodetect_kc = True
41
42
posix = os .name != 'nt'
42
43
43
44
# Per https://docs.python.org/3/library/platform.html#platform.architecture
44
45
# this is the preferred way of determining "64-bitness".
45
46
is64bit = sys .maxsize > 2 ** 32
46
47
48
+ kc_env = 'KRB5CONFIG'
49
+ if kc_env in os .environ :
50
+ kc = os .environ [kc_env ]
51
+ autodetect_kc = False
52
+ print (f"Using { kc } from env" )
53
+
47
54
link_args , compile_args = [
48
55
shlex .split (os .environ [e ], posix = posix ) if e in os .environ else None
49
56
for e in ['GSSAPI_LINKER_ARGS' , 'GSSAPI_COMPILER_ARGS' ]
@@ -77,7 +84,7 @@ def get_output(*args, **kwargs):
77
84
except ValueError :
78
85
cygwinccompiler .get_msvcr = lambda * a , ** kw : []
79
86
80
- if sys .platform .startswith ("freebsd" ):
87
+ if sys .platform .startswith ("freebsd" ) and autodetect_kc :
81
88
# FreeBSD does $PATH backward, for our purposes. That is, the package
82
89
# manager's version of the software is in /usr/local, which is in PATH
83
90
# *after* the version in /usr. We prefer the package manager's version
You can’t perform that action at this time.
0 commit comments