2025-05-04 17:39:32 -05:00
|
|
|
# Copyright 1999-2025 Gentoo Authors
|
2023-03-05 12:25:26 +05:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
2025-05-04 17:39:32 -05:00
|
|
|
PYTHON_COMPAT=( python3_{11..13} )
|
2023-03-05 12:25:26 +05:00
|
|
|
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? (
|
2024-01-19 19:24:49 +09:00
|
|
|
$(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*')
|
2023-03-05 12:25:26 +05:00
|
|
|
)
|
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
DOCS=( docs {changelog,readme}.md )
|
|
|
|
|
|
2024-05-14 19:42:26 -04:00
|
|
|
PATCHES=(
|
|
|
|
|
"${FILESDIR}"/openssl-3.0.10-fix.patch
|
|
|
|
|
"${FILESDIR}"/py3.12.patch
|
|
|
|
|
)
|
|
|
|
|
|
2023-03-05 12:25:26 +05:00
|
|
|
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
|
|
|
|
|
}
|