]> granicus.if.org Git - python/commitdiff
Patch #103544: always compile the dl and nis modules on Unix; let's see
authorAndrew M. Kuchling <amk@amk.ca>
Wed, 21 Feb 2001 02:38:24 +0000 (02:38 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Wed, 21 Feb 2001 02:38:24 +0000 (02:38 +0000)
    where they break.

setup.py

index 3c122e5e8bb85fff8b76f59f4e5e78245d5a489d..ea4d94f0c984405c936a7eed8d666b9abefe53d1 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -362,9 +362,16 @@ class PyBuildExt(build_ext):
             if platform not in ['cygwin']:
                 exts.append( Extension('resource', ['resource.c']) )
 
+            # Generic dynamic loading module
+            exts.append( Extension('dl', ['dlmodule.c']) )
+            
+            # Sun yellow pages. Some systems have the functions in libc.
             if (self.compiler.find_library_file(lib_dirs, 'nsl')):
-                exts.append( Extension('nis', ['nismodule.c'],
-                                       libraries = ['nsl']) )
+                libs = ['nsl']
+            else:
+                libs = []
+            exts.append( Extension('nis', ['nismodule.c'],
+                                   libraries = libs) )
 
         # Curses support, requring the System V version of curses, often
         # provided by the ncurses library.