Skip to content

Instantly share code, notes, and snippets.

@bruntonspall
Created January 22, 2010 16:24
Show Gist options
  • Save bruntonspall/283882 to your computer and use it in GitHub Desktop.
Save bruntonspall/283882 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
import sys
import subprocess
import shutil
pwd = os.path.abspath(os.path.dirname(__file__))
vedir = os.path.join(pwd,"ve")
if os.path.exists(vedir):
shutil.rmtree(vedir)
os.environ['PIP_DOWNLOAD_CACHE'] = os.path.expanduser(os.path.join('~','.cache','pip'))
pip = os.path.join(pwd,"pip.py")
requirements = os.path.join(pwd,"requirements.txt")
print pip,requirements
subprocess.call([pip,"install",
"-E",vedir,
"--enable-site-packages",
"--requirement",requirements])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment