1 |
commit: d039f6d21f8fb2633d83f415c134040bf0334ef2 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 12 14:21:27 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 12 16:16:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d039f6d2 |
7 |
|
8 |
dev-python/pyopenssl: EAPI 8, PEP517 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pyopenssl/pyopenssl-20.0.1-r1.ebuild | 67 +++++++++++++++++++++++++ |
13 |
1 file changed, 67 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/pyopenssl/pyopenssl-20.0.1-r1.ebuild b/dev-python/pyopenssl/pyopenssl-20.0.1-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..70032fc7f99a |
18 |
--- /dev/null |
19 |
+++ b/dev-python/pyopenssl/pyopenssl-20.0.1-r1.ebuild |
20 |
@@ -0,0 +1,67 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
28 |
+PYTHON_REQ_USE="threads(+)" |
29 |
+ |
30 |
+inherit distutils-r1 toolchain-funcs |
31 |
+ |
32 |
+MY_PN=pyOpenSSL |
33 |
+MY_P=${MY_PN}-${PV} |
34 |
+ |
35 |
+DESCRIPTION="Python interface to the OpenSSL library" |
36 |
+HOMEPAGE=" |
37 |
+ https://www.pyopenssl.org/ |
38 |
+ https://pypi.org/project/pyOpenSSL/ |
39 |
+ https://github.com/pyca/pyopenssl/ |
40 |
+" |
41 |
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" |
42 |
+S=${WORKDIR}/${MY_P} |
43 |
+ |
44 |
+LICENSE="Apache-2.0" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
47 |
+ |
48 |
+RDEPEND=" |
49 |
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}] |
50 |
+ >=dev-python/cryptography-3.2[${PYTHON_USEDEP}] |
51 |
+" |
52 |
+BDEPEND=" |
53 |
+ test? ( |
54 |
+ virtual/python-cffi[${PYTHON_USEDEP}] |
55 |
+ dev-python/flaky[${PYTHON_USEDEP}] |
56 |
+ dev-python/pretend[${PYTHON_USEDEP}] |
57 |
+ >=dev-python/pytest-3.0.1[${PYTHON_USEDEP}] |
58 |
+ ) |
59 |
+" |
60 |
+ |
61 |
+distutils_enable_sphinx doc \ |
62 |
+ dev-python/sphinx_rtd_theme |
63 |
+distutils_enable_tests pytest |
64 |
+ |
65 |
+src_test() { |
66 |
+ local -x TZ=UTC |
67 |
+ local EPYTEST_DESELECT=( |
68 |
+ tests/test_ssl.py::TestContext::test_set_default_verify_paths |
69 |
+ ) |
70 |
+ |
71 |
+ # test for 32-bit time_t |
72 |
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null <<-EOF &>/dev/null |
73 |
+ #include <sys/types.h> |
74 |
+ int test[sizeof(time_t) >= 8 ? 1 : -1]; |
75 |
+ EOF |
76 |
+ |
77 |
+ if [[ ${?} -eq 0 ]]; then |
78 |
+ einfo "time_t is at least 64-bit long" |
79 |
+ else |
80 |
+ einfo "time_t is smaller than 64 bits, will skip broken tests" |
81 |
+ EPYTEST_DESELECT+=( |
82 |
+ tests/test_crypto.py::TestX509StoreContext::test_verify_with_time |
83 |
+ ) |
84 |
+ fi |
85 |
+ |
86 |
+ distutils-r1_src_test |
87 |
+} |