aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleimaohui <leimaohui@cn.fujitsu.com>2018-05-27 17:34:16 -0700
committerArmin Kuster <akuster808@gmail.com>2018-08-19 07:19:58 -0700
commitfa979a06a1e45c1209b614e32635a4b7c2b777eb (patch)
treee90d066e6b951171e4407bec36c2b0fe485fc807
parentf219d791f9093861659e8ea69166c692921fcff3 (diff)
downloadmeta-python2-sumo-next.tar.gz
python-pytest: Fix conflict error as following:sumo-nextsumo
file /usr/bin/py.test conflicts between attempted installs of python3-pytest-3.4.2-r0 and python-pytest-3.4.2-r0 file /usr/bin/pytest conflicts between attempted installs of python3-pytest-3.4.2-r0 and python-pytest-3.4.2-r0 (From meta-openembedded commit: 7825bc0ed57c5da0fafd260b5e81346410582e33) Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 28fab4c8f547d45b80bb7b06d33a6c6c1ea74efc) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Tim Orling <ticotimo@gmail.com>
-rw-r--r--recipes-devtools/python/python-pytest.inc10
-rw-r--r--recipes-devtools/python/python-pytest_3.4.2.bb1
2 files changed, 11 insertions, 0 deletions
diff --git a/recipes-devtools/python/python-pytest.inc b/recipes-devtools/python/python-pytest.inc
index 4feb9a0..4c32dfb 100644
--- a/recipes-devtools/python/python-pytest.inc
+++ b/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"
diff --git a/recipes-devtools/python/python-pytest_3.4.2.bb b/recipes-devtools/python/python-pytest_3.4.2.bb
index 201ab05..39e50ac 100644
--- a/recipes-devtools/python/python-pytest_3.4.2.bb
+++ b/recipes-devtools/python/python-pytest_3.4.2.bb
@@ -6,3 +6,4 @@ RDEPENDS_${PN}_class-target += " \
${PYTHON_PN}-compiler \
${PYTHON_PN}-funcsigs \
"
+ALTERNATIVE_PRIORITY = "10"