mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-12 08:33:15 -04:00
dev-python/hunter: PEP517
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
--- a/src/hunter/actions.py
|
||||
+++ b/src/hunter/actions.py
|
||||
@@ -8,6 +8,8 @@
|
||||
from itertools import islice
|
||||
from os import getpid
|
||||
|
||||
+from colorama import AnsiToWin32
|
||||
+
|
||||
from . import config
|
||||
from .util import BUILTIN_SYMBOLS
|
||||
from .util import CALL_COLORS
|
||||
@@ -22,7 +20,6 @@
|
||||
from .util import frame_iterator
|
||||
from .util import iter_symbols
|
||||
from .util import safe_repr
|
||||
-from .vendor.colorama import AnsiToWin32
|
||||
|
||||
try:
|
||||
from threading import get_ident
|
||||
--- a/src/hunter/util.py
|
||||
+++ b/src/hunter/util.py
|
||||
@@ -8,9 +8,9 @@
|
||||
from collections import defaultdict
|
||||
from collections import deque
|
||||
|
||||
+from colorama import Back
|
||||
+from colorama import Fore
|
||||
+from colorama import Style
|
||||
-from .vendor.colorama import Back
|
||||
-from .vendor.colorama import Fore
|
||||
-from .vendor.colorama import Style
|
||||
|
||||
try:
|
||||
import __builtin__ as builtins
|
||||
@@ -4,8 +4,8 @@
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit distutils-r1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
inherit distutils-r1 edo multiprocessing
|
||||
|
||||
DESCRIPTION="Hunter is a flexible code tracing toolkit"
|
||||
HOMEPAGE="
|
||||
@@ -18,12 +18,14 @@ LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND=">=dev-python/colorama-0.4.4[${PYTHON_USEDEP}]"
|
||||
# python-hunter only works if deps are vendored (some .pth stuff)
|
||||
#RDEPEND="
|
||||
#>=dev-python/colorama-0.4.4[${PYTHON_USEDEP}]
|
||||
#dev-python/cymem[${PYTHON_USEDEP}]
|
||||
#"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
"
|
||||
# toml is an indirect dependency (needed by ipdb)
|
||||
BDEPEND="
|
||||
>=dev-python/setuptools_scm-3.3.1[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
@@ -33,50 +35,33 @@ BDEPEND="
|
||||
dev-python/process-tests[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-benchmark[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
|
||||
dev-python/toml[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
" # toml is an indirect dependency (needed by ipdb)
|
||||
|
||||
DOCS=( AUTHORS.rst CHANGELOG.rst README.rst )
|
||||
PATCHES=( "${FILESDIR}/${PN}-remove-vendored-colorama.patch" )
|
||||
|
||||
EPYTEST_IGNORE=( test_remote.py )
|
||||
EPYTEST_DESELECT=(
|
||||
tests/test_tracer.py::test_source_cython
|
||||
tests/test_tracer.py::test_fullsource_cython
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
distutils_enable_sphinx docs ">=dev-python/sphinx-py3doc-enhanced-theme-2.3.2"
|
||||
|
||||
src_prepare() {
|
||||
# remove vendored colorama
|
||||
rm -r src/hunter/vendor || die
|
||||
default
|
||||
}
|
||||
distutils_enable_sphinx docs ">=dev-python/sphinx-py3doc-enhanced-theme-2.3.2"
|
||||
|
||||
python_compile() {
|
||||
distutils-r1_python_compile
|
||||
|
||||
if use test; then
|
||||
"${EPYTHON}" tests/setup.py build_ext --force --inplace || die
|
||||
esetup.py build_ext -j $(makeopts_jobs) --inplace
|
||||
edo ${EPYTHON} tests/setup.py build_ext -j $(makeopts_jobs) --inplace
|
||||
rm -rf build || die
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local PUREPYTHONHUNTER
|
||||
local -x PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}"
|
||||
local epytest_args=(
|
||||
--deselect tests/test_remote.py::test_gdb
|
||||
--deselect tests/test_remote.py::test_gdb_clean_exit
|
||||
--deselect tests/test_remote.py::test_manhole
|
||||
--deselect tests/test_remote.py::test_manhole_clean_exit
|
||||
)
|
||||
|
||||
if [[ ${EPYTHON} == python3.10 ]]; then
|
||||
epytest_args+=(
|
||||
--deselect tests/test_cookbook.py::test_probe
|
||||
--deselect tests/test_tracer.py::test_perf_filter[pure]
|
||||
--deselect tests/test_tracer.py::test_perf_stdlib[pure]
|
||||
--deselect tests/test_tracer.py::test_perf_actions[pure]
|
||||
--deselect tests/test_tracer.py::test_proper_backend
|
||||
)
|
||||
PUREPYTHONHUNTER="yes"
|
||||
fi
|
||||
|
||||
epytest "${epytest_args[@]}"
|
||||
cd tests || die
|
||||
epytest
|
||||
}
|
||||
Reference in New Issue
Block a user