aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python-pytest.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python-pytest.inc')
-rw-r--r--meta-python/recipes-devtools/python/python-pytest.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python-pytest.inc b/meta-python/recipes-devtools/python/python-pytest.inc
index 4feb9a03c..4c32dfb04 100644
--- a/meta-python/recipes-devtools/python/python-pytest.inc
+++ b/meta-python/recipes-devtools/python/python-pytest.inc
@@ -9,6 +9,8 @@ SRC_URI[sha256sum] = "117bad36c1a787e1a8a659df35de53ba05f9f3398fb9e4ac17e80ad590
SRC_URI_append = " file://0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch \
file://pytest_version_fix.patch "
+inherit update-alternatives
+
RDEPENDS_${PN}_class-target += " \
${PYTHON_PN}-attrs \
${PYTHON_PN}-debugger \
@@ -22,4 +24,12 @@ RDEPENDS_${PN}_class-target += " \
FILESEXTRAPATHS_prepend := "${THISDIR}/python-pytest:"
+ALTERNATIVE_${PN} += "py.test pytest"
+
+NATIVE_LINK_NAME[pytest] = "${bindir}/pytest"
+ALTERNATIVE_TARGET[pytest] = "${bindir}/pytest"
+
+ALTERNATIVE_LINK_NAME[py.test] = "${bindir}/py.test"
+ALTERNATIVE_TARGET[py.test] = "${bindir}/py.test"
+
BBCLASSEXTEND = "native nativesdk"