Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 19e9bd9

Browse files
committed
buildbot: allow passing arguments to select virtualenv and nose
This is useful for getting the buildbot to run Python2.4. svn path=/trunk/matplotlib/; revision=7615
1 parent a054987 commit 19e9bd9

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

test/_buildbot_install.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
faciltate testing."""
33
import shutil, os, sys
44
from subprocess import Popen, PIPE, STDOUT
5+
from optparse import OptionParser
56

67
from _buildbot_util import check_call
78

9+
usage = """%prog [options]"""
10+
parser = OptionParser(usage)
11+
parser.add_option('--virtualenv',type='string',default='virtualenv',
12+
help='string to invoke virtualenv')
13+
parser.add_option('--easy-install-nose',action='store_true',default=False,
14+
help='run "easy_install nose" in the virtualenv')
15+
(options, args) = parser.parse_args()
16+
if len(args)!=0:
17+
parser.print_help()
18+
sys.exit(0)
19+
820
TARGET='PYmpl'
921

1022
if os.path.exists(TARGET):
@@ -15,6 +27,10 @@
1527
if os.path.exists(build_path):
1628
shutil.rmtree(build_path)
1729

18-
check_call('virtualenv %s'%(TARGET,))
30+
check_call('%s %s'%(options.virtualenv,TARGET))
1931
TARGET_py = os.path.join(TARGET,'bin','python')
32+
TARGET_easy_install = os.path.join(TARGET,'bin','easy_install')
33+
34+
if options.easy_install_nose:
35+
check_call('%s nose'%TARGET_easy_install)
2036
check_call('%s setup.py install'%TARGET_py)

0 commit comments

Comments
 (0)