summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-04-14 13:51:46 +0200
committerKhem Raj <raj.khem@gmail.com>2023-04-14 08:45:14 -0700
commit930436d900d1e735da51f812987e914cb34eab36 (patch)
tree05c14b29fb843ba1f1fc947fb6486d7a09ef28b6 /meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb
parent62cd19e3f4b971483d6250c9ca64be12758e89f8 (diff)
downloadmeta-openembedded-930436d900d1e735da51f812987e914cb34eab36.tar.gz
python3-gpiod: fetch sources from pypi
Python bindings to libgpiod are now available on pypi. The source package is a limited subset of the original repository. As such the ptest package now requires the libgpiod-ptest to be available at run-time (for libgpiosim.so against which the test C extension is linked). The problem with installing the C extensions for tests is now fixed so drop the do_install:append(). We no longer have to pass any additional CFLAGS to setup.py either. We update the version of the recipe but the changes only apply to building and packaging, there are no functional changes to the code. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb')
-rw-r--r--meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb38
1 files changed, 38 insertions, 0 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 @@
1SUMMARY = "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}