Mercurial > libervia-backend
comparison setup.py @ 295:5e00f8123001
installation: fixed wokkel hack
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 18 Feb 2011 22:10:38 +0100 |
parents | 9821e3dde550 |
children | d1cc69161f3f |
comparison
equal
deleted
inserted
replaced
294:9821e3dde550 | 295:5e00f8123001 |
---|---|
79 | 79 |
80 def custom_wokkel_requirement(self): | 80 def custom_wokkel_requirement(self): |
81 """Test if the custom wokkel is present, else get and build it""" | 81 """Test if the custom wokkel is present, else get and build it""" |
82 if not module_installed('wokkel.muc'): | 82 if not module_installed('wokkel.muc'): |
83 sys.stdout.write ('Custom wokkel is not present, building it\n') | 83 sys.stdout.write ('Custom wokkel is not present, building it\n') |
84 sys.stdout.flush() | |
84 import tempfile | 85 import tempfile |
85 ori_path = os.getcwd() | 86 ori_path = os.getcwd() |
86 work_path = tempfile.mkdtemp() | 87 work_path = tempfile.mkdtemp() |
87 os.chdir(work_path) | 88 os.chdir(work_path) |
88 hg_path = subprocess.Popen('which hg', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1] | 89 hg_path = subprocess.Popen('which hg', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1] |
90 commands = ['%s clone http://hg.ik.nu/wokkel -r f9cd8ca1a62d' % hg_path, #XXX: we use specific revision to avoid merge conflict | 91 commands = ['%s clone http://hg.ik.nu/wokkel -r f9cd8ca1a62d' % hg_path, #XXX: we use specific revision to avoid merge conflict |
91 'cd wokkel', | 92 'cd wokkel', |
92 '%s pull -f http://hg.ik.nu/ralphm/wokkel-muc-client-support-24-2 -r 1b19c49d30c2' % hg_path, | 93 '%s pull -f http://hg.ik.nu/ralphm/wokkel-muc-client-support-24-2 -r 1b19c49d30c2' % hg_path, |
93 '%s merge wokkel-muc-client-support-24' % hg_path, | 94 '%s merge wokkel-muc-client-support-24' % hg_path, |
94 '%s commit -u "SàT installation script" -m "Merged wokkel\'s MUC branch"' % hg_path, | 95 '%s commit -u "SàT installation script" -m "Merged wokkel\'s MUC branch"' % hg_path, |
95 '%s setup.py %s' % (sys.executable, sys.argv[1:])] #XXX: we use the same arguments as for this setup.py | 96 '%s setup.py %s' % (sys.executable, ' '.join(sys.argv[1:]))] #XXX: we use the same arguments as for this setup.py |
96 for command in commands: | 97 for command in commands: |
97 if command.startswith('cd '): | 98 if command.startswith('cd '): |
98 os.chdir(command[3:]) | 99 os.chdir(command[3:]) |
99 else: | 100 else: |
100 ret = subprocess.call(command, stdout=open('/dev/null', 'w'), shell=True) | 101 ret = subprocess.call(command, stdout=open('/dev/null', 'w'), shell=True) |