summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/stem/stem-1.8.2.ebuild')
-rw-r--r--net-libs/stem/stem-1.8.2.ebuild50
1 files changed, 50 insertions, 0 deletions
diff --git a/net-libs/stem/stem-1.8.2.ebuild b/net-libs/stem/stem-1.8.2.ebuild
new file mode 100644
index 000000000000..8cfdad4fb4db
--- /dev/null
+++ b/net-libs/stem/stem-1.8.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} pypy3 )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Stem is a Python controller library for Tor"
+HOMEPAGE="https://stem.torproject.org"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~riscv ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="net-vpn/tor"
+BDEPEND="test? ( net-vpn/tor )"
+
+DOCS=( docs/{_static,_templates,api,tutorials,{api,change_log,contents,download,faq,index,tutorials}.rst} )
+
+PATCHES=(
+ # https://github.com/torproject/stem/issues/53
+ "${FILESDIR}"/1.8.1-Add-an-exclude-test-argument.patch
+)
+
+python_prepare_all() {
+ # https://github.com/torproject/stem/issues/56
+ sed -i '/MOCK_VERSION/d' run_tests.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local skipped_tests=(
+ --exclude-test test.integ.installation.TestInstallation.test_install
+ --exclude-test test.integ.util.system.TestSystem.test_expand_path
+ --exclude-test test.integ.control.controller.TestController.test_get_listeners
+ --exclude-test test.integ.control.controller.TestController.test_get_ports
+ --exclude-test test.integ.control.controller.TestController.test_getinfo_freshrelaydescs
+ # confused by exception text change for JSON parsing
+ --exclude-test test.unit.descriptor.collector.TestCollector.test_index_malformed_json
+ )
+
+ # We use --unit --integ to avoid the static/style/lint checks.
+ ${EPYTHON} run_tests.py --verbose --unit --integ "${skipped_tests[@]}" || die "Tests failed with ${EPYTHON}"
+}