dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / dev-python / pyglet / pyglet-1.5.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{7,8} )
7
8 inherit distutils-r1 virtualx xdg-utils
9
10 DESCRIPTION="Cross-platform windowing and multimedia library for Python"
11 HOMEPAGE="http://www.pyglet.org/"
12 SRC_URI="https://github.com/pyglet/pyglet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17 IUSE="examples image +sound test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         virtual/opengl
22         image? ( || (
23                 dev-python/pillow[${PYTHON_USEDEP}]
24                 x11-libs/gtk+:2
25         ) )
26         sound? ( || (
27                 media-libs/openal
28                 media-sound/pulseaudio
29         ) )
30 "
31 #       ffmpeg? ( media-libs/avbin-bin )
32
33 BDEPEND="
34         test? (
35                 dev-python/pillow[${PYTHON_USEDEP}]
36                 dev-python/pytest[${PYTHON_USEDEP}]
37         )
38 "
39
40 # pyglet.gl.glx_info.GLXInfoException: pyglet requires an X server with GLX
41 # Other tests fail or stall for unknown reasons.
42 RESTRICT=test
43
44 DOCS=(
45         DESIGN
46         NOTICE
47         README.md
48         RELEASE_NOTES
49 )
50
51 python_test() {
52         xdg_environment_reset
53         run_in_build_dir virtx pytest -v "${S}"/tests
54 }
55
56 python_install_all() {
57         if use examples; then
58                 dodoc -r examples
59                 docompress -x /usr/share/doc/${PF}/examples
60         fi
61
62         distutils-r1_python_install_all
63 }