Skip to content

Commit

Permalink
better build scripts for pb and twill
Browse files Browse the repository at this point in the history
  • Loading branch information
Titus Brown committed Sep 3, 2009
1 parent f58e39b commit b220824
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion client/build-pony-build
Expand Up @@ -8,7 +8,7 @@ import shutil

options, args = parse_cmdline()

python_exe = 'python'
python_exe = 'python2.5'
if args:
python_exe = args[0]

Expand Down
45 changes: 33 additions & 12 deletions client/build-twill
@@ -1,29 +1,50 @@
#! /usr/bin/env python
import sys
from pony_build_client import BuildCommand, TestCommand, do, send, \
TempDirectoryContext, SetupCommand, SvnClone, check
import os
import tempfile
import shutil
TempDirectoryContext, SetupCommand, SvnClone, check, parse_cmdline

options, args = parse_cmdline()
if args:
print 'ignoring command line args: ', args

python_exe = sys.argv[1]
repo_url = 'http://twill.googlecode.com/svn/trunk/twill'

tags = [python_exe]
python_exe = 'python2.5'
if args:
python_exe = args[0]

name = 'twill'
tags = [python_exe]
#server_url = 'http://localhost:8080/xmlrpc'
server_url = 'http://lyorn.idyll.org/ctb/pb-dev/xmlrpc'

if not check(name, server_url, tags=tags):
print 'check build says no need to build; bye'
sys.exit(0)
if not options.force_build:
if not check(name, server_url, tags=tags):
print 'check build says no need to build; bye'
sys.exit(0)

context = TempDirectoryContext(False)
commands = [ SvnClone('twill', repo_url, name='checkout', cache_dir='/u/t/.pony-build/twill'),
commands = [ SvnClone('twill', repo_url, name='checkout', cache_dir='~/.pony-build/twill'),
BuildCommand([python_exe, 'setup.py', 'build'],
name='compile'),
TestCommand(['nosetests'], name='run tests'),
]

context = TempDirectoryContext(False)
results = do(name, commands, context=context)
send(server_url, results, tags=tags)
client_info, reslist = results

if options.report:
print 'result: %s; sending' % (client_info['success'],)
send(server_url, results, tags=tags)
else:

print 'build result:'

import pprint
pprint.pprint(client_info)
pprint.pprint(reslist)

print '(NOT SENDING BUILD RESULT TO SERVER)'

if not client_info['success']:
sys.exit(-1)

0 comments on commit b220824

Please sign in to comment.