1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_6} )
8 DESCRIPTION="A pure-python graphics and GUI library built on PyQt and numpy"
9 HOMEPAGE="http://www.pyqtgraph.org/ https://pypi.org/project/pyqtgraph/"
10 SRC_URI="http://www.pyqtgraph.org/downloads/${PV}/${P}.tar.gz"
15 IUSE="doc examples opengl svg"
17 RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
18 sci-libs/scipy[${PYTHON_USEDEP}]
19 dev-python/PyQt5[gui,widgets,opengl=,svg=,${PYTHON_USEDEP}]
20 opengl? ( dev-python/pyopengl[${PYTHON_USEDEP}] )"
22 dev-python/setuptools[${PYTHON_USEDEP}]
23 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
25 PATCHES=( "${FILESDIR}"/${P}-qt5.patch )
26 S=${WORKDIR}/${PN}-${P}
28 python_prepare_all() {
29 distutils-r1_python_prepare_all
31 # fix distutils warning
32 sed -i 's/install_requires/requires/' setup.py || die
35 rm -r pyqtgraph/opengl || die
39 python_compile_all() {
40 use doc && emake -C doc html
43 python_install_all() {
44 use doc && local HTML_DOCS=( doc/build/html/. )
45 use examples && dodoc -r examples
46 distutils-r1_python_install_all