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/pyopenssl/
Date: Mon, 02 Jan 2023 14:54:30
Message-Id: 1672671254.28f46564a5695dddfa39542de8cbbf0e9b67e362.mgorny@gentoo
1 commit: 28f46564a5695dddfa39542de8cbbf0e9b67e362
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 14:11:30 2023 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 14:54:14 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28f46564
7
8 dev-python/pyopenssl: Bump to 23.0.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pyopenssl/Manifest | 1 +
13 dev-python/pyopenssl/pyopenssl-23.0.0.ebuild | 68 ++++++++++++++++++++++++++++
14 2 files changed, 69 insertions(+)
15
16 diff --git a/dev-python/pyopenssl/Manifest b/dev-python/pyopenssl/Manifest
17 index d913c2491bd6..5862489c68f4 100644
18 --- a/dev-python/pyopenssl/Manifest
19 +++ b/dev-python/pyopenssl/Manifest
20 @@ -1 +1,2 @@
21 DIST pyOpenSSL-22.1.0.tar.gz 181704 BLAKE2B b10a8db111726c5f6626cae670a04af73cc1856a3084d3ca683fcba942724e99e5bd4ab6eb7dc4eb02ea4c6f14aa21f7744020aae1532145e1db24dbe58976cd SHA512 7cccb48cbb1655414d21c5e66e7defee7ec370cb6b46294ae0307208f9a9bc13708345b2c088a43292262f5d5bb3d45241c18ae66d2ad6824046ffe30f0c707e
22 +DIST pyOpenSSL-23.0.0.tar.gz 182375 BLAKE2B 8a902ecd7e771dcd281dda184569fef53c7f7d1a801f5cea663ff95014717786ceaaa999b6f67fe710ade253335c856c3964a96705afd6ddb93679856d57d7cd SHA512 68c42de58305461606d9fb932a7711775cfcf1a7c5dbe900b2c7ba18eab546d4c37fcd3dd82ab2c18b15eb07bef126534473b5b29f8af4f46e0147d45ac9e64b
23
24 diff --git a/dev-python/pyopenssl/pyopenssl-23.0.0.ebuild b/dev-python/pyopenssl/pyopenssl-23.0.0.ebuild
25 new file mode 100644
26 index 000000000000..4502dc0cef8e
27 --- /dev/null
28 +++ b/dev-python/pyopenssl/pyopenssl-23.0.0.ebuild
29 @@ -0,0 +1,68 @@
30 +# Copyright 1999-2023 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +DISTUTILS_USE_PEP517=setuptools
36 +PYTHON_COMPAT=( python3_{8..11} pypy3 )
37 +PYTHON_REQ_USE="threads(+)"
38 +
39 +inherit distutils-r1 toolchain-funcs
40 +
41 +MY_PN=pyOpenSSL
42 +MY_P=${MY_PN}-${PV}
43 +
44 +DESCRIPTION="Python interface to the OpenSSL library"
45 +HOMEPAGE="
46 + https://www.pyopenssl.org/
47 + https://github.com/pyca/pyopenssl/
48 + https://pypi.org/project/pyOpenSSL/
49 +"
50 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
51 +S=${WORKDIR}/${MY_P}
52 +
53 +LICENSE="Apache-2.0"
54 +SLOT="0"
55 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
56 +
57 +RDEPEND="
58 + <dev-python/cryptography-40[${PYTHON_USEDEP}]
59 + >=dev-python/cryptography-38.0.0[${PYTHON_USEDEP}]
60 +"
61 +BDEPEND="
62 + test? (
63 + $(python_gen_cond_dep '
64 + dev-python/cffi[${PYTHON_USEDEP}]
65 + ' 'python*')
66 + dev-python/flaky[${PYTHON_USEDEP}]
67 + dev-python/pretend[${PYTHON_USEDEP}]
68 + )
69 +"
70 +
71 +distutils_enable_sphinx doc \
72 + dev-python/sphinx_rtd_theme
73 +distutils_enable_tests pytest
74 +
75 +src_test() {
76 + local -x TZ=UTC
77 + local EPYTEST_DESELECT=(
78 + tests/test_ssl.py::TestContext::test_set_default_verify_paths
79 + )
80 +
81 + # test for 32-bit time_t
82 + "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null <<-EOF &>/dev/null
83 + #include <sys/types.h>
84 + int test[sizeof(time_t) >= 8 ? 1 : -1];
85 + EOF
86 +
87 + if [[ ${?} -eq 0 ]]; then
88 + einfo "time_t is at least 64-bit long"
89 + else
90 + einfo "time_t is smaller than 64 bits, will skip broken tests"
91 + EPYTEST_DESELECT+=(
92 + tests/test_crypto.py::TestX509StoreContext::test_verify_with_time
93 + )
94 + fi
95 +
96 + distutils-r1_src_test
97 +}