Skip to content

Instantly share code, notes, and snippets.

@sixman9
Last active June 25, 2019 08:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sixman9/4483423 to your computer and use it in GitHub Desktop.
Save sixman9/4483423 to your computer and use it in GitHub Desktop.
Installs the latest Kivy source distribution from Github for Debian/Ubuntu
#!/bin/bash
kivyBaseBuildDir=/tmp
myKivyInstallAlias="kivyDev"
#Build and install Kivy on Ubuntu - http://kivy.org/docs/installation/installation.html#development-version
#Modify the PYTHONPATH to point at our Kivy install - see http://docs.python.org/2/tutorial/modules.html#the-module-search-path AND http://docs.python.org/2/tutorial/modules.html#standard-modules
sudo apt-get install python-setuptools python-pygame python-opengl python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev build-essential libgl1-mesa-dev libgles2-mesa-dev python-pip
if [ ! `pip freeze | grep -i cython` ]; then
#No Cython found - install
sudo pip install cython
else
#Upgrade to latest version, silence pip if it objects ;-)
sudo pip install –upgrade cython 2>&1
fi
#CD into kivy build container dir
pushd "$kivyBaseBuildDir"
#Clone kivy source, if necessary
if [ ! -d ./"$myKivyInstallAlias" ]; then
git clone git://github.com/kivy/kivy.git "$myKivyInstallAlias"
fi
#CD into the Kivy source directory
pushd "$myKivyInstallAlias"
#Create a git branch to work in
git checkout -b workingMaster
#Use 'make' OR 'python setup.py build_ext --inplace -f'
make
popd
echo "Build finished - Please set PYTHONPATH (http://goo.gl/wjtlC) or install Kivy (python setup.py install)"
echo "To regression test your Kivy install, cd into your Kivy directory and issue 'sudo pip install nose && make test'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment