Skip to content

Instantly share code, notes, and snippets.

@lostcitizen
Last active August 29, 2015 13:57
Show Gist options
  • Save lostcitizen/9483553 to your computer and use it in GitHub Desktop.
Save lostcitizen/9483553 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Install necessary system packages
sudo apt-get install -y build-essential mercurial git python2.7 python-setuptools python-dev python-gst0.10 ffmpeg gstreamer0.10-plugins-good libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libgl1-mesa-dev libgles2-mesa-dev zlib1g-dev openjdk-7-jdk
# Bootstrap a current Python virtualenv
sudo apt-get remove --purge -y python-virtualenv python-pip
sudo easy_install-2.7 -U pip
sudo pip2.7 install -U virtualenv
# Create a vitualenv
sudo rm -rf venv
virtualenv -p python2.7 venv
# Install current version of cython into the virtualenv
sudo apt-get remove --purge -y cython
sudo pip uninstall --yes cython
venv/bin/pip install -U cython
# Install other PyGame and Kivy dependencies
venv/bin/pip install -U numpy
# Install pygame into the virtualenv
hg clone https://bitbucket.org/pygame/pygame
cd pygame
../venv/bin/python setup.py build
../venv/bin/python setup.py install
sudo ../venv/bin/python setup.py install
cd ..
sudo rm -rf pygame
# Install stable version of Kivy into the virtualenv
venv/bin/pip install kivy
# Install development version of buildozer into the virtualenv
git clone https://github.com/kivy/buildozer.git
cd buildozer
../venv/bin/python setup.py install
cd ..
rm -rf buildozer
# Install a couple of dependencies for KivyCatalog
venv/bin/pip install --upgrade pygments docutils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment