Skip to content

Instantly share code, notes, and snippets.

@lambdalisue
Last active January 25, 2016 14:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lambdalisue/1224448 to your computer and use it in GitHub Desktop.
Save lambdalisue/1224448 to your computer and use it in GitHub Desktop.
Build python develop environment via pythonbrew
#!/bin/bash
PLATFORM=`uname`
PYTHON_VERSION=2.7.2
if [ "$PLATFORM" = 'Linux' ]; then
echo "Installing required packages..."
yes | sudo apt-get install curl python-all-dev python3-all-dev
yes | sudo apt-get install libreadline6-dev libsqlite3-dev libgdbm-dev
yes | sudo apt-get install libbz2-dev build-essential libxml2-dev libxslt1-dev
# Patch for PIL
wget -q -O - https://raw.github.com/gist/1225180/patch.sh | sudo bash
else
# Path for PIL
curl https://raw.github.com/gist/1229763/patch.sh | bash
fi
echo "Installing pythonbrew..."
curl -kL http://xrl.us/pythonbrewinstall | bash
source $HOME/.pythonbrew/etc/bashrc
echo "Add following lines on your rc file and hit return."
echo
echo " [[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc"
echo
read INPUT
echo "Installing Python $PYTHON_VERSION with --enable-unicode=ucs4 options"
pythonbrew install --no-test --verbose --configure="--enable-unicode=ucs4" $PYTHON_VERSION
pythonbrew switch $PYTHON_VERSION
pythonbrew venv init
#!/bin/bash
PLATFORM=`uname`
PYTHON_VERSION=2.7.2
if [ "$PLATFORM" = 'Linux' ]; then
echo "Installing required packages..."
yes | sudo apt-get install curl python-all-dev python3-all-dev
yes | sudo apt-get install libreadline6-dev libsqlite3-dev libgdbm-dev
yes | sudo apt-get install libbz2-dev build-essential libxml2-dev libxslt1-dev
# Patch for PIL
wget -q -O - https://raw.github.com/gist/1225180/patch.sh | sudo bash
else
# Path for PIL
curl https://raw.github.com/gist/1229763/patch.sh | bash
fi
echo "Installing pythonbrew..."
curl -kL http://xrl.us/pythonbrewinstall | bash
source $HOME/.pythonbrew/etc/bashrc
echo "Add following lines on your rc file and hit return."
echo
echo " [[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc"
echo
read INPUT
echo "Installing Python $PYTHON_VERSION with --enable-unicode=ucs4 options"
pythonbrew install --no-test --verbose --configure="--enable-unicode=ucs4" $PYTHON_VERSION
pythonbrew switch $PYTHON_VERSION
pythonbrew venv init
pythonbrew venv create Kawaz
pythonbrew venv use Kawaz
echo "Cloning Kawaz to Home..."
cd $HOME
git clone git@github.com:kawazrepos/Kawaz.git
cd Kawaz
echo "Installing required python packages..."
python setup.py develop
echo "Building database..."
python src/Kawaz/manage.py syncdb
echo "Running develop server as http://localhost:5000. To stop the server, Enter Ctrl-C on this Terminal."
python src/Kawaz/manage.py runserver 5000
#!/bin/bash
PLATFORM=`uname`
PYTHON_VERSION=2.7.2
if [ "$PLATFORM" = 'Linux' ]; then
echo "Installing required packages..."
yes | sudo apt-get install curl python-all-dev python3-all-dev
yes | sudo apt-get install libreadline6-dev libsqlite3-dev libgdbm-dev
yes | sudo apt-get install libbz2-dev build-essential libxml2-dev libxslt1-dev
# Patch for PIL
wget -q -O - https://raw.github.com/gist/1225180/patch.sh | sudo bash
else
# Path for PIL
curl https://raw.github.com/gist/1229763/patch.sh | bash
fi
echo "Installing pythonbrew..."
curl -kL http://xrl.us/pythonbrewinstall | bash
source $HOME/.pythonbrew/etc/bashrc
echo "Add following lines on your rc file and hit return."
echo
echo " [[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc"
echo
read INPUT
echo "Installing Python $PYTHON_VERSION with --enable-unicode=ucs4 options"
pythonbrew install --no-test --verbose --configure="--enable-unicode=ucs4" $PYTHON_VERSION
pythonbrew switch $PYTHON_VERSION
pythonbrew venv init
pythonbrew venv create Kommonz
pythonbrew venv use Kommonz
echo "Cloning Kommonz to Home..."
cd $HOME
git clone git@github.com:kawazrepos/Kommonz.git
cd Kommonz
echo "Installing required python packages..."
python setup.py develop
echo "Building database..."
python src/Kommonz/manage.py syncdb
echo "Running develop server as http://localhost:5000. To stop the server, Enter Ctrl-C on this Terminal."
python src/Kommonz/manage.py runserver 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment