Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 1 | SUMMARY = "Python bindings for libgpiod." |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 2 | |
| 3 | LICENSE = "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. |
| 6 | LIC_FILES_CHKSUM = "file://setup.py;beginline=57;endline=57;md5=120334ed83ec0cb248605e775bd13b87" |
| 7 | |
| 8 | SRC_URI += "file://run-ptest" |
| 9 | |
| 10 | SRC_URI[sha256sum] = "d5c0f9502e97e7359b9dd601e29f15d668983ce50f5c13323f3302845f790fa6" |
| 11 | |
| 12 | inherit setuptools3 ptest pypi |
| 13 | |
| 14 | PYPI_PACKAGE = "libgpiod" |
| 15 | |
| 16 | DEPENDS += "libgpiod" |
| 17 | RDEPENDS:${PN} += " \ |
| 18 | libgpiod (>= 2.0) \ |
| 19 | python3-datetime \ |
| 20 | python3-profile \ |
| 21 | " |
| 22 | RDEPENDS:${PN}-ptest += " \ |
| 23 | libgpiod-ptest \ |
| 24 | python3-setuptools \ |
| 25 | " |
| 26 | |
| 27 | export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1", "1", "0", d)}" |
| 28 | |
| 29 | do_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 | } |