# HG changeset patch # User Jeff Hammel # Date 1330560931 28800 # Node ID c6e459be8534ab51a926253e9675ca13d9951e3c # Parent 76c93927153467d02f73c502965621ef07be3517 fix install script diff -r 76c939271534 -r c6e459be8534 INSTALL.py --- a/INSTALL.py Wed Feb 29 16:05:08 2012 -0800 +++ b/INSTALL.py Wed Feb 29 16:15:31 2012 -0800 @@ -43,11 +43,24 @@ # clone the repository call(['hg', 'clone', REPO], cwd=src) -""" -XXX unfinished + # find the virtualenv python + python = None + for path in (('bin', 'python'), ('Scripts', 'python.exe')): + _python = os.path.join(DEST, *path) + if os.path.exists(_python) + python = _python + break + else: + raise Exception("Python binary not found in %s" % DEST) -hg clone ${REPO} -cd FileServer -python setup.py develop -""" + # find the clone + filename = REPO.rstrip('/') + filename = REPO.split('/')[-1] + clone = os.path.join(src, filename) + assert os.path.exists(clone), "Clone directory not found in %s" % src + # ensure setup.py exists + assert os.path.exists(os.path.join(clone, 'setup.py')), 'setup.py not found in %s' % clone + + # install the package in develop mode + call([python 'setup.py', 'develop'], cwd=clone)