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