]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
only build the nis module when the headers are found #7589
authorBenjamin Peterson <benjamin@python.org>
Wed, 30 Dec 2009 02:58:50 +0000 (02:58 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 30 Dec 2009 02:58:50 +0000 (02:58 +0000)
Misc/NEWS
setup.py

index 46c8765b64cc32f284f0bbed32b007f0295dd3dd..cbf28a4400fad48ae9ff1cce68f14ffca75c78d7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,9 @@ C-API
 Build
 -----
 
+- Issue #7589: Only build the nis module when the correct header files are
+  found.
+
 - Switch to OpenSSL 0.9.8l on Windows.
 
 - Issue #7541: when using ``python-config`` with a framework install the compiler might
index f25b8294ea2c517250946c15f65d9e6eae87d81c..d2334e7e57334ad3fe1854b84c26be9993f9bb1d 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1088,7 +1088,7 @@ class PyBuildExt(build_ext):
                 missing.append('resource')
 
             # Sun yellow pages. Some systems have the functions in libc.
-            if platform not in ['cygwin', 'atheos', 'qnx6']:
+            if platform not in ['cygwin', 'atheos', 'qnx6'] and find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None:
                 if (self.compiler_obj.find_library_file(lib_dirs, 'nsl')):
                     libs = ['nsl']
                 else: