X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2cc3f6a0fc1f8b79150a715f145e73e185adae10..f5ed42f875325bbadce5e43fe7131e295724359d:/wxPython/distrib/all/build-all diff --git a/wxPython/distrib/all/build-all b/wxPython/distrib/all/build-all index 305e4b03b5..2d005d1374 100755 --- a/wxPython/distrib/all/build-all +++ b/wxPython/distrib/all/build-all @@ -1,9 +1,9 @@ #!/usr/bin/python -u #---------------------------------------------------------------------- # Name: build-all.py -# Purpose: Master build script for building all the installers and -# such on all the build machines in my lab, and then -# distributing the results as needed. +# Purpose: Master build script for building all the wxPython +# installers and such on all the build machines in +# my lab, and then distributing the results as needed. # # This will replace the build-all bash script and is # needed because the needs of the build have outgrown @@ -20,60 +20,14 @@ import sys import os import time -from taskrunner import Job, Task, TaskRunner +from taskrunner import Job, Task, TaskRunner, Config #---------------------------------------------------------------------- # Configuration items -class Config: - def write(self, filename="config", outfile=None): - if outfile is None: - f = file(filename, "w") - else: - f = outfile - for k, v in self.__dict__.items(): - f.write('%s="%s"\n' % (k, v)) - +CFGFILE = "./distrib/all/build-environ.cfg" config = Config() - -# the local spot that we put everything when done, before possibly copying -# to remote hosts -config.STAGING_DIR = "./BUILD" - - -# host name of the machine to use for windows builds -config.WIN_HOST = "beast" -# Where is the build dir from the remote machine's perspective? -config.WIN_BUILD = "/c/BUILD" - - -# Just like the above -config.OSX_HOST_panther = "bigmac" -config.OSX_HOST_jaguar = "whopper" -config.OSX_BUILD = "/BUILD" - - -# Alsmost the same... See below for hosts and other info -config.LINUX_BUILD = "/tmp/BUILD" - - -# Upload server locations -config.UPLOAD_HOST = "starship.python.net" -config.UPLOAD_DAILY_ROOT = "/home/crew/robind/public_html/wxPython/daily" -config.UPLOAD_PREVIEW_ROOT = "/home/crew/robind/public_html/wxPython/rc" - -# defaults for build options -config.KIND = "dryrun" -config.skipsource = "no" -config.onlysource = "no" -config.skipdocs = "no" -config.skipwin = "no" -config.skiposx = "no" -config.skiplinux = "no" -config.skipclean = "no" -config.skipupload = "no" -config.skipnewdocs = "no" -config.startcohost = "yes" +config.read(CFGFILE) #---------------------------------------------------------------------- # Define all the build tasks @@ -81,52 +35,71 @@ config.startcohost = "yes" class Job(Job): LOGBASE = "./tmp" -CFGFILE = "./tmp/config" - - -# Things that need to be done before any of the builds -initialTask = Task([ Job("", ["distrib/all/build-setup", CFGFILE]), - Job("", ["distrib/all/build-docs", CFGFILE]), - Job("", ["distrib/all/build-sources", CFGFILE]), - ]) - -# Build tasks. Anything that can be done in parallel (depends greatly -# on the nature of the build machine configurations...) is a separate -# task. - -jaguarTask = Task( Job(config.OSX_HOST_jaguar, - ["distrib/all/build-osx", CFGFILE, config.OSX_HOST_jaguar, "jaguar", "2.3"]) ) - -pantherTask = Task( Job(config.OSX_HOST_panther, - ["distrib/all/build-osx", CFGFILE, config.OSX_HOST_panther, "panther", "2.3"]) ) - -beastTask1 = Task([ Job("beast.23", ["distrib/all/build-windows", CFGFILE, "2.3"]), - Job("beast.24", ["distrib/all/build-windows", CFGFILE, "2.4"]), - ]) +#---------------------------------------------------------------------- -beastTask2 = Task([ Job("co-mdk101.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk101","mdk101","2.3"]), - Job("co-fc2.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2", "fc2", "2.3"]), - Job("co-mdk101.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk101","mdk101","2.4"]), - Job("co-fc2.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2", "fc2", "2.4"]), +def getTasks(config_env): + # Things that need to be done before any of the builds + initialTask = Task([ + Job("", "distrib/all/build-setup", env=config_env), + Job("", "distrib/all/build-docs", env=config_env), + Job("", "distrib/all/build-sources", env=config_env), + ]) + + # Build tasks. Anything that can be done in parallel (depends greatly + # on the nature of the build machines configurations...) is a separate + # task. + + jaguarTask = Task( Job("whopper.23", "distrib/all/build-osx", + [config.OSX_HOST_jaguar, "2.3", "ansi"], env=config_env) ) + + pantherTask = Task( [ Job("bigmac.23", + "distrib/all/build-osx", + [config.OSX_HOST_panther, "2.3", "both"], env=config_env), + Job("bigmac.24", + "distrib/all/build-osx", + [config.OSX_HOST_panther, "2.4", "both"], env=config_env) + ]) + + tigerTask = Task([ #Job("smallfry.23", + # "distrib/all/build-osx", + # [config.OSX_HOST_tiger, "2.3", "both"], env=config_env), + Job("smallfry.24", + "distrib/all/build-osx", + [config.OSX_HOST_tiger, "2.4", "both", "universal"], env=config_env), + Job("smallfry.25", + "distrib/all/build-osx", + [config.OSX_HOST_tiger, "2.5", "both", "universal"], env=config_env) ]) -cyclopsTask = Task([ Job("co-rh9.23", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-rh9", "rh9", "2.3"]), - Job("co-mdk92.23", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-mdk92", "mdk92", "2.3"]), - Job("co-rh9.24", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-rh9", "rh9", "2.4"]), - Job("co-mdk92.24", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-mdk92", "mdk92", "2.4"]), - ]) - -buildTasks = [ jaguarTask, - pantherTask, - beastTask1, - beastTask2, - cyclopsTask, - ] + + beastTask1 = Task( + [ Job("beast.23", "distrib/all/build-windows", ["2.3"], env=config_env), + Job("co-rh9.23", "distrib/all/build-rpm", ["beast", "co-rh9", "rh9", "2.3"], env=config_env), + Job("beast.24", "distrib/all/build-windows", ["2.4"], env=config_env), + Job("co-rh9.24", "distrib/all/build-rpm", ["beast", "co-rh9", "rh9", "2.4"], env=config_env), + Job("beast.25", "distrib/all/build-windows", ["2.5"], env=config_env), + ]) + + beastTask2 = Task( + [ Job("co-fc2.23", "distrib/all/build-rpm", ["beast", "co-fc2", "fc2", "2.3"], env=config_env), + Job("co-fc4.24", "distrib/all/build-rpm", ["beast", "co-fc4", "fc4", "2.4"], env=config_env), + Job("co-mdk102.24", "distrib/all/build-rpm", ["beast", "co-mdk102", "mdk102", "2.4"], env=config_env), + Job("co-mdk2006.24","distrib/all/build-rpm", ["beast", "co-mdk2006", "mdk2006", "2.4"], env=config_env), + ]) + + buildTasks = [ jaguarTask, + pantherTask, + tigerTask, + beastTask1, + beastTask2, + ] + + # Finalization. This is for things that must wait until all the + # builds are done, such as copying the installers someplace, sending + # emails, etc. + finalizationTask = Task( Job("", "distrib/all/build-finalize", env=config_env) ) -# Finalization. This is for things that must wait until all the -# builds are done, such as copying the installers someplace, sending -# emails, etc. -finalizationTask = Task( Job("", ["distrib/all/build-finalize", CFGFILE]) ) + return initialTask, buildTasks, finalizationTask #---------------------------------------------------------------------- @@ -147,9 +120,10 @@ def usage(): print " skipdocs Don't rebuild the docs" print " skipwin Don't do the remote Windows build" print " skiposx Don't do the remote OSX build" - print " skiplinux Don't do the remote Linux build" + print " skiplinux Don't do the remote Linux (RPM) build" print " skipclean Don't do the cleanup step on the remote builds" print " skipupload Don't upload the builds to starship" + print " ansi Also do the ansi builds" print "" print " nocohost Don't start the coLinux sessions if they are" print " not already online" @@ -165,6 +139,8 @@ def main(args): if not os.path.isdir("wxPython") or not os.path.isdir("wx"): print "Please run this script from the root wxPython directory." sys.exit(1) + + # Check command line flags for flag in args: @@ -198,6 +174,9 @@ def main(args): elif flag == "skipupload": config.skipupload = "yes" + elif flag == "ansi": + config.buildansi = "yes" + elif flag == "nocohost": config.startcohost = "no" @@ -220,10 +199,12 @@ def main(args): import setup config.VERSION = setup.VERSION - # write the config file where the build scripts can find it - config.write(CFGFILE) - print "Build getting started at: ", time.ctime() + config_env = config.asDict() + config_env.update(os.environ) + initialTask, buildTasks, finalizationTask = getTasks(config_env) + + print "Build getting started at: ", time.ctime() # Run the first task, which will create the docs and sources tarballs tr = TaskRunner(initialTask)