diff options
author | Christian Heimes <christian@python.org> | 2018-01-12 15:26:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 15:26:32 +0100 |
commit | f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf (patch) | |
tree | 3943e145b8e50ef9e44c26d2cb999141c75aab85 /setup.py | |
parent | bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091) (diff) | |
download | cpython-f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf.tar.gz cpython-f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf.tar.bz2 cpython-f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf.zip |
bpo-32521: nis libtirpc (#5137)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1373,12 +1373,19 @@ class PyBuildExt(build_ext): # Sun yellow pages. Some systems have the functions in libc. if (host_platform not in ['cygwin', 'qnx6'] and find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None): - if (self.compiler.find_library_file(lib_dirs, 'nsl')): - libs = ['nsl'] - else: - libs = [] + nis_libs = [] + nis_includes = [] + if self.compiler.find_library_file(lib_dirs, 'nsl'): + nis_libs.append('nsl') + if self.compiler.find_library_file(lib_dirs, 'tirpc'): + # Sun RPC has been moved from glibc to libtirpc + # rpcsvc/yp_prot.h is still in /usr/include, but + # rpc/rpc.h has been moved into tirpc/ subdir. + nis_libs.append('tirpc') + nis_includes.append('/usr/include/tirpc') exts.append( Extension('nis', ['nismodule.c'], - libraries = libs) ) + libraries = nis_libs, + include_dirs=nis_includes) ) else: missing.append('nis') else: |