Last active
December 12, 2015 11:19
-
-
Save clwyatt/4765329 to your computer and use it in GitHub Desktop.
Python development environment setup using virtualenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import virtualenv, textwrap | |
output = virtualenv.create_bootstrap_script(textwrap.dedent(""" | |
from os.path import join | |
from os import getcwd | |
from subprocess import call | |
def after_install(options, home_dir): | |
pip = join(getcwd(), home_dir, 'bin', 'pip') | |
easy = join(getcwd(), home_dir, 'bin', 'easy_install') | |
call([pip, 'install', 'numpy']) | |
call([pip, 'install', 'nibabel']) | |
call([easy, 'lxml']) | |
call([easy, 'httplib2']) | |
call([pip, 'install', 'pyxnat']) | |
""")) | |
f = open('devenv-bootstrap.py', 'w').write(output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment