commit:     91547ec60f7309a6cbd6569972a0a8fa4d636de5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 29 04:23:17 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 04:35:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91547ec6

dev-python/pycryptodome: Bump to 3.19.1

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

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

diff --git a/dev-python/pycryptodome/Manifest b/dev-python/pycryptodome/Manifest
index 9fcc8999fb69..bc2bf065d8c2 100644
--- a/dev-python/pycryptodome/Manifest
+++ b/dev-python/pycryptodome/Manifest
@@ -1 +1,2 @@
 DIST pycryptodome-3.19.0.gh.tar.gz 17153954 BLAKE2B 
5ecaacce490e5eec052d632b1427a4e36ba19a863c28934f53f247b945bb32a1367aeaf1b8669018978bd19d53c28a00f711158c6be014779c47c48f263b2e8c
 SHA512 
1afa71336da38efb32f79d87b442a1d50537a6908ec153be7a087027a8540cebabab12922557c92e501f2d6da5c2f35466d3bbe6a3de44540de7278069691290
+DIST pycryptodome-3.19.1.gh.tar.gz 17158420 BLAKE2B 
2180bb37e2295f0499c6d00237207513ad6c186ff8fd8fac466cc43efa9b068cf8a272b5ae30da08d37db88d354d41c0b426643743251ea8460abb6ff627e3be
 SHA512 
103910b385578732e356145247d3c1a4a3b0fe8acf22ce91f1c1155500cce2342e5caa0dff0a30825b11d7a614853c2dcb8657628f4d65682f6e543adb4db240

diff --git a/dev-python/pycryptodome/pycryptodome-3.19.1.ebuild 
b/dev-python/pycryptodome/pycryptodome-3.19.1.ebuild
new file mode 100644
index 000000000000..80ff75b7a360
--- /dev/null
+++ b/dev-python/pycryptodome/pycryptodome-3.19.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2023 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..12} 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 ~ia64 ~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