mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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>
This commit is contained in:
parent
ae12f5d4c9
commit
f3031b8a7a
2 changed files with 14 additions and 5 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
|
||||||
|
nis module.
|
17
setup.py
17
setup.py
|
@ -1373,12 +1373,19 @@ class PyBuildExt(build_ext):
|
||||||
# Sun yellow pages. Some systems have the functions in libc.
|
# Sun yellow pages. Some systems have the functions in libc.
|
||||||
if (host_platform not in ['cygwin', 'qnx6'] and
|
if (host_platform not in ['cygwin', 'qnx6'] and
|
||||||
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
|
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
|
||||||
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
|
nis_libs = []
|
||||||
libs = ['nsl']
|
nis_includes = []
|
||||||
else:
|
if self.compiler.find_library_file(lib_dirs, 'nsl'):
|
||||||
libs = []
|
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'],
|
exts.append( Extension('nis', ['nismodule.c'],
|
||||||
libraries = libs) )
|
libraries = nis_libs,
|
||||||
|
include_dirs=nis_includes) )
|
||||||
else:
|
else:
|
||||||
missing.append('nis')
|
missing.append('nis')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue