|
|
8db7d0 |
diff --git a/setup.py b/setup.py
|
|
|
8db7d0 |
index 585e380..9993f11 100644
|
|
|
8db7d0 |
--- a/setup.py
|
|
|
8db7d0 |
+++ b/setup.py
|
|
|
8db7d0 |
@@ -1346,11 +1346,7 @@ class PyBuildExt(build_ext):
|
|
|
8db7d0 |
else:
|
|
|
8db7d0 |
missing.append('resource')
|
|
|
8db7d0 |
|
|
|
8db7d0 |
- nis = self._detect_nis(inc_dirs, lib_dirs)
|
|
|
8db7d0 |
- if nis is not None:
|
|
|
8db7d0 |
- exts.append(nis)
|
|
|
8db7d0 |
- else:
|
|
|
8db7d0 |
- missing.append('nis')
|
|
|
8db7d0 |
+ # nis (Sun yellow pages) is handled in Setup.dist
|
|
|
8db7d0 |
|
|
|
8db7d0 |
# Curses support, requiring the System V version of curses, often
|
|
|
8db7d0 |
# provided by the ncurses library.
|
|
|
8db7d0 |
@@ -2162,51 +2158,6 @@ class PyBuildExt(build_ext):
|
|
|
8db7d0 |
# for dlopen, see bpo-32647
|
|
|
8db7d0 |
ext.libraries.append('dl')
|
|
|
8db7d0 |
|
|
|
8db7d0 |
- def _detect_nis(self, inc_dirs, lib_dirs):
|
|
|
8db7d0 |
- if host_platform in {'win32', 'cygwin', 'qnx6'}:
|
|
|
8db7d0 |
- return None
|
|
|
8db7d0 |
-
|
|
|
8db7d0 |
- libs = []
|
|
|
8db7d0 |
- library_dirs = []
|
|
|
8db7d0 |
- includes_dirs = []
|
|
|
8db7d0 |
-
|
|
|
8db7d0 |
- # bpo-32521: glibc has deprecated Sun RPC for some time. Fedora 28
|
|
|
8db7d0 |
- # moved headers and libraries to libtirpc and libnsl. The headers
|
|
|
8db7d0 |
- # are in tircp and nsl sub directories.
|
|
|
8db7d0 |
- rpcsvc_inc = find_file(
|
|
|
8db7d0 |
- 'rpcsvc/yp_prot.h', inc_dirs,
|
|
|
8db7d0 |
- [os.path.join(inc_dir, 'nsl') for inc_dir in inc_dirs]
|
|
|
8db7d0 |
- )
|
|
|
8db7d0 |
- rpc_inc = find_file(
|
|
|
8db7d0 |
- 'rpc/rpc.h', inc_dirs,
|
|
|
8db7d0 |
- [os.path.join(inc_dir, 'tirpc') for inc_dir in inc_dirs]
|
|
|
8db7d0 |
- )
|
|
|
8db7d0 |
- if rpcsvc_inc is None or rpc_inc is None:
|
|
|
8db7d0 |
- # not found
|
|
|
8db7d0 |
- return None
|
|
|
8db7d0 |
- includes_dirs.extend(rpcsvc_inc)
|
|
|
8db7d0 |
- includes_dirs.extend(rpc_inc)
|
|
|
8db7d0 |
-
|
|
|
8db7d0 |
- if self.compiler.find_library_file(lib_dirs, 'nsl'):
|
|
|
8db7d0 |
- libs.append('nsl')
|
|
|
8db7d0 |
- else:
|
|
|
8db7d0 |
- # libnsl-devel: check for libnsl in nsl/ subdirectory
|
|
|
8db7d0 |
- nsl_dirs = [os.path.join(lib_dir, 'nsl') for lib_dir in lib_dirs]
|
|
|
8db7d0 |
- libnsl = self.compiler.find_library_file(nsl_dirs, 'nsl')
|
|
|
8db7d0 |
- if libnsl is not None:
|
|
|
8db7d0 |
- library_dirs.append(os.path.dirname(libnsl))
|
|
|
8db7d0 |
- libs.append('nsl')
|
|
|
8db7d0 |
-
|
|
|
8db7d0 |
- if self.compiler.find_library_file(lib_dirs, 'tirpc'):
|
|
|
8db7d0 |
- libs.append('tirpc')
|
|
|
8db7d0 |
-
|
|
|
8db7d0 |
- return Extension(
|
|
|
8db7d0 |
- 'nis', ['nismodule.c'],
|
|
|
8db7d0 |
- libraries=libs,
|
|
|
8db7d0 |
- library_dirs=library_dirs,
|
|
|
8db7d0 |
- include_dirs=includes_dirs
|
|
|
8db7d0 |
- )
|
|
|
8db7d0 |
-
|
|
|
8db7d0 |
|
|
|
8db7d0 |
class PyBuildInstall(install):
|
|
|
8db7d0 |
# Suppress the warning about installation into the lib_dynload
|