[Python-checkins] bpo-32521: nis libtirpc (GH-5137) (#5166)
Christian Heimes
webhook-mailer at python.org
Fri Jan 12 10:35:28 EST 2018
https://github.com/python/cpython/commit/ab95b3074ee43098edf3f23b07fb18ef57ee614d
commit: ab95b3074ee43098edf3f23b07fb18ef57ee614d
branch: 2.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Christian Heimes <christian at python.org>
date: 2018-01-12T16:35:25+01:00
summary:
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 at python.org>
(cherry picked from commit f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf)
files:
A Misc/NEWS.d/next/Library/2018-01-08-18-02-33.bpo-32521.Kh-KoN.rst
M setup.py
diff --git a/Misc/NEWS.d/next/Library/2018-01-08-18-02-33.bpo-32521.Kh-KoN.rst b/Misc/NEWS.d/next/Library/2018-01-08-18-02-33.bpo-32521.Kh-KoN.rst
new file mode 100644
index 00000000000..5ca9bcf7689
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-01-08-18-02-33.bpo-32521.Kh-KoN.rst
@@ -0,0 +1,2 @@
+glibc has removed Sun RPC. Use replacement libtirpc headers and library in
+nis module.
diff --git a/setup.py b/setup.py
index 5503486ccbf..784a8d21f1f 100644
--- a/setup.py
+++ b/setup.py
@@ -1349,12 +1349,19 @@ class db_found(Exception): pass
# 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:
More information about the Python-checkins
mailing list