3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
PYTHON_COMPAT=( python3_{9..11} pypy3 )
|
|
6 |
PYTHON_COMPAT=( python3_{10..11} pypy3 )
|
7 |
7 |
DISTUTILS_USE_PEP517=setuptools
|
8 |
8 |
|
9 |
9 |
inherit distutils-r1 pypi
|
... | ... | |
13 |
13 |
|
14 |
14 |
LICENSE="LGPL-3"
|
15 |
15 |
SLOT="0"
|
16 |
|
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~riscv ~x86"
|
|
16 |
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86"
|
17 |
17 |
IUSE="test"
|
18 |
18 |
RESTRICT="!test? ( test )"
|
19 |
19 |
|
20 |
|
DEPEND="test? ( dev-python/pyflakes[${PYTHON_USEDEP}]
|
21 |
|
net-vpn/tor )"
|
22 |
|
|
23 |
20 |
RDEPEND="net-vpn/tor"
|
|
21 |
BDEPEND="test? ( net-vpn/tor )"
|
24 |
22 |
|
25 |
23 |
DOCS=( docs/{_static,_templates,api,tutorials,{api,change_log,contents,download,faq,index,tutorials}.rst} )
|
26 |
24 |
|
27 |
|
src_prepare() {
|
28 |
|
default
|
29 |
|
|
30 |
|
# https://bugzilla.redhat.com/2021902
|
31 |
|
eapply "${FILESDIR}/1.8.0-replace-all-usages-of-inspect.getargspec.patch"
|
32 |
|
|
|
25 |
PATCHES=(
|
33 |
26 |
# https://github.com/torproject/stem/issues/53
|
34 |
|
eapply "${FILESDIR}/${PV}-Add-an-exclude-test-argument.patch"
|
|
27 |
"${FILESDIR}"/1.8.1-Add-an-exclude-test-argument.patch
|
|
28 |
)
|
35 |
29 |
|
|
30 |
python_prepare_all() {
|
36 |
31 |
# https://github.com/torproject/stem/issues/56
|
37 |
32 |
sed -i '/MOCK_VERSION/d' run_tests.py || die
|
|
33 |
|
|
34 |
distutils-r1_python_prepare_all
|
38 |
35 |
}
|
39 |
36 |
|
40 |
37 |
python_test() {
|
41 |
|
# Disable failing test
|
42 |
|
${PYTHON} run_tests.py --all --target RUN_ALL \
|
43 |
|
--exclude-test test.integ.installation.TestInstallation.test_install \
|
44 |
|
--exclude-test test.integ.util.system.TestSystem.test_expand_path \
|
45 |
|
--exclude-test test.integ.control.controller.TestController.test_get_listeners \
|
46 |
|
--exclude-test test.integ.control.controller.TestController.test_get_ports \
|
47 |
|
--exclude-test test.integ.control.controller.TestController.test_getinfo_freshrelaydescs \
|
48 |
|
|| die
|
|
38 |
local skipped_tests=(
|
|
39 |
--exclude-test test.integ.installation.TestInstallation.test_install
|
|
40 |
--exclude-test test.integ.util.system.TestSystem.test_expand_path
|
|
41 |
--exclude-test test.integ.control.controller.TestController.test_get_listeners
|
|
42 |
--exclude-test test.integ.control.controller.TestController.test_get_ports
|
|
43 |
--exclude-test test.integ.control.controller.TestController.test_getinfo_freshrelaydescs
|
|
44 |
# confused by exception text change for JSON parsing
|
|
45 |
--exclude-test test.unit.descriptor.collector.TestCollector.test_index_malformed_json
|
|
46 |
)
|
49 |
47 |
|
|
48 |
# We use --unit --integ to avoid the static/style/lint checks.
|
|
49 |
${EPYTHON} run_tests.py --verbose --unit --integ "${skipped_tests[@]}" || die "Tests failed with ${EPYTHON}"
|
50 |
50 |
}
|