From 9fb66a8609afc7396f751dbdf32a862c921ba599 Mon Sep 17 00:00:00 2001 From: Libo Chen Date: Thu, 13 Mar 2025 20:16:45 +0800 Subject: python3-gpt-image: add recipe GPT Image is to create GUID Partition Table disk images on local disks. Written in pure Python gpt-image allows GPT disk images to be built on a local filesystem and exported to a destination device. This is useful for creating a disk image on SD Cards or embedded devices. Home page: https://pypi.org/project/gpt-image/ Signed-off-by: Libo Chen Signed-off-by: Khem Raj --- .../python3-gpt-image/python3-gpt-image/run-ptest | 3 +++ .../python3-gpt-image/python3-gpt-image_0.9.0.bb | 30 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 meta-python/recipes-extended/python3-gpt-image/python3-gpt-image/run-ptest create mode 100644 meta-python/recipes-extended/python3-gpt-image/python3-gpt-image_0.9.0.bb (limited to 'meta-python') diff --git a/meta-python/recipes-extended/python3-gpt-image/python3-gpt-image/run-ptest b/meta-python/recipes-extended/python3-gpt-image/python3-gpt-image/run-ptest new file mode 100755 index 0000000000..3385d68939 --- /dev/null +++ b/meta-python/recipes-extended/python3-gpt-image/python3-gpt-image/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' diff --git a/meta-python/recipes-extended/python3-gpt-image/python3-gpt-image_0.9.0.bb b/meta-python/recipes-extended/python3-gpt-image/python3-gpt-image_0.9.0.bb new file mode 100644 index 0000000000..01e8091f6f --- /dev/null +++ b/meta-python/recipes-extended/python3-gpt-image/python3-gpt-image_0.9.0.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "GPT Image is used to Create GUID Partition Table disk images \ +on local disks. Written in pure Python gpt-image allows GPT disk images to \ +be built on a local filesystem and exported to a destination device." +SUMMARY = "GPT Image (pure python)" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=db5f8de88d13d0917db21293d0e82e1d" + +SRC_URI += "\ + file://run-ptest \ +" + +DEPENDS += "python3-pip" + +PYPI_PACKAGE = "gpt_image" +SRC_URI[sha256sum] = "c06d8efc7cf8d6f3954c1c3d8544f494aa95da37fe04e38a9699ad3f57455f7e" + +inherit pypi setuptools3 python3native ptest + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ +" + +do_install:append() { + rm -fr ${D}${libdir}/python*/site-packages/gpt-image/__pycache__ +} -- cgit v1.2.3-54-g00ecf