Blame SOURCES/00289-disable-nis-detection.patch

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