Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better build scripts for pb and twill
- Loading branch information
Titus Brown
committed
Sep 3, 2009
1 parent
f58e39b
commit b220824
Showing
2 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |