mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Changed to allow the user to do partial builds
This commit is contained in:
parent
3422f2cae2
commit
f04fa7259d
1 changed files with 33 additions and 7 deletions
|
@ -13,6 +13,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import macfs
|
import macfs
|
||||||
import MacOS
|
import MacOS
|
||||||
|
import EasyDialogs
|
||||||
|
|
||||||
import addpack
|
import addpack
|
||||||
import aetools
|
import aetools
|
||||||
|
@ -27,11 +28,14 @@ import mkapplet
|
||||||
class MwShell(aetools.TalkTo, Metrowerks_Shell_Suite, Required_Suite):
|
class MwShell(aetools.TalkTo, Metrowerks_Shell_Suite, Required_Suite):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
RUNNING=[]
|
||||||
|
|
||||||
def buildmwproject(top, creator, projects):
|
def buildmwproject(top, creator, projects):
|
||||||
"""Build projects with an MW compiler"""
|
"""Build projects with an MW compiler"""
|
||||||
|
if not creator in RUNNING:
|
||||||
print 'Please start project mgr with signature', creator,'-'
|
print 'Please start project mgr with signature', creator,'-'
|
||||||
sys.stdin.readline()
|
sys.stdin.readline()
|
||||||
|
RUNNING.append(creator)
|
||||||
try:
|
try:
|
||||||
mgr = MwShell(creator)
|
mgr = MwShell(creator)
|
||||||
except 'foo':
|
except 'foo':
|
||||||
|
@ -49,7 +53,7 @@ def buildmwproject(top, creator, projects):
|
||||||
except MacOS.Error, arg:
|
except MacOS.Error, arg:
|
||||||
print '** Failed. Possible error:', arg
|
print '** Failed. Possible error:', arg
|
||||||
mgr.Close_Project()
|
mgr.Close_Project()
|
||||||
mgr.quit()
|
## mgr.quit()
|
||||||
|
|
||||||
def buildapplet(top, dummy, list):
|
def buildapplet(top, dummy, list):
|
||||||
"""Create a PPC python applet"""
|
"""Create a PPC python applet"""
|
||||||
|
@ -70,21 +74,29 @@ def buildapplet(top, dummy, list):
|
||||||
#
|
#
|
||||||
# The build instructions. Entries are (routine, arg, list-of-files)
|
# The build instructions. Entries are (routine, arg, list-of-files)
|
||||||
# XXXX We could also include the builds for stdwin and such here...
|
# XXXX We could also include the builds for stdwin and such here...
|
||||||
INSTRUCTIONS=[
|
PPC_INSTRUCTIONS=[
|
||||||
(buildmwproject, "CWIE", [
|
(buildmwproject, "CWIE", [
|
||||||
":build.macppc.shared:PythonCore.µ",
|
":build.macppc.shared:PythonCore.µ",
|
||||||
":build.macppc.shared:PythonPPC.µ",
|
":build.macppc.shared:PythonPPC.µ",
|
||||||
":build.macppc.shared:PythonApplet.µ",
|
":build.macppc.shared:PythonApplet.µ",
|
||||||
|
])
|
||||||
|
]
|
||||||
|
PLUGIN_INSTRUCTIONS=[
|
||||||
|
(buildmwproject, "CWIE", [
|
||||||
":PlugIns:ctbmodule.µ",
|
":PlugIns:ctbmodule.µ",
|
||||||
":PlugIns:imgmodules.µ",
|
":PlugIns:imgmodules.µ",
|
||||||
":PlugIns:macspeechmodule.µ",
|
":PlugIns:macspeechmodule.µ",
|
||||||
":PlugIns:mactcpmodules.µ",
|
":PlugIns:mactcpmodules.µ",
|
||||||
":PlugIns:stdwinmodule.µ",
|
":PlugIns:stdwinmodule.µ",
|
||||||
":PlugIns:toolboxmodules.µ",
|
":PlugIns:toolboxmodules.µ",
|
||||||
|
])
|
||||||
|
]
|
||||||
|
M68K_INSTRUCTIONS=[
|
||||||
|
(buildmwproject, "CWIE", [
|
||||||
":build.mac68k.stand:Python68K.µ",
|
":build.mac68k.stand:Python68K.µ",
|
||||||
]),
|
])
|
||||||
|
]
|
||||||
|
APPLET_INSTRUCTIONS=[
|
||||||
(buildapplet, None, [
|
(buildapplet, None, [
|
||||||
":Mac:scripts:EditPythonPrefs.py",
|
":Mac:scripts:EditPythonPrefs.py",
|
||||||
":Mac:scripts:mkapplet.py",
|
":Mac:scripts:mkapplet.py",
|
||||||
|
@ -93,11 +105,25 @@ INSTRUCTIONS=[
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
|
||||||
|
ALLINST=[
|
||||||
|
("PPC shared executable", PPC_INSTRUCTIONS),
|
||||||
|
("PPC plugin modules", PLUGIN_INSTRUCTIONS),
|
||||||
|
("68K executable", M68K_INSTRUCTIONS),
|
||||||
|
("PPC applets", APPLET_INSTRUCTIONS)
|
||||||
|
]
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
dir, ok = macfs.GetDirectory('Python source folder:')
|
dir, ok = macfs.GetDirectory('Python source folder:')
|
||||||
if not ok:
|
if not ok:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
dir = dir.as_pathname()
|
dir = dir.as_pathname()
|
||||||
|
INSTRUCTIONS = []
|
||||||
|
for string, inst in ALLINST:
|
||||||
|
answer = EasyDialogs.AskYesNoCancel("Build %s?"%string, 1)
|
||||||
|
if answer < 0:
|
||||||
|
sys.exit(0)
|
||||||
|
if answer:
|
||||||
|
INSTRUCTIONS = INSTRUCTIONS + inst
|
||||||
for routine, arg, list in INSTRUCTIONS:
|
for routine, arg, list in INSTRUCTIONS:
|
||||||
routine(dir, arg, list)
|
routine(dir, arg, list)
|
||||||
print "All done!"
|
print "All done!"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue