diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-01-12 07:35:25 -0800 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2018-01-12 16:35:25 +0100 |
commit | ab95b3074ee43098edf3f23b07fb18ef57ee614d (patch) | |
tree | 4fff8b614e8e6f9a105d3dde4cd01f80e7d80a1b /setup.py | |
parent | 0ebf0ae6a2b055f6a2373d9d1976f6b243ed8b00 (diff) | |
download | cpython-git-ab95b3074ee43098edf3f23b07fb18ef57ee614d.tar.gz |
bpo-32521: nis libtirpc (GH-5137) (#5166)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf)
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1349,12 +1349,19 @@ class PyBuildExt(build_ext): # Sun yellow pages. Some systems have the functions in libc. if (host_platform not in ['cygwin', 'atheos', '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: |