I want to create a bootstrap script for setting up a local environment and installing all requirments in it. I have been trying with virtualenv.create_bootstrap_script as described in their docs.
import virtualenv
s = virtualenv.create_bootstrap_script('''
import subprocess
def after_install(options, home_dir):
subprocess.call(['pip', 'install', 'django'])
''')
open('bootstrap.py','w').write(s)
When running the resulting bootstrap.py, it sets up the virtual environment correctly, but it then attempts to install Django globally.
How can I write a bootstrap script that installs Django only in this local virtual environment. It has to work on both Windows and Linux.