mirror of https://github.com/python/cpython.git
Adapted to new macmudulefinder.process() API. (jvr)
This commit is contained in:
parent
8ff52764ef
commit
2e5b0f2166
|
@ -38,12 +38,15 @@ def main():
|
|||
if mustwait:
|
||||
sys.exit(1)
|
||||
|
||||
def process(gentype, program, output, modules=[], module_files=[], debug=0, with_ifdef=0):
|
||||
try:
|
||||
module_dict = macmodulefinder.process(program, modules, module_files, debug)
|
||||
except macmodulefinder.Missing, arg:
|
||||
arg.sort()
|
||||
print '** Missing modules:', string.join(arg, ' ')
|
||||
def process(gentype, program, output, modules=None, module_files=None, debug=0, with_ifdef=0):
|
||||
if modules is None:
|
||||
modules = []
|
||||
if module_files is None:
|
||||
module_files = []
|
||||
module_dict, missing = macmodulefinder.process(program, modules, module_files, debug)
|
||||
if missing:
|
||||
missing.sort()
|
||||
print '** Missing modules:', string.join(missing, ' ')
|
||||
sys.exit(1)
|
||||
#
|
||||
# And generate
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
import buildtools
|
||||
|
||||
|
||||
def generate(input, output, module_dict = None, architecture = 'fat', debug=0):
|
||||
def generate(input, output, module_dict=None, architecture='fat', debug=0):
|
||||
# try to remove old file
|
||||
try:
|
||||
os.remove(output)
|
||||
|
@ -22,7 +22,14 @@ def generate(input, output, module_dict = None, architecture = 'fat', debug=0):
|
|||
if module_dict is None:
|
||||
import macmodulefinder
|
||||
print "Searching for modules..."
|
||||
module_dict = macmodulefinder.process(input, [], [], 1)
|
||||
module_dict, missing = macmodulefinder.process(input, [], [], 1)
|
||||
if missing:
|
||||
import EasyDialogs
|
||||
missing.sort()
|
||||
answer = EasyDialogs.AskYesNoCancel("Some modules could not be found; continue anyway?\n(%s)"
|
||||
% string.join(missing, ", "))
|
||||
if answer <> 1:
|
||||
sys.exit(0)
|
||||
|
||||
applettemplatepath = buildtools.findtemplate()
|
||||
corepath = findpythoncore()
|
||||
|
|
Loading…
Reference in New Issue