devtools: python: add support for pycryptodomx

pycryptodome is a fork of pycrypto.

it can be installed as a drop-in replacement for pycrypto (this is refered as pycryptodome)
or an independent library that is install alongside pycrypto ( this is refered as pycryptodomex)
see https://pycryptodome.readthedocs.io/en/latest/src/installation.html for more details.
This commit installs it as independent library.

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
This commit is contained in:
Silvano di Ninno 2020-02-03 13:00:35 +01:00
parent 3c548fdb17
commit dbe9f7cdff
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,31 @@
SUMMARY = "Cryptographic library for Python"
DESCRIPTION = "PyCryptodome is a self-contained Python package of low-level \
cryptographic primitives.\
This library is a fork of the pycrypto library. It can be installed as a drop-in replacement\
or an independent library that works along side pycrypto."
HOMEPAGE = "http://www.pycryptodome.org"
LICENSE = "PD & BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=6dc0e2a13d2f25d6f123c434b761faba"
SRC_URI[md5sum] = "46ba513d95b6e323734074d960a7d57b"
SRC_URI[sha256sum] = "22d970cee5c096b9123415e183ae03702b2cd4d3ba3f0ced25c4e1aba3967167"
inherit pypi
RDEPENDS_${PN} += " \
${PYTHON_PN}-io \
${PYTHON_PN}-math \
"
RDEPENDS_${PN}-tests += " \
${PYTHON_PN}-unittest \
"
PACKAGES =+ "${PN}-tests"
FILES_${PN}-tests += " \
${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \
${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/__pycache__/ \
"
BBCLASSEXTEND = "native nativesdk"

View File

@ -0,0 +1,7 @@
require python-pycryptodome.inc
inherit setuptools3
# This recipe install pycryptodome as an independent library.
do_configure_prepend () {
touch ${S}/.separate_namespace
}