commit:     90d8705c6a242cfd09cabc1acb6ca2382e46a3cd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun May 18 02:26:03 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun May 18 02:26:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90d8705c

dev-python/pycryptodome: Bump to 3.23.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pycryptodome/Manifest                   |  1 +
 dev-python/pycryptodome/pycryptodome-3.23.0.ebuild | 60 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/dev-python/pycryptodome/Manifest b/dev-python/pycryptodome/Manifest
index 540fe06bd9d6..d2cfa7b65cff 100644
--- a/dev-python/pycryptodome/Manifest
+++ b/dev-python/pycryptodome/Manifest
@@ -1 +1,2 @@
 DIST pycryptodome-3.22.0.gh.tar.gz 19700949 BLAKE2B 
381aec9085ce2e54dd99061b5966409aca4e0da4315c0e7234f7620438cfbec303d1914ddc20ac529a5504bbdb3354976e56f0cb9c37030da142da33bf620798
 SHA512 
e997b4ffa2d003bfcd4b53af58d18e07db5aee4fea539f76c3b13c2ed92a9067d73f5bdfd19c649a2584ef143a918e9905f10e6d57a927a5d50ce19e5e95268f
+DIST pycryptodome-3.23.0.gh.tar.gz 19732639 BLAKE2B 
55ba3bea9d215dfd1f20262f9e333c78c126a7bb07b4f0ed795bb354a609082aea5ba1571fd29c76c716cfd7c74a6187509de7a8cc0e1eb03e27a2068c7aacb3
 SHA512 
564bad0257f50eaf9f4318c39bc224b79fe0051b4e2d6cff4c1070d2065cf9eb03bce661f9d21346414f9942bbc10a9f40e976eee104231718d1b9484fcbb022

diff --git a/dev-python/pycryptodome/pycryptodome-3.23.0.ebuild 
b/dev-python/pycryptodome/pycryptodome-3.23.0.ebuild
new file mode 100644
index 000000000000..0b94b9e3d4b4
--- /dev/null
+++ b/dev-python/pycryptodome/pycryptodome-3.23.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2025 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_{11..14} pypy3_11 )
+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?
+}

Reply via email to