Last active
May 22, 2024 00:37
-
-
Save jegger/9549865 to your computer and use it in GitHub Desktop.
Install kivy into a virtualenv on Mac 10.9 Mavericks
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
# Inspired by: | |
# - https://gist.github.com/goldsmith/7262122 | |
# - https://gist.github.com/brousch/6589386 | |
#### 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 requiered 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 --HEAD | |
# Create virtualenv | |
sudo pip install virtualenv | |
virtualenv venv | |
# 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" | |
venv/bin/pip install cython==0.21.2 | |
rm -rf cython | |
# Install pygame | |
hg clone https://bitbucket.org/pygame/pygame | |
cd pygame | |
../venv/bin/python setup.py build | |
../venv/bin/python setup.py install | |
cd .. | |
rm -rf pygame | |
# Install kivy | |
git clone https://github.com/kivy/kivy | |
cd kivy | |
../venv/bin/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
Works Great! although it made me use Cython version 0.27.3 and used brew install smpeg instead of brew install smpeg --HEAD