Skip to content

Instantly share code, notes, and snippets.

@hfaran
Created October 16, 2015 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hfaran/3e0e7036bf1ece1d0fd9 to your computer and use it in GitHub Desktop.
Save hfaran/3e0e7036bf1ece1d0fd9 to your computer and use it in GitHub Desktop.
# Inspired by:
# - https://gist.github.com/jegger/9549865
#### Some hints ####
# Currently kivy apps only work on monitor 1 (multiple monitor setup)
# You have to place the terminal which runs kivy on the monitor 1 or make the app fullscreen.
# Make sure you have the "command line tools" for mavericks installed!
# (xcode-select --install)
# Install brew
# ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# Install required packages
brew install mercurial sdl sdl_image sdl_mixer sdl_ttf portmidi
# Install smpeg package via another brew tap
brew tap homebrew/headonly
brew install smpeg
# Install virtualenvwrapper
sudo pip install virtualenvwrapper
# Add the following to your ~/.bashrc
# pip install virtualenvwrapper
export WORKON_HOME=~/.virtualenv_Envs
_VIRTUALENVWRAPPER_SH="/usr/local/bin/virtualenvwrapper.sh"
if [ -f $_VIRTUALENVWRAPPER_SH ]
then
source $_VIRTUALENVWRAPPER_SH
fi
# Create virtualenv
mkvirtualenv kivy
# Install cython
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc
export CXX="g++ -arch i386 -arch x86_64"
pip install cython==0.21.2
# Install pygame
hg clone https://bitbucket.org/pygame/pygame
cd pygame
python setup.py build
python setup.py install
cd ..
rm -rf pygame
# Install kivy
git clone https://github.com/kivy/kivy
cd kivy
python setup.py install
cd ..
rm -rf kivy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment