Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/sentry-sdk/
Date: Wed, 09 Sep 2020 22:16:40
Message-Id: 1599689791.23b1518c28a3980e4b07fd731915165c61522bb2.mgorny@gentoo
1 commit: 23b1518c28a3980e4b07fd731915165c61522bb2
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 9 22:09:25 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 9 22:16:31 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23b1518c
7
8 dev-python/sentry-sdk: Enable a subset of tests
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/sentry-sdk/sentry-sdk-0.16.3-r1.ebuild | 72 +++++++++++++++++++++++
13 1 file changed, 72 insertions(+)
14
15 diff --git a/dev-python/sentry-sdk/sentry-sdk-0.16.3-r1.ebuild b/dev-python/sentry-sdk/sentry-sdk-0.16.3-r1.ebuild
16 new file mode 100644
17 index 00000000000..bcf4bc99755
18 --- /dev/null
19 +++ b/dev-python/sentry-sdk/sentry-sdk-0.16.3-r1.ebuild
20 @@ -0,0 +1,72 @@
21 +# Copyright 1999-2020 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +PYTHON_COMPAT=( python3_{6..9} )
27 +
28 +inherit distutils-r1
29 +
30 +DESCRIPTION="Python client for Sentry"
31 +HOMEPAGE="https://getsentry.com https://pypi.org/project/sentry-sdk/"
32 +SRC_URI="https://github.com/getsentry/sentry-python/archive/${PV}.tar.gz -> ${P}.tar.gz"
33 +S="${WORKDIR}/sentry-python-${PV}"
34 +
35 +LICENSE="PSF-2"
36 +SLOT="0"
37 +KEYWORDS="~amd64 ~x86"
38 +
39 +RDEPEND="
40 + dev-python/urllib3[${PYTHON_USEDEP}]
41 + dev-python/certifi[${PYTHON_USEDEP}]
42 +"
43 +BDEPEND="
44 + test? (
45 + <dev-python/dnspython-2[${PYTHON_USEDEP}]
46 + dev-python/flask-login[${PYTHON_USEDEP}]
47 + dev-python/gevent[${PYTHON_USEDEP}]
48 + dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
49 + dev-python/pytest-forked[${PYTHON_USEDEP}]
50 + dev-python/pytest-localserver[${PYTHON_USEDEP}]
51 + dev-python/werkzeug[${PYTHON_USEDEP}]
52 + $(python_gen_cond_dep '
53 + dev-python/aiocontextvars[${PYTHON_USEDEP}]
54 + dev-python/contextvars[${PYTHON_USEDEP}]
55 + ' python3_6)
56 + )
57 +"
58 +
59 +distutils_enable_tests pytest
60 +
61 +python_test() {
62 + local deselect=(
63 + # unpackaged 'executing'
64 + --ignore tests/test_client.py
65 + --ignore tests/integrations/django/test_basic.py
66 + # unpackaged 'fakeredis'
67 + --ignore tests/integrations/redis/test_redis.py
68 + --ignore tests/integrations/rq/test_rq.py
69 + # tests require Internet access
70 + --ignore tests/integrations/stdlib/test_httplib.py
71 + --ignore tests/integrations/requests/test_requests.py
72 + # fails on py3.6, hangs on py3.7+
73 + --deselect
74 + 'tests/test_transport.py::test_transport_works[eventlet'
75 + # TODO
76 + --deselect
77 + 'tests/test_basics.py::test_auto_enabling_integrations_catches_import_error'
78 + # test_filename: apparently unhappy about pytest being called pytest
79 + --deselect 'tests/utils/test_general.py::test_filename'
80 + # test_circular_references: apparently fragile
81 + --deselect
82 + 'tests/integrations/threading/test_threading.py::test_circular_references'
83 + )
84 + [[ ${EPYTHON} == python3.6 ]] && deselect+=(
85 + # broken with contextvars on py3.6
86 + --deselect
87 + 'tests/utils/test_contextvars.py::test_leaks[greenlet]'
88 + --deselect
89 + 'tests/test_transport.py::test_transport_works[greenlet'
90 + )
91 + pytest -vv "${deselect[@]}" || die "Tests failed with ${EPYTHON}"
92 +}