Skip to content

Commit

Permalink
dev-python/pycryptodome: Bump to 3.18.0
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed May 20, 2023
1 parent 058f6df commit 6a3adfd
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-python/pycryptodome/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST pycryptodome-3.17.0.gh.tar.gz 16714317 BLAKE2B a7a96ba4d10078ba4d9bc02b384c982ad7307065fd6c9118def43bebc073eccdfc11a766742e5d0207e9cce32aca2fe3da51f8a59964de8c15db6808cc2aae03 SHA512 c0a0754c0dd1d8138e8dd27c034e3f3469237eb5f205d86d0c5e2377fd7672c6ed0df9717292a73d380daaabe88c3be80b575ca1149f4c70f08d82aed0d4b39c
DIST pycryptodome-3.18.0.gh.tar.gz 16720227 BLAKE2B dfdc3a7cc0b1aea1e7b7d8f6e8bcf651ca92f0020e2c51849512d00e716283537feb884cacdc655d99a6b992305db9b899172d022bc9ff65d6349ee40b40c4d5 SHA512 a30a6b406bfd1d4288169924924636246c36999ca1e14c5cb70bd2f71ce25739dae04726ca97bdaebf7a8b36927cc6f617fbe2599fad48512a2c5e016a528247
61 changes: 61 additions & 0 deletions dev-python/pycryptodome/pycryptodome-3.18.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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..11} 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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"

DEPEND="
dev-libs/gmp:0=
>=dev-libs/libtomcrypt-1.18.2-r1:=
"
BDEPEND="
virtual/python-cffi[${PYTHON_USEDEP}]
"
RDEPEND="
${DEPEND}
${BDEPEND}
!dev-python/pycrypto
"

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?
}

0 comments on commit 6a3adfd

Please sign in to comment.