blob: f833e6903263979b66a3c37d7965992a6d652896 [file] [log] [blame]
Patrick Williams8e7b46e2023-05-01 14:19:06 -05001SUMMARY = "Python bindings for libgpiod."
2AUTHOR = "Bartosz Golaszewski <brgl@bgdev.pl>"
3
4LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0"
5# The actual license files live in the upstream libgpiod from which the pypi
6# package is spun out.
7LIC_FILES_CHKSUM = "file://setup.py;beginline=57;endline=57;md5=120334ed83ec0cb248605e775bd13b87"
8
9SRC_URI += "file://run-ptest"
10
11SRC_URI[sha256sum] = "d5c0f9502e97e7359b9dd601e29f15d668983ce50f5c13323f3302845f790fa6"
12
13inherit setuptools3 ptest pypi
14
15PYPI_PACKAGE = "libgpiod"
16
17DEPENDS += "libgpiod"
18RDEPENDS:${PN} += " \
19 libgpiod (>= 2.0) \
20 python3-datetime \
21 python3-profile \
22"
23RDEPENDS:${PN}-ptest += " \
24 libgpiod-ptest \
25 python3-setuptools \
26"
27
28export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1", "1", "0", d)}"
29
30do_install_ptest() {
31 install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim
32 install -d ${D}${PTEST_PATH}/gpiod-test/procname
33 install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/
34 install -m 0644 ${B}/build/lib*/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim
35 install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim
36 install -m 0644 ${B}/build/lib*/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname
37 install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname
38}