Skip to content

Instantly share code, notes, and snippets.

@nonamenix
Last active December 27, 2015 12:09
Show Gist options
  • Save nonamenix/7324026 to your computer and use it in GitHub Desktop.
Save nonamenix/7324026 to your computer and use it in GitHub Desktop.
make django project environment
#!/bin/bash
echo $0: Creating virtual environment
virtualenv_name = ${1:-<myenv>}
virtualenv --prompt="$virtualenv_name" ./env
mkdir ./logs
mkdir ./pids
mkdir ./db
mkdir ./static_content
mkdir ./static_content/media
echo $0: Installing dependencies
source ./env/bin/activate
export PIP_REQUIRE_VIRTUALENV=true
./env/bin/pip install --requirement=./requirements.conf --log=./logs/build_pip_packages.log
echo $0: Making virtual environment relocatable
virtualenv --relocatable ./env
echo $0: Creating virtual environment finished.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment