I used a raspbian pisces R2 wheezy image (http://www.raspbian.org/PiscesImages) apt-get updated and upgraded. I installed the packages required following the installation instructions for Ubuntu at http://kivy.org/docs/installation/installation.html. I installed the development version (1.3.0) from github. Then I modified the setup.py file so that it would find the Broadcom files in /opt/vc before looking in /usr. Eg replacing lines such as
- Code: Select all
default_header_dirs = ['/usr/include', '/usr/local/include']
with
- Code: Select all
default_header_dirs = ['/opt/vc/include', '/usr/include', '/usr/local/include']
I then compiled and installed Kivy using checkinstall to make removal easier and cleaner
- Code: Select all
checkinstall python setup.py install
This simple Hello World runs from a terminal window in X:
- Code: Select all
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text='Hello World')
TestApp().run()
The full-window button turns blue a full second after the mouse click.
Is this an issue with X, the drivers, my approach or have I missed something? At least it seems possible that Python Kivy will be usable eventually.