diff options
Diffstat (limited to 'meta-python')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb | 38 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-gpiod_2.0.bb | 49 |
2 files changed, 38 insertions, 49 deletions
diff --git a/meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb b/meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb new file mode 100644 index 0000000000..f833e69032 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | SUMMARY = "Python bindings for libgpiod." | ||
2 | AUTHOR = "Bartosz Golaszewski <brgl@bgdev.pl>" | ||
3 | |||
4 | LICENSE = "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. | ||
7 | LIC_FILES_CHKSUM = "file://setup.py;beginline=57;endline=57;md5=120334ed83ec0cb248605e775bd13b87" | ||
8 | |||
9 | SRC_URI += "file://run-ptest" | ||
10 | |||
11 | SRC_URI[sha256sum] = "d5c0f9502e97e7359b9dd601e29f15d668983ce50f5c13323f3302845f790fa6" | ||
12 | |||
13 | inherit setuptools3 ptest pypi | ||
14 | |||
15 | PYPI_PACKAGE = "libgpiod" | ||
16 | |||
17 | DEPENDS += "libgpiod" | ||
18 | RDEPENDS:${PN} += " \ | ||
19 | libgpiod (>= 2.0) \ | ||
20 | python3-datetime \ | ||
21 | python3-profile \ | ||
22 | " | ||
23 | RDEPENDS:${PN}-ptest += " \ | ||
24 | libgpiod-ptest \ | ||
25 | python3-setuptools \ | ||
26 | " | ||
27 | |||
28 | export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1", "1", "0", d)}" | ||
29 | |||
30 | do_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 | } | ||
diff --git a/meta-python/recipes-devtools/python/python3-gpiod_2.0.bb b/meta-python/recipes-devtools/python/python3-gpiod_2.0.bb deleted file mode 100644 index e39d5beb10..0000000000 --- a/meta-python/recipes-devtools/python/python3-gpiod_2.0.bb +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | SUMMARY = "Python bindings for libgpiod." | ||
2 | AUTHOR = "Bartosz Golaszewski <brgl@bgdev.pl>" | ||
3 | |||
4 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" | ||
5 | LIC_FILES_CHKSUM = " \ | ||
6 | file://../../LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
7 | file://../../LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \ | ||
8 | file://../../LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ | ||
9 | " | ||
10 | |||
11 | require recipes-support/libgpiod/libgpiod-src.inc | ||
12 | |||
13 | SRC_URI += "file://run-ptest" | ||
14 | |||
15 | SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07" | ||
16 | S = "${WORKDIR}/libgpiod-${PV}/bindings/python" | ||
17 | |||
18 | inherit setuptools3 ptest | ||
19 | |||
20 | DEPENDS += "libgpiod" | ||
21 | RDEPENDS:${PN} += " \ | ||
22 | libgpiod (>= 2.0) \ | ||
23 | python3-datetime \ | ||
24 | python3-profile \ | ||
25 | " | ||
26 | RDEPENDS:${PN}-ptest += "python3-setuptools" | ||
27 | |||
28 | export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1", "1", "0", d)}" | ||
29 | PTEST_CFLAGS = "${@bb.utils.contains("PTEST_ENABLED", "1", "-I../../tests/gpiosim", "", d)}" | ||
30 | # Setuptools store full filesystem paths in DWARF files. Map them to './' to | ||
31 | # avoid QA warnings. | ||
32 | export CFLAGS = "${PTEST_CFLAGS} -fdebug-prefix-map=${B}=./" | ||
33 | |||
34 | do_install:append() { | ||
35 | # Python setuptools have an issue where they install C extensions even if | ||
36 | # they're not in the list of packages to be packaged. This is how the test | ||
37 | # extensions end up being installed. Remove them here. | ||
38 | rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/tests/ | ||
39 | } | ||
40 | |||
41 | do_install_ptest() { | ||
42 | install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim | ||
43 | install -d ${D}${PTEST_PATH}/gpiod-test/procname | ||
44 | install -m 0644 ${B}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ | ||
45 | install -m 0644 ${B}/build/lib*/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim | ||
46 | install -m 0644 ${B}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim | ||
47 | install -m 0644 ${B}/build/lib*/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname | ||
48 | install -m 0644 ${B}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname | ||
49 | } | ||