# HG changeset patch # User Jeff Hammel # Date 1330561035 28800 # Node ID 702216c49594e432e74aceb9f143dd06903cf668 # Parent a203f79c537f2df37ae95d1e9de0589b18bb921d finish install script diff -r a203f79c537f -r 702216c49594 makeitso/python_package/INSTALL.py --- a/makeitso/python_package/INSTALL.py Wed Feb 29 10:59:11 2012 -0800 +++ b/makeitso/python_package/INSTALL.py Wed Feb 29 16:17:15 2012 -0800 @@ -43,10 +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 {{project}} -python setup.py develop -""" + # find the clone + filename = REPO.rstrip('/') + filename = filename.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)