X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cbb0770040f70b68b235d4c9a1a0f56512856705..ee77681f4ec8794345b59b8ea3e4748283373ab1:/wxPython/distrib/all/build-all?ds=sidebyside diff --git a/wxPython/distrib/all/build-all b/wxPython/distrib/all/build-all index 9512e3c573..1221be37ce 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,55 +35,66 @@ 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 machines configurations...) is a separate -# task. - -jaguarTask = Task( Job("whopper.23", - ["distrib/all/build-osx", CFGFILE, config.OSX_HOST_jaguar, "jaguar", "2.3"]) ) - -pantherTask = Task([ Job("bigmac.23", - ["distrib/all/build-osx", CFGFILE, config.OSX_HOST_panther, "panther", "2.3"]), - Job("bigmac.24", - ["distrib/all/build-osx", CFGFILE, config.OSX_HOST_panther, "panther", "2.4"]) - ]) - -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"]), - ]) - -cyclopsTask = Task([ Job("co-mdk92.23", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-mdk92", "mdk92", "2.3"]), - Job("co-rh9.23", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-rh9", "rh9", "2.3"]), - Job("co-mdk92.24", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-mdk92", "mdk92", "2.4"]), - Job("co-rh9.24", ["distrib/all/build-rpm", CFGFILE, "cyclops", "co-rh9", "rh9", "2.4"]), - ]) +#---------------------------------------------------------------------- -buildTasks = [ jaguarTask, - pantherTask, - beastTask1, - beastTask2, - cyclopsTask, - ] +def getTasks(config_env): + # Things that need to be done before any of the builds + initialTask = Task([ + Job("cleanup", "distrib/all/build-setup", env=config_env), + Job("makedocs", "distrib/all/build-docs", env=config_env), + Job("maketarball", "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, "jaguar", "2.3"], env=config_env) ) + + pantherTask = Task( + [ Job("bigmac.23", + "distrib/all/build-osx", [config.OSX_HOST_panther, "panther", "2.3"], env=config_env), + Job("bigmac.24", + "distrib/all/build-osx", [config.OSX_HOST_panther, "panther", "2.4"], env=config_env) + ]) + + beastTask1 = Task( + [ Job("beast.23", "distrib/all/build-windows", ["2.3"], env=config_env), + Job("co-rh9.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-rh9", "rh9", "2.3"]), + Job("beast.24", "distrib/all/build-windows", ["2.4"], env=config_env), + Job("co-rh9.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-rh9", "rh9", "2.4"]), + ]) + + beastTask2 = Task( + [ Job("co-fc2.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2", "fc2", "2.3"]), + #Job("co-mdk101.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk101","mdk101","2.3"]), + Job("co-fc4.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc4", "fc4", "2.4"]), + #Job("co-fc2.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2", "fc2", "2.4"]), + Job("co-mdk102.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk102","mdk102","2.4"]), + ]) + +## cyclopsTask = Task( +## [ Job("co-mdk92.23", "distrib/all/build-rpm", ["cyclops", "co-mdk92", "mdk92", "2.3"], env=config_env), +## Job("co-rh9.23", "distrib/all/build-rpm", ["cyclops", "co-rh9", "rh9", "2.3"], env=config_env), +## Job("co-mdk92.24", "distrib/all/build-rpm", ["cyclops", "co-mdk92", "mdk92", "2.4"], env=config_env), +## Job("co-rh9.24", "distrib/all/build-rpm", ["cyclops", "co-rh9", "rh9", "2.4"], env=config_env), +## ]) + + buildTasks = [ jaguarTask, + pantherTask, + beastTask1, + beastTask2, +## cyclopsTask, + ] + + # 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 #---------------------------------------------------------------------- @@ -168,6 +133,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: @@ -223,10 +190,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)