Menu

[r8823]: / branches / py3k / test / _buildbot_install.py  Maximize  Restore  History

Download this file

37 lines (29 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""This script will install matplotlib to a virtual environment to
faciltate testing."""
import shutil, os, sys
from subprocess import Popen, PIPE, STDOUT
from optparse import OptionParser
from _buildbot_util import check_call
usage = """%prog [options]"""
parser = OptionParser(usage)
parser.add_option('--virtualenv',type='string',default='virtualenv',
help='string to invoke virtualenv')
parser.add_option('--easy-install-nose',action='store_true',default=False,
help='run "easy_install nose" in the virtualenv')
(options, args) = parser.parse_args()
if len(args)!=0:
parser.print_help()
sys.exit(0)
TARGET='PYmpl'
if os.path.exists(TARGET):
shutil.rmtree(TARGET)
if 1:
build_path = 'build'
if os.path.exists(build_path):
shutil.rmtree(build_path)
check_call('%s %s'%(options.virtualenv,TARGET))
TARGET_py = os.path.join(TARGET,'bin','python')
TARGET_easy_install = os.path.join(TARGET,'bin','easy_install')
if options.easy_install_nose:
check_call('%s nose'%TARGET_easy_install)
check_call('%s setup.py install'%TARGET_py)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.