aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-03-17 02:10:34 +0100
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-03-17 02:10:34 +0100
commit09ac1bfd7fdaec359650dcb27e4c7f41500345a9 (patch)
tree0ed88e945df7da1cbf4dd4902ca598a1da0d19b9 /dev-python/hunter
parentdev-python/neutron-lib: add 2.20.0, drop 2.15.0 (diff)
downloadguru-09ac1bfd7fdaec359650dcb27e4c7f41500345a9.tar.gz
guru-09ac1bfd7fdaec359650dcb27e4c7f41500345a9.tar.bz2
guru-09ac1bfd7fdaec359650dcb27e4c7f41500345a9.zip
dev-python/hunter: add 3.4.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'dev-python/hunter')
-rw-r--r--dev-python/hunter/Manifest1
-rw-r--r--dev-python/hunter/files/hunter-remove-vendored-colorama.patch34
-rw-r--r--dev-python/hunter/hunter-3.4.3.ebuild79
3 files changed, 114 insertions, 0 deletions
diff --git a/dev-python/hunter/Manifest b/dev-python/hunter/Manifest
index 8d0386983..1cbe63eef 100644
--- a/dev-python/hunter/Manifest
+++ b/dev-python/hunter/Manifest
@@ -1 +1,2 @@
DIST hunter-3.3.8.tar.gz 536260 BLAKE2B cdb048798dd831229f3c3ff784b16f94ee45c54bc35eb29e9b228f2736c103dbc39357df82476a2b25310501d33be67474f85c2f5a97a61baca20c8dfc5a725f SHA512 4d715893c805afb5ca709f8c8ce20fbf5ec8540a06c7536862d941a5a4f45b0721f8cd3aa2eeb79c072152d243f4d0ce949431defbdc8c17831f744c3f7ff58a
+DIST hunter-3.4.3.tar.gz 538017 BLAKE2B 92ad2b653d0285059ea2f005c6ba9564f357e1ea438a0fe30087f88efa202aaa504bad65985a88484cf7178c24432ac44705098dabc2667328c71e0ee38f718c SHA512 921bb48ac5d384977908dda060e178e623eb7c1e4298cbf3c0a273cab23695f2a2a60221afb257e54cd144399d2b3b55b80ae9a2c7f71ba452894cc86112d5f7
diff --git a/dev-python/hunter/files/hunter-remove-vendored-colorama.patch b/dev-python/hunter/files/hunter-remove-vendored-colorama.patch
new file mode 100644
index 000000000..1fa6342c0
--- /dev/null
+++ b/dev-python/hunter/files/hunter-remove-vendored-colorama.patch
@@ -0,0 +1,34 @@
+--- 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
diff --git a/dev-python/hunter/hunter-3.4.3.ebuild b/dev-python/hunter/hunter-3.4.3.ebuild
new file mode 100644
index 000000000..08a454f17
--- /dev/null
+++ b/dev-python/hunter/hunter-3.4.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Hunter is a flexible code tracing toolkit"
+HOMEPAGE="
+ https://github.com/ionelmc/python-hunter
+ https://pypi.org/project/hunter/
+"
+SRC_URI="https://github.com/ionelmc/python-${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/python-${P}"
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=dev-python/colorama-0.4.4[${PYTHON_USEDEP}]"
+DEPEND="
+ ${RDEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ >=dev-python/setuptools_scm-3.3.1[${PYTHON_USEDEP}]
+ test? (
+ dev-python/aspectlib[${PYTHON_USEDEP}]
+ dev-python/ipdb[${PYTHON_USEDEP}]
+ dev-python/manhole[${PYTHON_USEDEP}]
+ dev-python/process-tests[${PYTHON_USEDEP}]
+ dev-python/pytest-benchmark[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ )
+"
+
+DOCS=( AUTHORS.rst CHANGELOG.rst README.rst )
+PATCHES=( "${FILESDIR}/${PN}-remove-vendored-colorama.patch" )
+
+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
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ if use test; then
+ "${EPYTHON}" tests/setup.py build_ext --force --inplace || 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[@]}"
+}