summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-10-03 05:25:51 +0200
committerMichał Górny <mgorny@gentoo.org>2024-10-03 05:31:00 +0200
commit3dde3d05468744a5c09bd306855293e7d29fff79 (patch)
treeb4a2ca2c993cc89975cfd98928055d989048bb9c /dev-python/pycryptodome
parentdev-python/tomli: Bump to 2.0.2 (diff)
downloadgentoo-3dde3d05468744a5c09bd306855293e7d29fff79.tar.gz
gentoo-3dde3d05468744a5c09bd306855293e7d29fff79.tar.bz2
gentoo-3dde3d05468744a5c09bd306855293e7d29fff79.zip
dev-python/pycryptodome: Bump to 3.21.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pycryptodome')
-rw-r--r--dev-python/pycryptodome/Manifest1
-rw-r--r--dev-python/pycryptodome/pycryptodome-3.21.0.ebuild60
2 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/pycryptodome/Manifest b/dev-python/pycryptodome/Manifest
index 49c39d87d206..842ad2a87c80 100644
--- a/dev-python/pycryptodome/Manifest
+++ b/dev-python/pycryptodome/Manifest
@@ -1 +1,2 @@
DIST pycryptodome-3.20.0.gh.tar.gz 17173888 BLAKE2B 7706a7f512579b4edf080b5074a9f226b2f0ef18a8f1faf74e890cfccff85d0599b4883cd5011a5cc0296b5a10cccce94cb2b948de29d785f6add04e54215a5a SHA512 0d65ccd93f9f78548c04aa3af01cb65b6a39e81bb3dfa4bb08acc5a5a731b17f9c5b07a1d1780739b3f358402a3596b04e446fc7b39345a4c6f03fd5a2de7ff9
+DIST pycryptodome-3.21.0.gh.tar.gz 17464067 BLAKE2B 5fcf62317053ae3d1dddd90bb223e9866944b4c4325ae146c17c48d2345c06c3fc9951dc72c135ec5a61043b7eced92b69c9bc5f43d47e1f512b9c9ce94fa310 SHA512 cfb66b1e53547992b9405bc6a2d90ed3bc3d1857a01ef619069b9d1aa24d809a9d46d8b0d824999588dd6c0de9a5e39db70b572a9954f0ead0dd39f9b7cedbcc
diff --git a/dev-python/pycryptodome/pycryptodome-3.21.0.ebuild b/dev-python/pycryptodome/pycryptodome-3.21.0.ebuild
new file mode 100644
index 000000000000..e4e2740433f5
--- /dev/null
+++ b/dev-python/pycryptodome/pycryptodome-3.21.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="A self-contained cryptographic library for Python"
+HOMEPAGE="
+ https://www.pycryptodome.org/
+ https://github.com/Legrandin/pycryptodome/
+ https://pypi.org/project/pycryptodome/
+"
+SRC_URI="
+ https://github.com/Legrandin/pycryptodome/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD-2 Unlicense"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+
+DEPEND="
+ dev-libs/gmp:=
+ >=dev-libs/libtomcrypt-1.18.2-r1:=
+"
+BDEPEND="
+ $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*')
+"
+RDEPEND="
+ ${DEPEND}
+ ${BDEPEND}
+"
+
+PATCHES=(
+ "${FILESDIR}/pycryptodome-3.10.1-system-libtomcrypt.patch"
+)
+
+python_prepare_all() {
+ # make sure we're unbundling it correctly
+ rm -r src/libtom || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local -x PYTHONPATH=${S}/test_vectors:${PYTHONPATH}
+ "${EPYTHON}" - <<-EOF || die
+ import sys
+ from Crypto import SelfTest
+ SelfTest.run(verbosity=2, stream=sys.stdout)
+ EOF
+
+ # TODO: run cmake tests from src/test?
+}