public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/hunter/files/, dev-python/hunter/
@ 2021-05-09  0:16 Alessandro Barbieri
  0 siblings, 0 replies; 4+ messages in thread
From: Alessandro Barbieri @ 2021-05-09  0:16 UTC (permalink / raw
  To: gentoo-commits

commit:     dd0bdca51a0ec46dcbd73e91e47c66806e708345
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun May  9 00:15:09 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun May  9 00:16:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dd0bdca5

dev-python/hunter: new version

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 dev-python/hunter/Manifest                         |  1 +
 .../remove-setuptools_scm-upper-constraint.patch   | 15 ++++++
 dev-python/hunter/hunter-3.3.3.ebuild              | 63 ++++++++++++++++++++++
 dev-python/hunter/metadata.xml                     |  4 +-
 4 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/dev-python/hunter/Manifest b/dev-python/hunter/Manifest
index 4766d81ce..c07b8acdf 100644
--- a/dev-python/hunter/Manifest
+++ b/dev-python/hunter/Manifest
@@ -1 +1,2 @@
 DIST hunter-3.3.2.tar.gz 535119 BLAKE2B 25551f04d0b2dafa6875c5c5660d2c57417bdc113960ec2b8d224c88a6b9d08b38bfbbb2deb516e7a36704164318137f5675409850c2eeff2c486a819731c756 SHA512 e3b5e7a3729074cf52a7a209e6f54a1319b3e94ff50abe4e6d8f00f3953720e3c2380de066c2a0a4e56c7a348fdd947425ae19c8907bd420d10ffb271bc07516
+DIST hunter-3.3.3.tar.gz 535662 BLAKE2B f2aa247eec34de982ab56430a0517c483609edc72d3d366a725dabf28ff6621a49411dd41a7ae16846960bb22ec4a7dc1cdb2b528a620e9eac9dc26dabec6213 SHA512 661b0f33653a6175f2172e45386c822552464a06129e2f5c8d4b88f6142a4aecc69bd657dc98ef7ffbb3d93cde537aa3a2e5f68bbced6f03b6514d39cfb99df4

diff --git a/dev-python/hunter/files/remove-setuptools_scm-upper-constraint.patch b/dev-python/hunter/files/remove-setuptools_scm-upper-constraint.patch
new file mode 100644
index 000000000..5e831b906
--- /dev/null
+++ b/dev-python/hunter/files/remove-setuptools_scm-upper-constraint.patch
@@ -0,0 +1,15 @@
+--- a/setup.py
++++ b/setup.py
+@@ -163,10 +163,10 @@
+         ':platform_system != "Windows"': ['manhole >= 1.5'],
+     },
+     setup_requires=[
+-        'setuptools_scm>=3.3.1,!=4.0.0,<6.0',
++        'setuptools_scm>=3.3.1',
+         'cython',
+     ] if Cython else [
+-        'setuptools_scm>=3.3.1,!=4.0.0,<6.0',
++        'setuptools_scm>=3.3.1',
+     ],
+     entry_points={
+         'console_scripts': [

diff --git a/dev-python/hunter/hunter-3.3.3.ebuild b/dev-python/hunter/hunter-3.3.3.ebuild
new file mode 100644
index 000000000..66200e1ea
--- /dev/null
+++ b/dev-python/hunter/hunter-3.3.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+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 ~x86"
+
+RDEPEND="dev-python/colorama[${PYTHON_USEDEP}]"
+DEPEND="
+	${RDEPEND}
+	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}]
+	)
+"
+BDEPEND="
+	dev-python/cython[${PYTHON_USEDEP}]
+	>=dev-python/setuptools_scm-3.3.1[${PYTHON_USEDEP}]
+"
+
+PATCHES=( "${FILESDIR}/remove-setuptools_scm-upper-constraint.patch" )
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs ">=dev-python/sphinx-py3doc-enhanced-theme-2.3.2"
+
+python_prepare_all() {
+	# all tests in this file fail
+	rm tests/test_remote.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_compile() {
+	distutils-r1_python_compile
+
+	if use test; then
+		"${EPYTHON}" tests/setup.py build_ext --force --inplace || die
+	fi
+}
+
+python_test() {
+	local -x PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}"
+	epytest
+}

