1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
11 DISTUTILS_IN_SOURCE_BUILD=1
13 DESCRIPTION="Library for rapid development of hardware-accelerated multitouch applications"
14 HOMEPAGE="http://kivy.org/"
15 SRC_URI="https://pypi.io/packages/source/${PN:0:1}/${PN}/${P,,}.tar.gz"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="cairo camera doc examples garden gstreamer +sdl spell test"
23 dev-python/pillow[${PYTHON_USEDEP}]
24 cairo? ( dev-python/pycairo[${PYTHON_USEDEP}] )
25 camera? ( media-libs/opencv[${PYTHON_USEDEP}] )
26 garden? ( dev-python/kivy-garden[${PYTHON_USEDEP}] )
27 gstreamer? ( dev-python/gst-python:1.0[${PYTHON_USEDEP}] )
28 sdl? ( media-libs/libsdl2
31 media-libs/sdl2-mixer )
32 !sdl? ( dev-python/pygame[${PYTHON_USEDEP}] )
33 spell? ( dev-python/pyenchant[${PYTHON_USEDEP}] )"
35 dev-python/cython[${PYTHON_USEDEP}]
36 dev-python/setuptools[${PYTHON_USEDEP}]
37 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
38 test? ( dev-python/nose[${PYTHON_USEDEP}] )"
42 python_prepare_all() {
43 sed -e '/data_files=/d' -i "${S}/setup.py" || die
44 sed -e 's/PYTHON = python/PYTHON ?= python/' -i Makefile || die
46 export USE_SDL2=$(usex sdl 1 0)
47 export USE_GSTREAMER=$(usex gstreamer 1 0)
48 export KIVY_USE_SETUPTOOLS=1
49 distutils-r1_python_prepare_all
53 esetup.py build_ext --inplace
57 python_compile_all() {
62 emake test PYTHON="${PYTHON}"
65 python_install_all() {
66 use doc && HTML_DOCS=( doc/build/html/. )
67 use examples && EXAMPLES=( examples )
68 distutils-r1_python_install_all