Skip to contentSkip to conversation

python-booleanpy: add RDEPENDS and enable ptest

PATCH New Tim Orling 1 participant 2 messages Jan 23, 2020

lore
Share & tools
lore

Tim Orling

author
#0 lore raw

PATCH v2 1/2 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.

---
 .../python/python-booleanpy/run-ptest         |  2 ++
 .../python/python-booleanpy_3.7.bb            | 19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 recipes-devtools/python/python-booleanpy/run-ptest
recipes-devtools/python/python-booleanpy/run-ptest new file +2 -0
new file mode 100644
index 00000000..0ba239c2
@@ -0,0 +1,2 @@
+#!/bin/sh
+py.test
recipes-devtools/python/python-booleanpy_3.7.bb +18 -1
index feb9062f..b80e4344 100644
@@ -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"
Signature · 1 line
2.25.0
author
#1 lore raw

PATCH v2 2/2 packagegroup-meta-python2: add python-booleanpy

Add new recipe to basic and ptest packagegroups

---
 recipes-core/packagegroups/packagegroup-meta-python2.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
recipes-core/packagegroups/packagegroup-meta-python2.bb +2 -1
index 95f9c02f..9a8826ab 100644
@@ -58,7 +58,7 @@ RDEPENDS_packagegroup-meta-python2 = "\
     python-parse-type python-ipaddress python-dbus python-cpuset python-distutils-extra \
     python-futures python-jsmin python-pygobject python-pytoml python-six python-which \
     python-netifaces python-configargparse python-sqlparse python-soupsieve python-wrapt \
-    python-deprecated \
+    python-deprecated python-booleanpy \
     ${@bb.utils.contains("DISTRO_FEATURES", "pam", "python-pam pamela", "", d)} \
     ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "python-systemd", "", d)} \
 "
@@ -82,6 +82,7 @@ RDEPENDS_packagegroup-meta-python2-connectivity = "\
 "
 
 RDEPENDS_packagegroup-meta-python2-ptest = "\
+    python-booleanpy-ptest \
     python-cryptography-ptest \
     python-pygpgme-ptest \
 "
Signature · 1 line
2.25.0