comparison setup.py @ 125:3b3c83f803b3

no longer need to install buildbotcustom, for now; commenting out as it may be desired in the future
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 23 Jan 2011 10:36:31 -0800
parents 9ba5c3df5e30
children a9ac38655f75
comparison
equal deleted inserted replaced
124:f2f4bf7edbbc 125:3b3c83f803b3
32 create-autobot-slave = autobot.template:create_slave 32 create-autobot-slave = autobot.template:create_slave
33 create-autobot-project = autobot.template:create_project 33 create-autobot-project = autobot.template:create_project
34 """, 34 """,
35 ) 35 )
36 36
37 def install_hg(sources): 37 # def install_hg(sources):
38 """ 38 # """
39 - sources : dict of hg sources to install: {'package': 'http://hg...'} 39 # - sources : dict of hg sources to install: {'package': 'http://hg...'}
40 """ 40 # """
41 try: 41 # try:
42 from subprocess import check_call as call 42 # from subprocess import check_call as call
43 except: 43 # except:
44 from subprocess import call 44 # from subprocess import call
45 45
46 # see if you can find site-packages 46 # # see if you can find site-packages
47 import site 47 # import site
48 site_dir = os.path.abspath(os.path.dirname(site.__file__)) 48 # site_dir = os.path.abspath(os.path.dirname(site.__file__))
49 site_packages = os.path.join(site_dir, 'site-packages') 49 # site_packages = os.path.join(site_dir, 'site-packages')
50 if not (os.path.exists(site_packages) and os.path.isdir(site_packages)): 50 # if not (os.path.exists(site_packages) and os.path.isdir(site_packages)):
51 raise IOError("Cannot find site-packages directory") 51 # raise IOError("Cannot find site-packages directory")
52 52
53 # figure out what you need to install 53 # # figure out what you need to install
54 missing = set() 54 # missing = set()
55 for source in sources: 55 # for source in sources:
56 try: 56 # try:
57 __import__(source) 57 # __import__(source)
58 except ImportError: 58 # except ImportError:
59 missing.add(source) 59 # missing.add(source)
60 60
61 # install it 61 # # install it
62 for source in missing: 62 # for source in missing:
63 call(['hg', 'clone', sources[source], 63 # call(['hg', 'clone', sources[source],
64 os.path.join(site_packages, source)]) 64 # os.path.join(site_packages, source)])
65 65
66 ### install unpackaged dependencies 66 # ### install unpackaged dependencies
67 source = {'buildbotcustom': 'http://hg.mozilla.org/build/buildbotcustom'} 67 # source = {'buildbotcustom': 'http://hg.mozilla.org/build/buildbotcustom'}
68 if set(['install', 'develop']).intersection(sys.argv[1:]): 68 # if set(['install', 'develop']).intersection(sys.argv[1:]):
69 try: 69 # try:
70 install_hg(source) 70 # install_hg(source)
71 except: 71 # except:
72 print 'Please make sure the source is installed:' 72 # print 'Please make sure the source is installed:'
73 print source 73 # print source