summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-01-10 18:57:57 +0100
committerMichał Górny <mgorny@gentoo.org>2024-01-10 22:11:56 +0100
commitfbe71d3f234904736b650466bf1d324cd69aa37a (patch)
tree091e4f181175fa866691b4db38641068c5076336 /dev-python/pycryptodome
parentdev-python/oslo-config: Bump to 9.3.0 (diff)
downloadgentoo-fbe71d3f234904736b650466bf1d324cd69aa37a.tar.gz
gentoo-fbe71d3f234904736b650466bf1d324cd69aa37a.tar.bz2
gentoo-fbe71d3f234904736b650466bf1d324cd69aa37a.zip
dev-python/pycryptodome: Bump to 3.20.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.20.0.ebuild60
2 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/pycryptodome/Manifest b/dev-python/pycryptodome/Manifest
index 9447883fe3c6..adb8f8df01c8 100644
--- a/dev-python/pycryptodome/Manifest
+++ b/dev-python/pycryptodome/Manifest
@@ -1 +1,2 @@
DIST pycryptodome-3.19.1.gh.tar.gz 17158420 BLAKE2B 2180bb37e2295f0499c6d00237207513ad6c186ff8fd8fac466cc43efa9b068cf8a272b5ae30da08d37db88d354d41c0b426643743251ea8460abb6ff627e3be SHA512 103910b385578732e356145247d3c1a4a3b0fe8acf22ce91f1c1155500cce2342e5caa0dff0a30825b11d7a614853c2dcb8657628f4d65682f6e543adb4db240
+DIST pycryptodome-3.20.0.gh.tar.gz 17173888 BLAKE2B 7706a7f512579b4edf080b5074a9f226b2f0ef18a8f1faf74e890cfccff85d0599b4883cd5011a5cc0296b5a10cccce94cb2b948de29d785f6add04e54215a5a SHA512 0d65ccd93f9f78548c04aa3af01cb65b6a39e81bb3dfa4bb08acc5a5a731b17f9c5b07a1d1780739b3f358402a3596b04e446fc7b39345a4c6f03fd5a2de7ff9
diff --git a/dev-python/pycryptodome/pycryptodome-3.20.0.ebuild b/dev-python/pycryptodome/pycryptodome-3.20.0.ebuild
new file mode 100644
index 000000000000..5e41c1331da5
--- /dev/null
+++ b/dev-python/pycryptodome/pycryptodome-3.20.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..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?
+}