diff options
author | Georg Brandl <georg@python.org> | 2005-12-27 18:24:30 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2005-12-27 18:24:30 (GMT) |
commit | 2043472c8dbf63c0259b2f84785e4c38504d4db7 (patch) | |
tree | a71c4aaf8238ab5f58a2ce4dd1ff81703b3ed93f | |
parent | 27a2fab81c0bd8201a427dea8d73fd56d5e84b42 (diff) | |
download | cpython-2043472c8dbf63c0259b2f84785e4c38504d4db7.zip cpython-2043472c8dbf63c0259b2f84785e4c38504d4db7.tar.gz cpython-2043472c8dbf63c0259b2f84785e4c38504d4db7.tar.bz2 |
Bug #999767: make setup.py obey Setup.local wrt shared modules
-rw-r--r-- | setup.py | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -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) |