]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
python3-license-expression: fix ptest installation
authorRoss Burton <ross.burton@arm.com>
Wed, 12 Feb 2025 20:31:13 +0000 (20:31 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Feb 2025 22:04:00 +0000 (22:04 +0000)
This recipe was overriding do_install_ptest which is provided by the
ptest-python-pytest class, so there was no tests or run-ptest installed.

Use an append override, and minimise the installed files: use a symlink
so that scancode-licensedb-index.json is found and install setup.cfg.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3-license-expression_30.4.1.bb

index 649b53ea49285f05cae4f27ae1ab8976437e280f..ec613f6eaac12a2b194c02ff7750a779d465e893 100644 (file)
@@ -22,8 +22,9 @@ RDEPENDS:${PN} += "\
 
 BBCLASSEXTEND = "native nativesdk"
 
-do_install_ptest() {
+do_install_ptest:append() {
+    # The tests need some files from the source tree
     install -d ${D}${PTEST_PATH}/src
-    cp -rf ${S}/src/* ${D}${PTEST_PATH}/src/
-    cp -rf ${S}/setup.cfg ${D}${PTEST_PATH}/
+    ln -s ${PYTHON_SITEPACKAGES_DIR}/license_expression/ ${D}${PTEST_PATH}/src/
+    install -m644 ${S}/setup.cfg ${D}${PTEST_PATH}/
 }