From fdd22cdc5b7e1a595dcbacddd0672b7a28f54c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 3 Nov 2026 08:09:22 +0100 Subject: [PATCH] dev-python/pycryptodome: Bump to 4.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/pycryptodome/Manifest | 1 + .../pycryptodome/pycryptodome-4.3.0.ebuild | 86 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 dev-python/pycryptodome/pycryptodome-4.3.0.ebuild diff --git a/dev-python/pycryptodome/Manifest b/dev-python/pycryptodome/Manifest index d45276ad77137..d79d8f6a4ee4d 100644 --- a/dev-python/pycryptodome/Manifest +++ b/dev-python/pycryptodome/Manifest @@ -3,3 +3,4 @@ DIST pycryptodome-4.0.0.gh.tar.gz 16296945 BLAKE2B e6380f4638013d528aeb45d9db1e5 DIST pycryptodome-4.0.1.gh.tar.gz 16299237 BLAKE2B 74e0e2acca917f66c949a9da0e01e2bf0d22b67587354276aebe379e001acdd9a75c7b8d504e8d6b9c2baaaac9b8c13194a56d60d5658782e4072c783ac6da88 SHA512 ece24a54049190ac6131c4712f48f49290d910524bfe7ff5d1bd675ccf28bc6eb17ca7e642eabd9bfa1fd664a25bbc75e6f9fef92c7231a175ac8409082b8fdd DIST pycryptodome-4.1.0.gh.tar.gz 26032340 BLAKE2B 0ac96edd8df4b4b0055a1f736faab428dcaf10428e21a21e844e479355a850e7510ac4ee8b15d3a43796b6752cc764683dabb1524890726da235926143b8a4af SHA512 898c721a1e5361e2e0945f993101a3096b2e935615773d1eb68f0148468cd7da34c2ea5cbe63c1ca024ee2454c8f7c648f6727e45e5f115987c10b17aee7e6c3 DIST pycryptodome-4.2.0.gh.tar.gz 30303770 BLAKE2B a654b72099999af8685fb899e5aed4d8a943fde463c8ec0516dcdcc332f960685d25abfa1fda4c72c0da6bee65c05261bcc27e8b0dec803b4b82dfec6656195c SHA512 47ee745bd46bbe8c4480cb776ebbda437fa0beab5bb4fa2541634e736cde3f6446390e41256cb75389f323e221932e5dd1d2bc3fc5901ef4d9dc80c730f944b6 +DIST pycryptodome-4.3.0.gh.tar.gz 30393453 BLAKE2B b0b7bbc00dc1e2c570a72af56881d8e0e3b2caaf0e051cd74f02a7ff68d4f0e6ab8c5c796bee6b30930576af43834ceb330f4fe384c43d472309a7d9bf5f5158 SHA512 e8d7a9840312da707863b5e8c50ec62fe5ca93e86459d50f5f9e388e1f8a8fe8d7301f68be5b7933d3cca2aa1c000c38086f1b81031245dc1fdd9e69148112c9 diff --git a/dev-python/pycryptodome/pycryptodome-4.3.0.ebuild b/dev-python/pycryptodome/pycryptodome-4.3.0.ebuild new file mode 100644 index 0000000000000..209bc5c38ed64 --- /dev/null +++ b/dev-python/pycryptodome/pycryptodome-4.3.0.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2026 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_{12..15} ) +PYTHON_REQ_USE="threads(+)" + +inherit cmake distutils-r1 toolchain-funcs + +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 MIT Unlicense" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" + +DEPEND=" + dev-libs/gmp:= +" +BDEPEND=" + dev-python/cffi[${PYTHON_USEDEP}] +" +RDEPEND=" + ${DEPEND} + ${BDEPEND} +" + +EPYTEST_PLUGINS=() +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +CMAKE_USE_DIR=${S}/src/test + +src_prepare() { + cmake_src_prepare + distutils-r1_src_prepare + + # force sanitizer detection to fail, they break tests x_x + sed -i -e 's:-fsanitize=[a-z]*::g' src/test/CMakeLists.txt || die +} + +check_x86_opt() { + local macro=${1} + + if { use amd64 || use x86; } && + tc-cpp-is-true "defined(${macro})" ${CFLAGS} ${CPPFLAGS} + then + echo ON + else + echo OFF + fi +} + +src_test() { + local mycmakeargs=( + # TODO: grab these off CFLAGS, they enable extra tests + -DAESNI="$(check_x86_opt __AES__)" + -DSSE="$(check_x86_opt __SSSE3__)" + + -DVALGRIND=FALSE + ) + + cmake_src_configure + cmake_src_compile + cmake_src_test + + distutils-r1_src_test +} + +python_test() { + local -x PYTHONPATH=${S}/test_vectors:${PYTHONPATH} + epytest --pyargs Crypto + + # TODO: run cmake tests from src/test? +}