diff --git a/dev-python/hunter/metadata.xml b/dev-python/hunter/metadata.xml
index 0d170b8b8..c0ae14636 100644
--- a/dev-python/hunter/metadata.xml
+++ b/dev-python/hunter/metadata.xml
@@ -67,7 +67,7 @@ From the other perspective, you'd be wondering if you could use Hunter to measur
 In other words, filtering events is the main selling point of Hunter - it's fast (cython implementation) and the query API is flexible enough.
   </longdescription>
   <upstream>
-    <remote-id type="github">python-hyper/hyper-h2</remote-id>
-    <remote-id type="pypi">h2</remote-id>
+    <remote-id type="github">ionelmc/python-hunter</remote-id>
+    <remote-id type="pypi">hunter</remote-id>
   </upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/hunter/files/, dev-python/hunter/
@ 2022-03-17  1:42 Alessandro Barbieri
  0 siblings, 0 replies; 4+ messages in thread
From: Alessandro Barbieri @ 2022-03-17  1:42 UTC (permalink / raw
  To: gentoo-commits

commit:     09ac1bfd7fdaec359650dcb27e4c7f41500345a9
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Mar 17 01:10:34 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Mar 17 01:10:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=09ac1bfd

dev-python/hunter: add 3.4.3

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 dev-python/hunter/Manifest                         |  1 +
 .../files/hunter-remove-vendored-colorama.patch    | 34 ++++++++++
 dev-python/hunter/hunter-3.4.3.ebuild              | 79 ++++++++++++++++++++++
 3 files changed, 114 insertions(+)

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[@]}"
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/hunter/files/, dev-python/hunter/
@ 2022-06-05  6:16 Anna Vyalkova
  0 siblings, 0 replies; 4+ messages in thread
