summaryrefslogtreecommitdiff
path: root/dev-python/python-pkcs11/python-pkcs11-0.9.4.ebuild
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 16:47:34 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 16:47:34 -0500
commitdda948891d3731927b821ce31f9d9a2d03ba20c5 (patch)
tree99cd40be4cbb0606260da212cd81b8ab2db9da9b /dev-python/python-pkcs11/python-pkcs11-0.9.4.ebuild
parenta3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (diff)
downloadbaldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.gz
baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.xz
baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.zip
Adding metadata
Diffstat (limited to 'dev-python/python-pkcs11/python-pkcs11-0.9.4.ebuild')
-rw-r--r--dev-python/python-pkcs11/python-pkcs11-0.9.4.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/python-pkcs11/python-pkcs11-0.9.4.ebuild b/dev-python/python-pkcs11/python-pkcs11-0.9.4.ebuild
new file mode 100644
index 000000000000..8dc002629cc9
--- /dev/null
+++ b/dev-python/python-pkcs11/python-pkcs11-0.9.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_EXT=1
+PYPI_VERIFY_REPO=https://github.com/pyauth/python-pkcs11
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 edo pypi
+
+DESCRIPTION="PKCS#11/Cryptoki support for Python"
+HOMEPAGE="
+ https://github.com/pyauth/python-pkcs11/
+ https://pypi.org/project/python-pkcs11/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/asn1crypto[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ test? (
+ dev-libs/openssl
+ dev-libs/softhsm
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ dev-python/parameterized[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+distutils_enable_sphinx docs dev-python/sphinx-rtd-theme
+
+src_test() {
+ local -x PKCS11_MODULE="${BROOT}/usr/$(get_libdir)/softhsm/libsofthsm2.so"
+ local -x PKCS11_TOKEN_LABEL="TEST"
+ local -x PKCS11_TOKEN_PIN="1234"
+ local -x PKCS11_TOKEN_SO_PIN="5678"
+
+ mkdir -p "${HOME}/.config/softhsm2" || die
+ cat > "${HOME}/.config/softhsm2/softhsm2.conf" <<- EOF || die "Failed to create config"
+ directories.tokendir = ${T}
+ objectstore.backend = file
+ EOF
+
+ edo softhsm2-util --init-token --free \
+ --label ${PKCS11_TOKEN_LABEL} \
+ --pin ${PKCS11_TOKEN_PIN} \
+ --so-pin ${PKCS11_TOKEN_SO_PIN}
+
+ rm -r pkcs11 || die
+ distutils-r1_src_test
+}