Skip to content

Instantly share code, notes, and snippets.

@keyboardscience
Created April 20, 2016 02:15
Show Gist options
  • Select an option

  • Save keyboardscience/5f277a66db3a6ce6a7bbac2275701cae to your computer and use it in GitHub Desktop.

Select an option

Save keyboardscience/5f277a66db3a6ce6a7bbac2275701cae to your computer and use it in GitHub Desktop.
#!/usr/bin/python2.7
import virtualenv
import os
extra_text = """
def after_install(options, home_dir):
# Install dependencies
subprocess.call([join(home_dir, 'bin', 'pip'),
'install', 'mock'])
subprocess.call([join(home_dir, 'bin', 'pip'),
'install', 'ansible'])
subprocess.call([join(home_dir, 'bin', 'pip'),
'install', 'pygithub'])
subprocess.call([join(home_dir, 'bin', 'pip'),
'install', 'ldap'])
subprocess.call([join(home_dir, 'bin', 'pip'),
'install', 'pyconsul'])
subprocess.call([join(home_dir, 'bin', 'pip'),
'install', 'docker'])
"""
script = virtualenv.create_bootstrap_script(extra_text, python_version='2.7')
exec(script)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment