]> granicus.if.org Git - python/commitdiff
Bug #999767: make setup.py obey Setup.local wrt shared modules
authorGeorg Brandl <georg@python.org>
Tue, 27 Dec 2005 18:24:27 +0000 (18:24 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 27 Dec 2005 18:24:27 +0000 (18:24 +0000)
setup.py

index 462e76bfb45485e1059d3649631fdb59a5089a9f..31f0b2e3ee0f4a00a44779671c7a448a2f34dfdd 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -148,17 +148,18 @@ class PyBuildExt(build_ext):
                 self.extensions.remove(ext)
 
         if platform != 'mac':
-            # Parse Modules/Setup to figure out which modules are turned
-            # on in the file.
-            input = text_file.TextFile('Modules/Setup', join_lines=1)
+            # Parse Modules/Setup and Modules/Setup.local to figure out which
+            # modules are turned on in the file.
             remove_modules = []
-            while 1:
-                line = input.readline()
-                if not line: break
-                line = line.split()
-                remove_modules.append( line[0] )
-            input.close()
-
+            for filename in ('Modules/Setup', 'Modules/Setup.local'):
+                input = text_file.TextFile(filename, join_lines=1)
+                while 1:
+                    line = input.readline()
+                    if not line: break
+                    line = line.split()
+                    remove_modules.append(line[0])
+                input.close()
+    
             for ext in self.extensions[:]:
                 if ext.name in remove_modules:
                     self.extensions.remove(ext)