Bug #999767: make setup.py obey Setup.local wrt shared modules
This commit is contained in:
parent
cd4d1e8b46
commit
e08fa29d0e
21
setup.py
21
setup.py
@ -148,17 +148,18 @@ class PyBuildExt(build_ext):
|
|||||||
self.extensions.remove(ext)
|
self.extensions.remove(ext)
|
||||||
|
|
||||||
if platform != 'mac':
|
if platform != 'mac':
|
||||||
# Parse Modules/Setup to figure out which modules are turned
|
# Parse Modules/Setup and Modules/Setup.local to figure out which
|
||||||
# on in the file.
|
# modules are turned on in the file.
|
||||||
input = text_file.TextFile('Modules/Setup', join_lines=1)
|
|
||||||
remove_modules = []
|
remove_modules = []
|
||||||
while 1:
|
for filename in ('Modules/Setup', 'Modules/Setup.local'):
|
||||||
line = input.readline()
|
input = text_file.TextFile(filename, join_lines=1)
|
||||||
if not line: break
|
while 1:
|
||||||
line = line.split()
|
line = input.readline()
|
||||||
remove_modules.append( line[0] )
|
if not line: break
|
||||||
input.close()
|
line = line.split()
|
||||||
|
remove_modules.append(line[0])
|
||||||
|
input.close()
|
||||||
|
|
||||||
for ext in self.extensions[:]:
|
for ext in self.extensions[:]:
|
||||||
if ext.name in remove_modules:
|
if ext.name in remove_modules:
|
||||||
self.extensions.remove(ext)
|
self.extensions.remove(ext)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user