Mercurial > hg > config
changeset 29:8344c7a9847c
install smartopen by default and some other cleanup (untested)
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 10 Mar 2010 14:12:41 -0500 |
parents | 4c9248b9498e |
children | 6c43389ce405 |
files | python/install_config.py |
diffstat | 1 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/python/install_config.py Tue Mar 09 21:23:39 2010 -0500 +++ b/python/install_config.py Wed Mar 10 14:12:41 2010 -0500 @@ -14,9 +14,12 @@ # make the current directory a repository import subprocess + + commands = [ ['hg', 'init'], ['hg', 'pull', SRC], ['hg', 'update', '-C'], + ['hg', 'clone', 'http://bitbucket.org/ianb/virtualenv'], # site-specific files ['mkdir', '-p', '.subversion'], @@ -24,10 +27,24 @@ ['ln', '-s', os.path.join(HOME, '.subversion_config/config'), os.path.join(HOME, '.subversion/config')], ] -for command in commands: - code = subprocess.call(command) - if code: - sys.exit(code) +def execute(*commands): + for command in commands: + print ' '.join(command) + code = subprocess.call(command) + if code: + sys.exit(code) + +execute(*commands) +def install_develop(package): + src = 'http://k0s.org/hg/%s' % package + commands = [ ['virtualenv/virtualenv.py', package], + ['mkdir', '%s/src'], + ['hg', 'clone', src, '%s/src/%s' % (package, package)], + ['%s/bin/python', '%s/src/%s/setup.py', 'develop'] ] + execute(*commands) +# install some python +install_develop('smartopen') +postinstall_commands = [ ['ln', '-s', os.path.join(HOME, 'smartopen', 'bin', 'smartopen'), os.path.join(HOME, 'bin', 'smartopen')]