diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-01-12 15:29:35 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2018-01-12 15:29:35 (GMT) |
commit | d55d6825d7bd0fc120c95d579065623ce6392a2f (patch) | |
tree | f1ac46fbbb82e0008e5735ce6877814b74acc94c | |
parent | a91662affeb0aae2515cdc5e8f82269337105bf4 (diff) | |
download | cpython-d55d6825d7bd0fc120c95d579065623ce6392a2f.zip cpython-d55d6825d7bd0fc120c95d579065623ce6392a2f.tar.gz cpython-d55d6825d7bd0fc120c95d579065623ce6392a2f.tar.bz2 |
[3.6] bpo-32521: nis libtirpc (GH-5137) (#5165)
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)
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-01-08-18-02-33.bpo-32521.Kh-KoN.rst | 2 | ||||
-rw-r--r-- | setup.py | 17 |
2 files changed, 14 insertions, 5 deletions
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 0000000..5ca9bcf --- /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. @@ -1365,12 +1365,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: |