1 |
commit: a2188881decfe7d10ddb5b833ecba1be0afa6327 |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Sun Jun 5 05:00:37 2022 +0000 |
4 |
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
5 |
CommitDate: Sun Jun 5 06:16:10 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a2188881 |
7 |
|
8 |
dev-python/hunter: PEP517 |
9 |
|
10 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
11 |
|
12 |
.../files/hunter-remove-vendored-colorama.patch | 34 ------------- |
13 |
...{hunter-3.4.3.ebuild => hunter-3.4.3-r1.ebuild} | 57 ++++++++-------------- |
14 |
2 files changed, 21 insertions(+), 70 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/hunter/files/hunter-remove-vendored-colorama.patch b/dev-python/hunter/files/hunter-remove-vendored-colorama.patch |
17 |
deleted file mode 100644 |
18 |
index 1fa6342c0..000000000 |
19 |
--- a/dev-python/hunter/files/hunter-remove-vendored-colorama.patch |
20 |
+++ /dev/null |
21 |
@@ -1,34 +0,0 @@ |
22 |
---- a/src/hunter/actions.py |
23 |
-+++ b/src/hunter/actions.py |
24 |
-@@ -8,6 +8,8 @@ |
25 |
- from itertools import islice |
26 |
- from os import getpid |
27 |
- |
28 |
-+from colorama import AnsiToWin32 |
29 |
-+ |
30 |
- from . import config |
31 |
- from .util import BUILTIN_SYMBOLS |
32 |
- from .util import CALL_COLORS |
33 |
-@@ -22,7 +20,6 @@ |
34 |
- from .util import frame_iterator |
35 |
- from .util import iter_symbols |
36 |
- from .util import safe_repr |
37 |
--from .vendor.colorama import AnsiToWin32 |
38 |
- |
39 |
- try: |
40 |
- from threading import get_ident |
41 |
---- a/src/hunter/util.py |
42 |
-+++ b/src/hunter/util.py |
43 |
-@@ -8,9 +8,9 @@ |
44 |
- from collections import defaultdict |
45 |
- from collections import deque |
46 |
- |
47 |
-+from colorama import Back |
48 |
-+from colorama import Fore |
49 |
-+from colorama import Style |
50 |
--from .vendor.colorama import Back |
51 |
--from .vendor.colorama import Fore |
52 |
--from .vendor.colorama import Style |
53 |
- |
54 |
- try: |
55 |
- import __builtin__ as builtins |
56 |
|
57 |
diff --git a/dev-python/hunter/hunter-3.4.3.ebuild b/dev-python/hunter/hunter-3.4.3-r1.ebuild |
58 |
similarity index 50% |
59 |
rename from dev-python/hunter/hunter-3.4.3.ebuild |
60 |
rename to dev-python/hunter/hunter-3.4.3-r1.ebuild |
61 |
index 919400ccd..7b0f95954 100644 |
62 |
--- a/dev-python/hunter/hunter-3.4.3.ebuild |
63 |
+++ b/dev-python/hunter/hunter-3.4.3-r1.ebuild |
64 |
@@ -4,8 +4,8 @@ |
65 |
EAPI=8 |
66 |
|
67 |
PYTHON_COMPAT=( python3_{8..10} ) |
68 |
- |
69 |
-inherit distutils-r1 |
70 |
+DISTUTILS_USE_PEP517=setuptools |
71 |
+inherit distutils-r1 edo multiprocessing |
72 |
|
73 |
DESCRIPTION="Hunter is a flexible code tracing toolkit" |
74 |
HOMEPAGE=" |
75 |
@@ -18,12 +18,14 @@ LICENSE="BSD-2" |
76 |
SLOT="0" |
77 |
KEYWORDS="~amd64" |
78 |
|
79 |
-RDEPEND=">=dev-python/colorama-0.4.4[${PYTHON_USEDEP}]" |
80 |
+# python-hunter only works if deps are vendored (some .pth stuff) |
81 |
+#RDEPEND=" |
82 |
+ #>=dev-python/colorama-0.4.4[${PYTHON_USEDEP}] |
83 |
+ #dev-python/cymem[${PYTHON_USEDEP}] |
84 |
+#" |
85 |
DEPEND=" |
86 |
- ${RDEPEND} |
87 |
dev-python/cython[${PYTHON_USEDEP}] |
88 |
" |
89 |
-# toml is an indirect dependency (needed by ipdb) |
90 |
BDEPEND=" |
91 |
>=dev-python/setuptools_scm-3.3.1[${PYTHON_USEDEP}] |
92 |
test? ( |
93 |
@@ -33,50 +35,33 @@ BDEPEND=" |
94 |
dev-python/process-tests[${PYTHON_USEDEP}] |
95 |
dev-python/pytest-benchmark[${PYTHON_USEDEP}] |
96 |
dev-python/six[${PYTHON_USEDEP}] |
97 |
- |
98 |
dev-python/toml[${PYTHON_USEDEP}] |
99 |
) |
100 |
-" |
101 |
+" # toml is an indirect dependency (needed by ipdb) |
102 |
|
103 |
DOCS=( AUTHORS.rst CHANGELOG.rst README.rst ) |
104 |
-PATCHES=( "${FILESDIR}/${PN}-remove-vendored-colorama.patch" ) |
105 |
+ |
106 |
+EPYTEST_IGNORE=( test_remote.py ) |
107 |
+EPYTEST_DESELECT=( |
108 |
+ tests/test_tracer.py::test_source_cython |
109 |
+ tests/test_tracer.py::test_fullsource_cython |
110 |
+) |
111 |
|
112 |
distutils_enable_tests pytest |
113 |
-distutils_enable_sphinx docs ">=dev-python/sphinx-py3doc-enhanced-theme-2.3.2" |
114 |
|
115 |
-src_prepare() { |
116 |
- # remove vendored colorama |
117 |
- rm -r src/hunter/vendor || die |
118 |
- default |
119 |
-} |
120 |
+distutils_enable_sphinx docs ">=dev-python/sphinx-py3doc-enhanced-theme-2.3.2" |
121 |
|
122 |
python_compile() { |
123 |
distutils-r1_python_compile |
124 |
+ |
125 |
if use test; then |
126 |
- "${EPYTHON}" tests/setup.py build_ext --force --inplace || die |
127 |
+ esetup.py build_ext -j $(makeopts_jobs) --inplace |
128 |
+ edo ${EPYTHON} tests/setup.py build_ext -j $(makeopts_jobs) --inplace |
129 |
+ rm -rf build || die |
130 |
fi |
131 |
} |
132 |
|
133 |
python_test() { |
134 |
- local PUREPYTHONHUNTER |
135 |
- local -x PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}" |
136 |
- local epytest_args=( |
137 |
- --deselect tests/test_remote.py::test_gdb |
138 |
- --deselect tests/test_remote.py::test_gdb_clean_exit |
139 |
- --deselect tests/test_remote.py::test_manhole |
140 |
- --deselect tests/test_remote.py::test_manhole_clean_exit |
141 |
- ) |
142 |
- |
143 |
- if [[ ${EPYTHON} == python3.10 ]]; then |
144 |
- epytest_args+=( |
145 |
- --deselect tests/test_cookbook.py::test_probe |
146 |
- --deselect tests/test_tracer.py::test_perf_filter[pure] |
147 |
- --deselect tests/test_tracer.py::test_perf_stdlib[pure] |
148 |
- --deselect tests/test_tracer.py::test_perf_actions[pure] |
149 |
- --deselect tests/test_tracer.py::test_proper_backend |
150 |
- ) |
151 |
- PUREPYTHONHUNTER="yes" |
152 |
- fi |
153 |
- |
154 |
- epytest "${epytest_args[@]}" |
155 |
+ cd tests || die |
156 |
+ epytest |
157 |
} |