This article was Originally posted at thp.io:
How to get Python and related libraries / packages running on Tizen (1.0 “Larkspur”, as shipped on the TizenConf developer device).
Prerequisites:
- A device with Tizen 1.0 “Larkspur” installed (emulator might work too, but untested)
- The Scratchbox Build System set up for Tizen: SBS
- The “sdb” utility from the Tizen SDK (usually installed as
SDK/sdb/sdb
)
Building Python 2.7 from source
TODO: Add instructions
TODO: Add instructions
Build order (prefix is always /opt/sdl-1.2.15/
):
- SDL 1.2.15
- SDL_ttf 2.0.11, with: freetype 2.4.9
- SDL_image 1.2.12, with: libpng 1.5.10, jpegsrc v6b
- SDL_mixer 1.2.12, with: libogg 1.3.0, libvorbis 1.3.3, smpeg SVN
- PyGame 1.9.1 (requires all of the above + Python)
./configure
line needed to find some libraries:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/sdl-1.2.15/lib/pkgconfig/ ./configure \ --prefix=/opt/sdl-1.2.15/ \ --with-sdl-prefix=/opt/sdl-1.2.15/ \ CPPFLAGS="-I /opt/sdl-1.2.15/include/" \ LDFLAGS="-L/opt/sdl-1.2.15/lib/"
jpegsrc needs make install-lib
in addition to make install
to build. Also, you need to add -fPIC
to CFLAGS
in jpegsrc’s Makefile
.
Downloads
- All-in-one package: pygame_tizen.tgz
(Python 2.7.3, SDL 1.2.15, PyGame 1.9.1 and dependencies) - Download source tarballs from Sourceforge.net
Installation
- Download
pygame_tizen.tgz
from above - Copy to device:
sdb push pygame_tizen.tgz /root/
- Connect to shell:
sdb shell
- Extract archive:
tar xvzf /root/pygame_tizen.tgz -C /
- Test if Python works:
/opt/python/bin/python
- If you get greeted by a Python shell, congratulations! (otherwise, contact me)
Source thp.io