summaryrefslogtreecommitdiff
path: root/dev-python/line_profiler/line_profiler-3.0.2.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-02-17 01:16:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-02-17 01:16:38 +0000
commit53cba99042fa967e2a93da9f8db806fe2d035543 (patch)
tree9780d3b87dfc6bdebc6b7b7d15af1ecb813c6853 /dev-python/line_profiler/line_profiler-3.0.2.ebuild
parent71deace00d1a2b091313fe137ab7092418c6f87c (diff)
gentoo resync : 17.02.2020
Diffstat (limited to 'dev-python/line_profiler/line_profiler-3.0.2.ebuild')
-rw-r--r--dev-python/line_profiler/line_profiler-3.0.2.ebuild17
1 files changed, 16 insertions, 1 deletions
diff --git a/dev-python/line_profiler/line_profiler-3.0.2.ebuild b/dev-python/line_profiler/line_profiler-3.0.2.ebuild
index e7db155b3e30..4c08a5c1f82d 100644
--- a/dev-python/line_profiler/line_profiler-3.0.2.ebuild
+++ b/dev-python/line_profiler/line_profiler-3.0.2.ebuild
@@ -22,7 +22,22 @@ BDEPEND="dev-python/cython[${PYTHON_USEDEP}]
RDEPEND="dev-python/ipython[${PYTHON_USEDEP}]"
-DEPEND="test? ( dev-python/coverage[${PYTHON_USEDEP}]
+DEPEND="test? (
+ dev-python/coverage[${PYTHON_USEDEP}]
dev-python/ubelt[${PYTHON_USEDEP}] )"
distutils_enable_tests pytest
+
+python_test() {
+ # tests fail if not already installed
+ # to fix this, source files should be in PYTHONPATH
+ # also, tests call kernprof, so we have to move that
+ # back to the source files and make it executable
+ cp "${BUILD_DIR}/lib/kernprof.py" "${WORKDIR}/${P}/kernprof" || die
+ chmod +x "${WORKDIR}/${P}/kernprof" || die
+ cp "${BUILD_DIR}/lib/${PN}" -r "${WORKDIR}/${P}" || die
+ PYTHONPATH="${WORKDIR}/${P}"
+ PATH="${PATH}:${WORKDIR}/${P}"
+
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+}