From: Anna Vyalkova @ 2022-06-05  6:16 UTC (permalink / raw
  To: gentoo-commits

commit:     a2188881decfe7d10ddb5b833ecba1be0afa6327
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Jun  5 05:00:37 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jun  5 06:16:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a2188881

dev-python/hunter: PEP517

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 .../files/hunter-remove-vendored-colorama.patch    | 34 -------------
 ...{hunter-3.4.3.ebuild => hunter-3.4.3-r1.ebuild} | 57 ++++++++--------------
 2 files changed, 21 insertions(+), 70 deletions(-)

diff --git a/dev-python/hunter/files/hunter-remove-vendored-colorama.patch b/dev-python/hunter/files/hunter-remove-vendored-colorama.patch
deleted file mode 100644
index 1fa6342c0..000000000
--- a/dev-python/hunter/files/hunter-remove-vendored-colorama.patch
+++ /dev/null
@@ -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

diff --git a/dev-python/hunter/hunter-3.4.3.ebuild b/dev-python/hunter/hunter-3.4.3-r1.ebuild
similarity index 50%
rename from dev-python/hunter/hunter-3.4.3.ebuild
rename to dev-python/hunter/hunter-3.4.3-r1.ebuild
index 919400ccd..7b0f95954 100644
--- a/dev-python/hunter/hunter-3.4.3.ebuild
+++ b/dev-python/hunter/hunter-3.4.3-r1.ebuild
@@ -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
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/hunter/files/, dev-python/hunter/
@ 2024-04-13 12:31 Henri Gasc
  0 siblings, 0 replies; 4+ messages in thread
From: Henri Gasc @ 2024-04-13 12:31 UTC (permalink / raw
  To: gentoo-commits

commit:     c8be5c12bba275191651dcf5ebd6c67c3fc2ac3b
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Sat Apr 13 00:01:53 2024 +0000
Commit:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
CommitDate: Sat Apr 13 12:31:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c8be5c12

dev-python/hunter: add 3.6.1, drop 3.6.0

Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 dev-python/hunter/Manifest                |  2 +-
 dev-python/hunter/files/fix_backend.patch | 12 +++++
 dev-python/hunter/hunter-3.6.0.ebuild     | 87 -------------------------------
 dev-python/hunter/hunter-3.6.1.ebuild     | 77 +++++++++++++++++++++++++++
 dev-python/hunter/metadata.xml            | 44 ++++++++--------
 5 files changed, 112 insertions(+), 110 deletions(-)

diff --git a/dev-python/hunter/Manifest b/dev-python/hunter/Manifest
index 6d38f0230d..4ab653d99d 100644
--- a/dev-python/hunter/Manifest
+++ b/dev-python/hunter/Manifest
@@ -1 +1 @@
-DIST hunter-3.6.0.gh.tar.gz 626304 BLAKE2B 8cef43f6427863724b6a7f848ee938011b8de2100c12c4f7cd049156733da0076f3d04d74328aeff06edeab6e5d85a9dd564b6281644a1e6172741573f066127 SHA512 5b5a6e7e2f26f71ff151d40fe0b660141ff2d2637fa9a226e9a1a4ead5267cf1e851baa0a439a94aa4b537db3fbdc5cd660304f64ad08ee90a115516c3848547
+DIST hunter-3.6.1.gh.tar.gz 626351 BLAKE2B 077d61faa8348434ca4bb76b4f703ea341d10df0a822cd57575881082c009f3d94f3808642bd569726c20450d42c5d24a95919f099701e31cf44a50cbeb2f0b7 SHA512 1215da594c51cfce6341e3193de14a3386de4d28f0e0745c11b8bd6ba45d33d91628b8abfb528716968f119fa6ef64e7e2fb9ee222af16bfc8519eda354edd11

diff --git a/dev-python/hunter/files/fix_backend.patch b/dev-python/hunter/files/fix_backend.patch
new file mode 100644
index 0000000000..5410ea8f7d
--- /dev/null
+++ b/dev-python/hunter/files/fix_backend.patch
@@ -0,0 +1,12 @@
+Upstream uses custom file as backend
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -4,7 +4,7 @@ requires = [
+     "wheel",
+     "setuptools_scm>=3.3.1,!=4.0.0",
+ ]
+-build-backend = "backend"
++build-backend = "setuptools.build_meta"
+ backend-path = ["build_backend"]
+ 
+ [tool.ruff.per-file-ignores]

diff --git a/dev-python/hunter/hunter-3.6.0.ebuild b/dev-python/hunter/hunter-3.6.0.ebuild
deleted file mode 100644
index 06aaf43606..0000000000
--- a/dev-python/hunter/hunter-3.6.0.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..11} )
-DISTUTILS_USE_PEP517=standalone
-DISTUTILS_EXT=1
-inherit distutils-r1 multiprocessing
-
-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}.gh.tar.gz"
-S="${WORKDIR}/python-${P}"
-TEST_S="${S}_test"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64"
-
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	dev-python/setuptools-scm[${PYTHON_USEDEP}]
-	test? (
-		dev-debug/gdb
-		dev-python/aspectlib[${PYTHON_USEDEP}]
-		dev-python/ipdb[${PYTHON_USEDEP}]
-		dev-python/manhole[${PYTHON_USEDEP}]
-		dev-python/process-tests[${PYTHON_USEDEP}]
-		dev-python/six[${PYTHON_USEDEP}]
-	)
-"
-
-DOCS=( AUTHORS.rst CHANGELOG.rst README.rst )
-
-EPYTEST_DESELECT=(
-	# broken
-	#tests/test_tracer.py::test_source_cython
-	tests/test_tracer.py::test_fullsource_cython
-
-	# need pytest-benchmark
-	tests/test_cookbook.py::test_probe
-	tests/test_tracer.py::test_perf_actions
-	tests/test_tracer.py::test_perf_filter
-	tests/test_tracer.py::test_perf_stdlib
-
-	# flaky
-	tests/test_remote.py
-)
-
-distutils_enable_tests pytest
-
-distutils_enable_sphinx docs \
-	">=dev-python/sphinx-py3doc-enhanced-theme-2.3.2"
-
-src_unpack() {
-	default
-
-	if use test; then
-		cp -a "${S}" "${TEST_S}" || die
-		mv -f "${TEST_S}"/tests/setup.py "${TEST_S}"/setup.py || die
-	fi
-}
-
-src_prepare() {
-	find . -name '*.c' -delete || die "removing csources failed"
-	distutils-r1_src_prepare
-}
-
-python_compile() {
-	distutils-r1_python_compile
-
-	if use test; then
-		einfo "  Building tests"
-		cd "${TEST_S}" || die
-		esetup.py build_ext -j $(makeopts_jobs) --inplace
-	fi
-}
-
-python_test() {
-	cd "${TEST_S}"/tests || die
-	epytest
-}

