aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2020-01-22 20:04:22 -0800
committerTim Orling <ticotimo@gmail.com>2020-01-22 20:06:41 -0800
commitb4d06dc4b624efe6e5bb9b8202b7787e5fc8cc4e (patch)
treeef6869905dce22692d4348afad842062fb5b6dee
parentc3708e7f025f688b03c60b500b1417ea0e630b4f (diff)
downloadmeta-python2-b4d06dc4b624efe6e5bb9b8202b7787e5fc8cc4e.tar.gz
python-booleanpy: add RDEPENDS and enable ptest
Missing run-time dependency on python- This package is a great example of how simple python module ptest can be, so enable ptest, including ptest-only dependencies. Signed-off-by: Tim Orling <ticotimo@gmail.com>
-rw-r--r--recipes-devtools/python/python-booleanpy/run-ptest2
-rw-r--r--recipes-devtools/python/python-booleanpy_3.7.bb19
2 files changed, 20 insertions, 1 deletions
diff --git a/recipes-devtools/python/python-booleanpy/run-ptest b/recipes-devtools/python/python-booleanpy/run-ptest
new file mode 100644
index 0000000..0ba239c
--- /dev/null
+++ b/recipes-devtools/python/python-booleanpy/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+py.test
diff --git a/recipes-devtools/python/python-booleanpy_3.7.bb b/recipes-devtools/python/python-booleanpy_3.7.bb
index feb9062..b80e434 100644
--- a/recipes-devtools/python/python-booleanpy_3.7.bb
+++ b/recipes-devtools/python/python-booleanpy_3.7.bb
@@ -4,11 +4,28 @@ HOMEPAGE = "https://github.com/bastikr/boolean.py"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e319747a5eb94cddf646037c01ddba47"
+SRC_URI += "file://run-ptest"
SRC_URI[md5sum] = "1189d115a38f84f5df743014926a9159"
SRC_URI[sha256sum] = "bd19b412435611ecc712603d0fd7d0e280e24698e7a6e3d5f610473870c5dd1e"
PYPI_PACKAGE = "boolean.py"
-inherit pypi setuptools
+inherit pypi setuptools ptest
+
+RDEPENDS_${PN}_append_class-target = "\
+ ${PYTHON_PN}-lang \
+"
+
+RDEPENDS_${PN}-ptest += "\
+ ${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/boolean
+ cp -rf ${S}/boolean/test_boolean.py ${D}${PTEST_PATH}/boolean/
+}
+
+FILES_${PN}-test = ""
BBCLASSEXTEND = "native nativesdk"