Skip to contentSkip to conversation

python3-polyline: update recipe to use the ptest-python-pytest class

PATCH New Derek Straka 1 participant 4 messages Jan 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 python3-polyline: update recipe to use the ptest-python-pytest class

---
 .../python/python3-polyline/run-ptest             |  3 ---
 .../python/python3-polyline_2.0.2.bb              | 15 +--------------
 2 files changed, 1 insertion(+), 17 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-polyline/run-ptest
meta-python/recipes-devtools/python/python3-polyline/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-polyline_2.0.2.bb +1 -14
index 00cb51be4..a91ceb76e 100644
@@ -5,22 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1fb8d1dc685695195bb3c1e48adfef48"
 
 SRC_URI[sha256sum] = "10541e759c5fd51f746ee304e9af94744089a4055b6257b293b3afd1df64e369"
 
-inherit pypi python_setuptools_build_meta ptest
+inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 RDEPENDS:${PN} += "python3-six"
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI += " \
-	file://run-ptest \
-"
-
-RDEPENDS:${PN}-ptest += " \
-    python3-pytest \
-    python3-unittest-automake-output \
-"
-
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/test
-	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/test/
-}
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/4 python3-platformdirs: update recipe to use the ptest-python-pytest class

---
 .../python/python3-platformdirs/run-ptest           |  3 ---
 .../python/python3-platformdirs_4.3.6.bb            | 13 +------------
 2 files changed, 1 insertion(+), 15 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-platformdirs/run-ptest
meta-python/recipes-devtools/python/python3-platformdirs/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-platformdirs_4.3.6.bb +1 -12
index 02d8c3cec..c85e12ab5 100644
@@ -3,13 +3,9 @@ HOMEPAGE = "https://github.com/platformdirs/platformdirs"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=ea4f5a41454746a9ed111e3d8723d17a"
 
-SRC_URI += " \
-    file://run-ptest \
-"
-
 SRC_URI[sha256sum] = "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"
 
-inherit pypi python_hatchling ptest
+inherit pypi python_hatchling ptest-python-pytest
 
 DEPENDS += " \
     python3-hatch-vcs-native \
@@ -18,15 +14,8 @@ DEPENDS += " \
 RDEPENDS:${PN}-ptest += " \
     python3-appdirs \
     python3-covdefaults \
-    python3-pytest \
     python3-pytest-cov \
     python3-pytest-mock \
-    python3-unittest-automake-output \
 "
 
-do_install_ptest() {
-        install -d ${D}${PTEST_PATH}
-        cp -rf ${S}/tests ${D}${PTEST_PATH}/
-}
-
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/4 python3-pint: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../recipes-devtools/python/python3-pint/run-ptest   |  3 ---
 .../recipes-devtools/python/python3-pint_0.24.4.bb   | 12 ++----------
 2 files changed, 2 insertions(+), 13 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-pint/run-ptest
meta-python/recipes-devtools/python/python3-pint/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-pint_0.24.4.bb +2 -10
index 88efefff5..1bf62ca72 100644
@@ -6,7 +6,7 @@ SECTION = "devel/python"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=bccf824202692270a1e0829a62e3f47b"
 
-inherit pypi ptest python_setuptools_build_meta
+inherit pypi ptest-python-pytest python_setuptools_build_meta
 
 SRC_URI[sha256sum] = "35275439b574837a6cd3020a5a4a73645eb125ce4152a73a2f126bf164b91b80"
 
@@ -14,9 +14,7 @@ DEPENDS += "python3-setuptools-scm-native"
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI += " \
-	file://run-ptest \
-"
+PTEST_PYTEST_DIR = "pint"
 
 RDEPENDS:${PN} += " \
 	python3-setuptools \
@@ -30,14 +28,8 @@ RDEPENDS:${PN}-ptest += " \
 	python3-flexcache \
 	python3-flexparser \
 	python3-misc \
-	python3-pytest \
 	python3-pytest-benchmark \
 	python3-pytest-subtests \
 	python3-statistics \
-	python3-unittest-automake-output \
 "
 
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/testsuite
-	cp -rf ${S}/pint/* ${D}${PTEST_PATH}/
-}
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/4 python3-pillow: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../recipes-devtools/python/python3-pillow/run-ptest |  3 ---
 .../recipes-devtools/python/python3-pillow_11.1.0.bb | 12 +++---------
 2 files changed, 3 insertions(+), 12 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-pillow/run-ptest
meta-python/recipes-devtools/python/python3-pillow/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-pillow_11.1.0.bb +3 -9
index 7be15f3f9..f8341c90f 100644
@@ -7,11 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a1b708da743e3fc0e5c35e92daac0bf8"
 
 SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=main;protocol=https \
            file://0001-support-cross-compiling.patch \
-           file://run-ptest \
            "
 SRCREV = "4c1aed801e43c6b307e7135279ca1dbc02bbf052"
 
-inherit python_setuptools_build_meta ptest
+inherit python_setuptools_build_meta ptest-python-pytest
+
+PTEST_PYTEST_DIR = "Tests"
 
 PEP517_BUILD_OPTS += " \
     -C platform-guessing=disable \
@@ -51,10 +52,8 @@ RDEPENDS:${PN}-ptest += " \
     python3-core \
     python3-image \
     python3-mmap \
-    python3-pytest \
     python3-pytest-timeout \
     python3-resource \
-    python3-unittest-automake-output \
     python3-unixadmin\
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'tk', '', d)} \
 "
@@ -65,9 +64,4 @@ S = "${WORKDIR}/git"
 
 RPROVIDES:${PN} += "python3-imaging"
 
-do_install_ptest() {
-    install -d ${D}${PTEST_PATH}/Tests
-    cp -rf ${S}/Tests ${D}${PTEST_PATH}/
-}
-
 BBCLASSEXTEND = "native"
Signature · 1 line
2.34.1