Tested on Mac OS X 10.8.5 and 10.9.3.
Not for the faint of heart. Before we begin, you will need to install XQuartz, Homebrew, and virtualenv.
I'm using virtualenv to isolate your global system settings from the KivEnt installation because it's still under heavy development and it's very messy. We'll also be using the virtual environment folder to install Kivy, Cymunk, and KivEnt without needing to add them to your repository or your .gitignore file.
Now follow these steps carefully and you should be up and running:
- Gain access to homebrew-headonly with
brew tap homebrew/headonly. You may want to do abrew updatefor good measure. - SMPEG was moved to homebrew-headonly, so install it with
brew install --HEAD smpeg - PyGame uses Mercury so we'll need that too:
brew install hg - Some image, font, and sound libraries:
brew install sdl_image sdl_mixer sdl_ttf portmidi - Create a virtual environment in your working directory:
virtualenv venv - Activate the virtual environment with
. venv/bin/activate - Install PyGame:
pip install hg+http://bitbucket.org/pygame/pygame* - Install Cython:
pip install cython* - Go into the
venvdirectory andgit clone [email protected]:kivy/kivy.git - Go into the
kivydirectory and install withmake* - Go back up to
venvandgit clone [email protected]:tito/cymunk.git - Go into the
cymunkfolder and install withpython setup.py build_ext --inplace -f* - Create a
.pthfile atvenv/lib/python2.7/site-packageswith the following contents:
../../../kivy
../../../cymunk
../../../cymunk/cymunk
../../../cymunk/cymunk/python
- Deactivate your virtual environment with
deactivateand activate it again in order to add Kivy and Cymunk to the Python path - Go into
venvandgit clone [email protected]:Kovak/KivEnt.git - Make sure you're in the
venvdirectory and create some symlinks from Kivy to KivEnt with the following commands:
ln -s $PWD/kivy/kivy/graphics/common_subset.h $PWD/KivEnt/kivent/kivent/
ln -s $PWD/kivy/kivy/graphics/gl2platform.h $PWD/KivEnt/kivent/kivent/
ln -s $PWD/kivy/kivy/graphics/khrplatform.h $PWD/KivEnt/kivent/kivent/- Go into the
KivEnt/kiventfolder and install withpython setup.py install*
* NOTE: On 10.8.5, your build commands may fail because of a clang error. If a build has failed, you will see something like this:
error: command 'clang' failed with exit status 1
The only way to consistently get rid of this error is to prefix your build commands with sudo ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future". For example, instead of python setup.py install you would use sudo ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" python setup.py install.
The commands that may need this fix are marked with an * in the instructions above.