Created
January 17, 2012 12:41
-
-
Save nicolasH/1626513 to your computer and use it in GitHub Desktop.
This is the script I used to create a virtual environment for testing mezzanine + django-modeltranslation
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
#!/bin/sh | |
export PROJ_NAME='mezzanine_modeltranslation' | |
export VENV_NAME=$PROJ_NAME'_env' | |
#doc for virtualenv -> http://pypi.python.org/pypi/virtualenv | |
echo "This install the test environment for mezzanine + django-modeltranslation" | |
#The rest of the instructions at the end so they are not visible when using a target | |
if [ "$PIP_DOWNLOAD_CACHE" = "" ];then | |
echo "Please set a $PIP_DOWNLOAD_CACHE environment variable. You'll thank me later :-)" | |
fi | |
#--no-site-packages : ignores the global site-packages directory (default behavior) | |
#--distribute : a better setuptools | |
if [ "$1" = "create_env" ];then | |
virtualenv --distribute -p /usr/bin/python $VENV_NAME | |
cd $VENV_NAME | |
source bin/activate | |
bin/pip install mezzanine | |
echo "Creating the '$PROJ_NAME' mezzanine project" | |
mezzanine-project $PROJ_NAME | |
cd $PROJ_NAME | |
git init | |
echo "Getting the source from github ..." | |
git remote add origin [email protected]:catalpainternational/$PROJ_NAME.git | |
git fetch origin | |
git checkout -f -t origin/master -b master | |
echo "Getting the depedencies" | |
../bin/pip install -r requirements.txt | |
exit | |
fi | |
echo "It assumes that python, pip , distribute & virtualenv are already installed." | |
echo | |
echo Usage: | |
echo | |
echo "$0 create_env" | |
echo | |
echo It will create the virtualenv, mezzanine project, get the source from github and install the pip requirements. | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment