dev-python/twisted: keyworded 20.3.0 for ia64, bug #726328
[gentoo.git] / dev-python / line_profiler / line_profiler-3.0.2.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_{6,7} )
7
8 DISTUTILS_USE_SETUPTOOLS=rdepend
9
10 inherit distutils-r1
11
12 DESCRIPTION="Line-by-line profiler"
13 HOMEPAGE="https://github.com/pyutils/line_profiler"
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
15
16 SLOT="0"
17 LICENSE="BSD"
18 KEYWORDS="~amd64 ~x86"
19
20 BDEPEND="dev-python/cython[${PYTHON_USEDEP}]
21         dev-python/scikit-build[${PYTHON_USEDEP}]"
22
23 RDEPEND="dev-python/ipython[${PYTHON_USEDEP}]"
24
25 DEPEND="test? (
26         dev-python/coverage[${PYTHON_USEDEP}]
27         dev-python/ubelt[${PYTHON_USEDEP}] )"
28
29 distutils_enable_tests pytest
30
31 python_test() {
32         # tests fail if not already installed
33         # to fix this, source files should be in PYTHONPATH
34         # also, tests call kernprof, so we have to move that
35         # back to the source files and make it executable
36         cp "${BUILD_DIR}/lib/kernprof.py" "${WORKDIR}/${P}/kernprof" || die
37         chmod +x "${WORKDIR}/${P}/kernprof" || die
38         cp "${BUILD_DIR}/lib/${PN}" -r "${WORKDIR}/${P}" || die
39         PYTHONPATH="${WORKDIR}/${P}"
40         PATH="${PATH}:${WORKDIR}/${P}"
41
42         pytest -vv || die "Tests fail with ${EPYTHON}"
43 }