]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
python3-pefile: add recipe from meta-openembedded
authorMikko Rapeli <mikko.rapeli@linaro.org>
Sun, 22 Sep 2024 08:41:17 +0000 (11:41 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Oct 2024 11:40:34 +0000 (12:40 +0100)
It is needed by systemd ukify tool and uki.bbclass to generate
UEFI boot binaries. Added to fast list in ptest-packagelists.inc.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-devtools/python/python3-pefile/run-ptest [new file with mode: 0644]
meta/recipes-devtools/python/python3-pefile_2023.2.7.bb [new file with mode: 0644]

index 7b8418654a504882db0ff8c563962ab6e2f3a892..4a48188562b77282b4874e7d1e0ec83b14f29c8b 100644 (file)
@@ -70,6 +70,7 @@ PTESTS_FAST = "\
     python3-more-itertools \
     python3-packaging \
     python3-pluggy \
+    python3-pefile \
     python3-pyasn1 \
     python3-pytz \
     python3-pyyaml \
diff --git a/meta/recipes-devtools/python/python3-pefile/run-ptest b/meta/recipes-devtools/python/python3-pefile/run-ptest
new file mode 100644 (file)
index 0000000..95ae723
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake --ignore=./tests/pefile_test.py
diff --git a/meta/recipes-devtools/python/python3-pefile_2023.2.7.bb b/meta/recipes-devtools/python/python3-pefile_2023.2.7.bb
new file mode 100644 (file)
index 0000000..e30b362
--- /dev/null
@@ -0,0 +1,28 @@
+SUMMARY = "Python PE parsing module"
+DESCRIPTION = "A multi-platform Python module to parse and work with Portable Executable (PE) files."
+HOMEPAGE = "https://github.com/erocarrera/pefile"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=38066667888b01d8118ff9cc23da1873"
+
+inherit setuptools3 ptest
+SRCREV = "1ab2807c4eec16041e791d7a6acc68cc23fd5266"
+SRC_URI = "git://github.com/erocarrera/pefile;branch=master;protocol=https \
+           file://run-ptest"
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest() {
+   install -d ${D}${PTEST_PATH}/tests
+   cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS:${PN} += " \
+    python3-mmap \
+    python3-netclient \
+    python3-stringold \
+"
+RDEPENDS:${PN}-ptest += "\
+    python3-pytest \
+    python3-unittest-automake-output \
+"