build_controller.py :  » GUI » wxPython » wxPython-src-2.8.11.0 » distrib » scripts » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » GUI » wxPython 
wxPython » wxPython src 2.8.11.0 » distrib » scripts » build_controller.py
import sys, os, string, time, shutil
#import ReleaseForge

from taskrunner import Job,Task,TaskRunner,Config

# read in the build settings...

CFGFILE = "./scripts/build-environ.cfg"
config = Config()
config.read(CFGFILE)

config.WXWIN = os.path.abspath("..")

class Job(Job):
    LOGBASE = "./tmp"

# ensure the staging area exists
if not os.path.exists(config.STAGING_DIR):
    os.makedirs(config.STAGING_DIR)

# Figure out the wxPython version number, possibly adjusted for being a daily build
if config.KIND == "daily":
    t = time.localtime()
    config.DAILY = time.strftime("%Y%m%d")   # should it include the hour too?  2-digit year?
    file("DAILY_BUILD", "w").write(config.DAILY)
    # stamp the date on daily builds
    config.BUILD_VERSION=config.BUILD_VERSION + "-" + config.DAILY

# Let the user override build machine names, etc., etc. with their own
# config file settings
myconfig = None
myconfig_file = os.path.expanduser("~/wxrelease-environ.cfg")
if os.path.exists(myconfig_file):
    myconfig = Config()
    myconfig.read(myconfig_file)

# TODO: Set up different environs for daily, release, etc.
# so that people can have different configs for different builds

# prepare the environment file
config_env = config.asDict()
config_env.update(os.environ)
if myconfig:
    config_env.update(myconfig.asDict())
    
tasks = Task([ Job("pre-flight", "./scripts/pre-flight.sh", env=config_env), 
               Job("win_build", "./scripts/build-windows.sh", env=config_env),
               Job("lin_build", "./scripts/build-linux.sh", env=config_env),
               Job("mac_build", "./scripts/build-mac.sh", env=config_env),
             ])
             
print "Build getting started at: ", time.ctime()


# Run the first task, which will create the docs and sources tarballs
tr = TaskRunner(tasks)
rc = tr.run()

if rc == 0 and config.delete_temps == "yes":
    shutil.rmtree(config.WX_TEMP_DIR)

# cleanup the DAILY_BUILD file
if config.KIND == "daily":
    os.unlink("DAILY_BUILD")
    
print "Build finished at: ", time.ctime()
sys.exit(0)
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.