Created
June 14, 2011 22:43
-
-
Save corbanb/1026116 to your computer and use it in GitHub Desktop.
Easy setup for python virtualenv development enviorments
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
# Author: Corban Baxter | |
# Date created: 6/14/2011 | |
# this is a handy shell script for devs to get setup with | |
# a local python development enviorment using virtualenv | |
# and virtualenvwrapper. to be used with osx 10.6 and up. | |
# Dependencies | |
# Xcode - download from developer.apple.com or via the Appstore (http://itunes.apple.com/us/app/xcode/id422352214?mt=12) | |
# Script will install: | |
# PIP - http://pypi.python.org/pypi/pip | |
# virtualenv - http://www.virtualenv.org/en/latest/index.html | |
# virtualenvwrapper - http://pypi.python.org/pypi/virtualenvwrapper | |
# PLEASE UPDATE PATHS OR BASH PROFILE locations if you feel nessacary. | |
echo 'installing pip...' | |
easy_install pip | |
echo 'completed pip install' | |
echo '---------------------------------------' | |
echo ' ' | |
echo 'installing virtualenv...' | |
pip install virtualenv | |
echo 'completed virtualenv install' | |
echo '---------------------------------------' | |
echo ' ' | |
echo 'installing virtualenvwrapper...' | |
pip install virtualenvwrapper | |
echo 'completed virtualenvwrapper install' | |
echo '---------------------------------------' | |
echo ' ' | |
echo 'setiing up virtualenvwrapper enviorment' | |
export WORKON_HOME=~/virtualenvs | |
mkdir -p $WORKON_HOME | |
echo '---------------------------------------' | |
echo ' ' | |
echo 'setting up auto complete for virtualenvwrapper' | |
if [ -f ~/.bash_profile ]; | |
then | |
echo "You have a bash_profile setup already." | |
else | |
echo "Creating ~/.bash_profile" | |
touch ~/.bash_profile | |
fi | |
echo 'source /usr/local/bin/virtualenvwrapper.sh' >> ~/.bash_profile | |
source ~/.bash_profile | |
echo 'auto complete setup' | |
echo '---------------------------------------' | |
echo ' ' | |
echo 'usage: mkvirtualenv project_name --no-site-packages' | |
echo 'workon project_name' | |
echo ' ' | |
echo '---------- setup complete. enjoy!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment