summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-gpiod_2.0.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.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.bb')
-rw-r--r--meta-python/recipes-devtools/python/python3-gpiod_2.0.bb49
1 files changed, 0 insertions, 49 deletions
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 @@
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"
5LIC_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
11require recipes-support/libgpiod/libgpiod-src.inc
12
13SRC_URI += "file://run-ptest"
14
15SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07"
16S = "${WORKDIR}/libgpiod-${PV}/bindings/python"
17
18inherit setuptools3 ptest
19
20DEPENDS += "libgpiod"
21RDEPENDS:${PN} += " \
22 libgpiod (>= 2.0) \
23 python3-datetime \
24 python3-profile \
25"
26RDEPENDS:${PN}-ptest += "python3-setuptools"
27
28export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1", "1", "0", d)}"
29PTEST_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.
32export CFLAGS = "${PTEST_CFLAGS} -fdebug-prefix-map=${B}=./"
33
34do_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
41do_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}