diff --git a/dev-python/hunter/hunter-3.6.1.ebuild b/dev-python/hunter/hunter-3.6.1.ebuild
new file mode 100644
index 0000000000..806f3ecc01
--- /dev/null
+++ b/dev-python/hunter/hunter-3.6.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_USE_PEP517=setuptools
+
+DOCS_BUILDER="sphinx"
+DOCS_DEPEND="dev-python/sphinx-py3doc-enhanced-theme"
+DOCS_DIR="docs"
+
+inherit distutils-r1 docs
+
+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}.gh.tar.gz"
+S="${WORKDIR}/python-${P}"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="
+	dev-python/cython[${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=(
+	# Upstream uses a custom file to define backend as setuptools
+	"${FILESDIR}/fix_backend.patch"
+)
+
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+	# I think it needs internet
+	tests/test_remote.py::test_manhole_clean_exit
+	# Need a py.io module that does not seem to exist
+	tests/test_util.py::test_safe_repr
+	# Permission denied in a chroot
+	tests/test_remote.py::test_gdb
+	tests/test_remote.py::test_gdb_clean_exit
+)
+
+python_test() {
+	# Need to import files in tests folder
+	cd "${S}/tests" || die
+	if [[ "${EPYTHON}" == "python3.12" ]]; then
+		EPYTEST_DESELECT+=(
+			# From what I could understand, it fail because of a change in pathlib in 3.12
+			tests/test_cookbook.py::test_profile
+			tests/test_integration.py::test_errorsnooper
+			tests/test_integration.py::test_errorsnooper_fastmode
+		)
+	fi
+	epytest
+}
+
+src_prepare() {
+	# Need a module that does not exist (see https://github.com/ionelmc/python-hunter/issues/116)
+	rm "${S}/tests/test_tracer.py" || die
+	distutils-r1_src_prepare
+}

diff --git a/dev-python/hunter/metadata.xml b/dev-python/hunter/metadata.xml
index e7325fbe1a..1d92289a1a 100644
--- a/dev-python/hunter/metadata.xml
+++ b/dev-python/hunter/metadata.xml
@@ -8,13 +8,13 @@ Design notes
 
 Hunter doesn't do everything. As a design goal of this library some things are made intentionally austere and verbose (to avoid complexity, confusion and inconsistency). This has few consequences:
 
-    There are Operators but there's no negation operator. Instead you're expected to negate a Query object, eg: ~Q(module='re').
-    There are no specialized operators or filters - all filters behave exactly the same. For example:
-        No filter for packages. You're expected to filter by module with an operator.
-        No filter for arguments, return values or variables. You're expected to write your own filter function and deal with the problems of poking into objects.
-    Layering is minimal. There's are some helpers that do some argument processing and conversions to save you some typing but that's about it.
-    The library doesn't try to hide the mechanics of tracing in Python - it's 1:1 regarding what Python sends to a trace function if you'd be using sys.settrace.
-    Doesn't have any storage. You are expected to redirect output to a file.
+	There are Operators but there's no negation operator. Instead you're expected to negate a Query object, eg: ~Q(module='re').
+	There are no specialized operators or filters - all filters behave exactly the same. For example:
+		No filter for packages. You're expected to filter by module with an operator.
+		No filter for arguments, return values or variables. You're expected to write your own filter function and deal with the problems of poking into objects.
+	Layering is minimal. There's are some helpers that do some argument processing and conversions to save you some typing but that's about it.
+	The library doesn't try to hide the mechanics of tracing in Python - it's 1:1 regarding what Python sends to a trace function if you'd be using sys.settrace.
+	Doesn't have any storage. You are expected to redirect output to a file.
 
 You should look at it like it's a tool to help you understand and debug big applications, or a framework ridding you of the boring parts of settrace, not something that helps you learn Python.
 FAQ
@@ -22,31 +22,31 @@ Why not Smiley?
 
 There's some obvious overlap with smiley but there are few fundamental differences:
 
-    Complexity. Smiley is simply over-engineered:
-        It uses IPC and a SQL database.
-        It has a webserver. Lots of dependencies.
-        It uses threads. Side-effects and subtle bugs are introduced in your code.
-        It records everything. Tries to dump any variable. Often fails and stops working.
+	Complexity. Smiley is simply over-engineered:
+		It uses IPC and a SQL database.
+		It has a webserver. Lots of dependencies.
+		It uses threads. Side-effects and subtle bugs are introduced in your code.
+		It records everything. Tries to dump any variable. Often fails and stops working.
 
-    Why do you need all that just to debug some stuff in a terminal? Simply put, it's a nice idea but the design choices work against you when you're already neck-deep into debugging your own code. In my experience Smiley has been very buggy and unreliable. Your mileage may vary of course.
+	Why do you need all that just to debug some stuff in a terminal? Simply put, it's a nice idea but the design choices work against you when you're already neck-deep into debugging your own code. In my experience Smiley has been very buggy and unreliable. Your mileage may vary of course.
 
-    Tracing long running code. This will make Smiley record lots of data, making it unusable.
+	Tracing long running code. This will make Smiley record lots of data, making it unusable.
 
-    Now because Smiley records everything, you'd think it's better suited for short programs. But alas, if your program runs quickly then it's pointless to record the execution. You can just run it again.
+	Now because Smiley records everything, you'd think it's better suited for short programs. But alas, if your program runs quickly then it's pointless to record the execution. You can just run it again.
 
-    It seems there's only one situation where it's reasonable to use Smiley: tracing io-bound apps remotely. Those apps don't execute lots of code, they just wait on network so Smiley's storage won't blow out of proportion and tracing overhead might be acceptable.
+	It seems there's only one situation where it's reasonable to use Smiley: tracing io-bound apps remotely. Those apps don't execute lots of code, they just wait on network so Smiley's storage won't blow out of proportion and tracing overhead might be acceptable.
 
-    Use-cases. It seems to me Smiley's purpose is not really debugging code, but more of a "non interactive monitoring" tool.
+	Use-cases. It seems to me Smiley's purpose is not really debugging code, but more of a "non interactive monitoring" tool.
 
 In contrast, Hunter is very simple:
 
-    Few dependencies.
+	Few dependencies.
 
-    Low overhead (tracing/filtering code has an optional Cython extension).
+	Low overhead (tracing/filtering code has an optional Cython extension).
 
-    No storage. This simplifies lots of things.
+	No storage. This simplifies lots of things.
 
-    The only cost is that you might need to run the code multiple times to get the filtering/actions right. This means Hunter is not really suited for "post-mortem" debugging. If you can't reproduce the problem anymore then Hunter won't be of much help.
+	The only cost is that you might need to run the code multiple times to get the filtering/actions right. This means Hunter is not really suited for "post-mortem" debugging. If you can't reproduce the problem anymore then Hunter won't be of much help.
 
 Why not pytrace?
 
@@ -61,7 +61,7 @@ For purposes of debugging coverage is a great tool but only as far as "debugging
 From the other perspective, you'd be wondering if you could use Hunter to measure coverage-like things. You could do it but for that purpose Hunter is very "rough": it has no builtin storage. You'd have to implement your own storage. You can do it but it wouldn't give you any advantage over making your own tracer if you don't need to "pre-filter" whatever you're recording.
 
 In other words, filtering events is the main selling point of Hunter - it's fast (cython implementation) and the query API is flexible enough.
-  </longdescription>
+	</longdescription>
 	<upstream>
 		<remote-id type="github">ionelmc/python-hunter</remote-id>
 		<remote-id type="pypi">hunter</remote-id>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-13 12:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-17  1:42 [gentoo-commits] repo/proj/guru:dev commit in: dev-python/hunter/files/, dev-python/hunter/ Alessandro Barbieri
  -- strict thread matches above, loose matches on Subject: below --
2024-04-13 12:31 Henri Gasc
2022-06-05  6:16 Anna Vyalkova
2021-05-09  0:16 Alessandro Barbieri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox