Mercurial > hg > MakeItSo
changeset 143:702216c49594
finish install script
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 29 Feb 2012 16:17:15 -0800 |
parents | a203f79c537f |
children | 18ef2d7c5b93 |
files | makeitso/python_package/INSTALL.py |
diffstat | 1 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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)