aboutsummaryrefslogtreecommitdiff
blob: 6f73f68eb59ab0a7abf263852937f0f9e65f05f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{9..11} pypy3 )
DISTUTILS_USE_PEP517=setuptools
inherit edo distutils-r1 optfeature

DESCRIPTION="TLS sockets, key generation, encryption, decryption, signing, verification"
HOMEPAGE="
	https://pypi.org/project/oscrypto/
	https://github.com/wbond/oscrypto
"
SRC_URI="https://github.com/wbond/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	dev-libs/openssl
	>=dev-python/asn1crypto-1.5.1[${PYTHON_USEDEP}]
"
BDEPEND="
	test? (
		virtual/python-cffi[${PYTHON_USEDEP}]
	)
"

DOCS=( docs {changelog,readme}.md )

distutils_enable_tests unittest

python_test() {
	local -x OSCRYPTO_SKIP_INTERNET_TESTS="true"
	edo ${EPYTHON} -m tests
}

pkg_postinst() {
	optfeature "faster FFI" virtual/python-cffi
}