python3-gpiod: update to v2.1.3
PATCH 1/1 python3-gpiod: update to v2.1.3
From: Bartosz Golaszewski <[email protected]>
The python bindings for libgpiod have undergone several significant changes that make them easier to use for users of pip. The libgpiod sources are now vendored with the python3-gpiod as the biggest complaint by far was the fact that if the system doesn't provide the correct version of libgpiod, the python bindings won't build.
This is however irrelevant for the meta-python recipe as we use the provided switch to keep linking against the libgpiod provided by meta-openembedded.
We have changed the way the tests are built, they are now generated by a separate build script and no longer by setup.py. The package now correctly build with the preferred pep517 method so change the inherited classes.
We have also gained control over the gpiod module on pypi (which previously hosted a pure python GPIO library) so the location of the sources has changed.
---
...-gpiod_2.0.1.bb => python3-gpiod_2.1.3.bb} | 25 ++++++++++++-------
1 file changed, 16 insertions(+), 9 deletions(-)
rename meta-python/recipes-devtools/python/{python3-gpiod_2.0.1.bb => python3-gpiod_2.1.3.bb} (54%)meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +16 -9
@@ -3,17 +3,18 @@ SUMMARY = "Python bindings for libgpiod." LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" # The actual license files live in the upstream libgpiod from which the pypi # package is spun out. -LIC_FILES_CHKSUM = "file://setup.py;beginline=57;endline=57;md5=120334ed83ec0cb248605e775bd13b87" +LIC_FILES_CHKSUM = "file://setup.py;beginline=237;endline=237;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" SRC_URI += "file://run-ptest" -SRC_URI[sha256sum] = "d5c0f9502e97e7359b9dd601e29f15d668983ce50f5c13323f3302845f790fa6" +SRC_URI[sha256sum] = "a33193d6cab79d252329f71666a35a3668e04f1f82bf9b93ee2c9ae852398b20" -inherit setuptools3 ptest pypi +inherit setuptools3-base python_pep517 ptest pypi -PYPI_PACKAGE = "libgpiod" - -DEPENDS += "libgpiod" +DEPENDS += " \ + libgpiod \ + python3-setuptools-native \ +" RDEPENDS:${PN} += " \ libgpiod (>= 2.0) \ python3-datetime \
@@ -24,14 +25,20 @@ RDEPENDS:${PN}-ptest += " \ python3-setuptools \ " -export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1", "1", "0", d)}" +export LINK_SYSTEM_LIBGPIOD = "1" + +do_compile_ptest() { + ${STAGING_BINDIR_NATIVE}/python3-native/python3 build_tests.py +} do_install_ptest() { install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim install -d ${D}${PTEST_PATH}/gpiod-test/procname install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ - install -m 0644 ${B}/build/lib*/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -m 0644 ${B}/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -m 0644 ${B}/build/lib*/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname + install -m 0644 ${B}/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname } + +INSANE_SKIP:${PN}-ptest += "buildpaths"
Signature · 1 line
2.40.1
This seems to be mixing native python headers in target build causing do_compile_ptest_base failure in some builds (seen in multilib builds but maybe it can be reproduced in regular 32bit target on 64bit build host):
building 'tests.gpiosim._ext' extension
creating /tmp/libgpiod-5k0x8gv3/tests
creating /tmp/libgpiod-5k0x8gv3/tests/gpiosim
ccache arm-oemllib32-linux-gnueabi-gcc -mthumb -mfpu=neon
-mfloat-abi=softfp -mcpu=cortex-a9 -mtune=cortex-a9
-fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
-Werror=format-security -Werror=return-type -funwind-tables -D_TIME_BITS=64
-D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/lib32-recipe-sysroot
-DNDEBUG -g -O3 -Wall -isystemTOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include
-O2 -pipe -isystemTOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include
-O2 -pipe -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native=
-fPIC -D_GNU_SOURCE=1 -I../../include -I../../tests/gpiosim -ITOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include/python3.11
-c tests/gpiosim/ext.c -o /tmp/libgpiod-5k0x8gv3/tests/gpiosim/ext.o -Wall
-Wextra
In file included from TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include/python3.11/Python.h:38,
from tests/gpiosim/ext.c:5:TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include/python3.11/pyport.h:601:2:
error: #error "LONG_BIT definition appears wrong for platform (bad
gcc/glibc config?)."
601 | #error "LONG_BIT definition appears wrong for platform (bad
gcc/glibc config?)."
| ^~~~~
Quoted 112 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The python bindings for libgpiod have undergone several significant changes that make them easier to use for users of pip. The libgpiod sources are now vendored with the python3-gpiod as the biggest complaint by far was the fact that if the system doesn't provide the correct version of libgpiod, the python bindings won't build.
This is however irrelevant for the meta-python recipe as we use the provided switch to keep linking against the libgpiod provided by meta-openembedded.
We have changed the way the tests are built, they are now generated by a separate build script and no longer by
setup.py. The package now correctly build with the preferred pep517 method so change the inherited classes.We have also gained control over the gpiod module on pypi (which previously hosted a pure python GPIO library) so the location of the sources has changed.
Signed-off-by Bartosz Golaszewski <[email protected]>--- ...-gpiod_2.0.1.bb => python3-gpiod_2.1.3.bb} | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) rename meta-python/recipes-devtools/python/{python3-gpiod_2.0.1.bb =>python3-gpiod_2.1.3.bb} (54%)
meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +0
-0@@ -3,17 +3,18 @@ SUMMARY = "Python bindings for libgpiod." LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" # The actual license files live in the upstream libgpiod from which thepypi
# package is spun out. -LIC_FILES_CHKSUM = "file://setup.py;beginline=57;endline=57;md5=120334ed83ec0cb248605e775bd13b87" +LIC_FILES_CHKSUM = "file://setup.py;beginline=237;endline=237;md5=f5ddb56912b7f20bf94aa4d1bdcd3533"
SRC_URI+= "file://run-ptest"-SRC_URI[sha256sum] = "
d5c0f9502e97e7359b9dd601e29f15d668983ce50f5c13323f3302845f790fa6" +SRC_URI[sha256sum] = "a33193d6cab79d252329f71666a35a3668e04f1f82bf9b93ee2c9ae852398b20"meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +5
-5-inherit setuptools3 ptest pypi +inherit setuptools3-base python_pep517 ptest pypi -PYPI_PACKAGE = "libgpiod" - -DEPENDS += "libgpiod" +DEPENDS += " \ + libgpiod \ + python3-setuptools-native \ +" RDEPENDS:${PN} += " \ libgpiod (>= 2.0) \ python3-datetime \@@ -24,14 +25,20 @@ RDEPENDS:${PN}-ptest += " \ python3-setuptools \ " -export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1","1", "0", d)}"
meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +5
-1+export LINK_SYSTEM_LIBGPIOD = "1" + +do_compile_ptest() { + ${STAGING_BINDIR_NATIVE}/python3-native/python3 build_tests.py +} do_install_ptest() { install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim install -d ${D}${PTEST_PATH}/gpiod-test/procname install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ - install -m 0644 ${B}/build/lib*/tests/gpiosim/_ext*${D}${PTEST_PATH}/gpiod-test/gpiosim
+ install -m 0644 ${B}/tests/gpiosim/_ext*
${D}${PTEST_PATH}/gpiod-test/gpiosiminstall -m 0644 ${S}/tests/gpiosim/*.py${D}${PTEST_PATH}/gpiod-test/gpiosim
- install -m 0644 ${B}/build/lib*/tests/procname/_ext*
${D}${PTEST_PATH}/gpiod-test/procname
+ install -m 0644 ${B}/tests/procname/_ext*
${D}${PTEST_PATH}/gpiod-test/procnameinstall -m 0644 ${S}/tests/procname/*.py${D}${PTEST_PATH}/gpiod-test/procname
}meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +2
-1+ +INSANE_SKIP:${PN}-ptest += "buildpaths" --2.40.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#106520):
https://lists.openembedded.org/g/openembedded-devel/message/106520
Mute This Topic: https://lists.openembedded.org/mt/102494202/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line
seen in multilib builds but maybe it can be reproduced in regular 32bit
target on 64bit build host
Yes, nodistro build for qemux86 shows the same:
http://errors.yoctoproject.org/Errors/Build/174247/
Quoted 156 lines · Martin Jansa via lists.openembedded.org
This seems to be mixing native python headers in target build causing
do_compile_ptest_basefailure in some builds (seen in multilib builds but maybe it can be reproduced in regular 32bit target on 64bit build host):building 'tests.gpiosim._ext' extension
creating/tmp/libgpiod-5k0x8gv3/tests
creating/tmp/libgpiod-5k0x8gv3/tests/gpiosimccache arm-oemllib32-linux-gnueabi-gcc -mthumb -mfpu=neon(quoted diff) +0
-21-mfloat-abi=softfp -mcpu=cortex-a9 -mtune=cortex-a9 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -funwind-tables -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/lib32-recipe-sysroot -DNDEBUG -g -O3 -Wall -isystemTOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include -O2 -pipe -isystemTOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include -O2 -pipe -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/gpiod-2.1.3=/usr/src/debug/lib32-python3-gpiod/2.1.3-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native= -fPIC -D_GNU_SOURCE=1 -I../../include -I../../tests/gpiosim -ITOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include/python3.11 -c tests/gpiosim/ext.c -o /tmp/libgpiod-5k0x8gv3/tests/gpiosim/ext.o -Wall -WextraIn file included from
TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include/python3.11/Python.h:38,
fromtests/gpiosim/ext.c:5:TOPDIR/BUILD/work/mach-oemllib32-linux-gnueabi/lib32-python3-gpiod/2.1.3/recipe-sysroot-native/usr/include/python3.11/pyport.h:601:2:
error: #error "LONG_BITdefinition appears wrong for platform (bad
gcc/glibc config?)."
601 | #error "LONG_BITdefinition appears wrong for platform (bad
gcc/glibc config?)."| ^~~~~Quoted 98 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The python bindings for libgpiod have undergone several significant changes that make them easier to use for users of pip. The libgpiod sources are now vendored with the python3-gpiod as the biggest complaint by far was the fact that if the system doesn't provide the correct version of libgpiod, the python bindings won't build.
This is however irrelevant for the meta-python recipe as we use the provided switch to keep linking against the libgpiod provided by meta-openembedded.
We have changed the way the tests are built, they are now generated by a separate build script and no longer by
setup.py. The package now correctly build with the preferred pep517 method so change the inherited classes.We have also gained control over the gpiod module on pypi (which previously hosted a pure python GPIO library) so the location of the sources has changed.
Signed-off-by Bartosz Golaszewski <[email protected]>--- ...-gpiod_2.0.1.bb => python3-gpiod_2.1.3.bb} | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) rename meta-python/recipes-devtools/python/{python3-gpiod_2.0.1.bb =>python3-gpiod_2.1.3.bb} (54%)
meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +0
-0@@ -3,17 +3,18 @@ SUMMARY = "Python bindings for libgpiod." LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" # The actual license files live in the upstream libgpiod from which thepypi
# package is spun out. -LIC_FILES_CHKSUM = "file://setup.py;beginline=57;endline=57;md5=120334ed83ec0cb248605e775bd13b87" +LIC_FILES_CHKSUM = "file://setup.py;beginline=237;endline=237;md5=f5ddb56912b7f20bf94aa4d1bdcd3533"
SRC_URI+= "file://run-ptest"-SRC_URI[sha256sum] = "
d5c0f9502e97e7359b9dd601e29f15d668983ce50f5c13323f3302845f790fa6" +SRC_URI[sha256sum] = "a33193d6cab79d252329f71666a35a3668e04f1f82bf9b93ee2c9ae852398b20"meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +5
-5-inherit setuptools3 ptest pypi +inherit setuptools3-base python_pep517 ptest pypi -PYPI_PACKAGE = "libgpiod" - -DEPENDS += "libgpiod" +DEPENDS += " \ + libgpiod \ + python3-setuptools-native \ +" RDEPENDS:${PN} += " \ libgpiod (>= 2.0) \ python3-datetime \@@ -24,14 +25,20 @@ RDEPENDS:${PN}-ptest += " \ python3-setuptools \ " -export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1","1", "0", d)}"
meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +5
-1+export LINK_SYSTEM_LIBGPIOD = "1" + +do_compile_ptest() { + ${STAGING_BINDIR_NATIVE}/python3-native/python3 build_tests.py +} do_install_ptest() { install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim install -d ${D}${PTEST_PATH}/gpiod-test/procname install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ - install -m 0644 ${B}/build/lib*/tests/gpiosim/_ext*${D}${PTEST_PATH}/gpiod-test/gpiosim
+ install -m 0644 ${B}/tests/gpiosim/_ext*
${D}${PTEST_PATH}/gpiod-test/gpiosiminstall -m 0644 ${S}/tests/gpiosim/*.py${D}${PTEST_PATH}/gpiod-test/gpiosim
- install -m 0644 ${B}/build/lib*/tests/procname/_ext*
${D}${PTEST_PATH}/gpiod-test/procname
+ install -m 0644 ${B}/tests/procname/_ext*
${D}${PTEST_PATH}/gpiod-test/procnameinstall -m 0644 ${S}/tests/procname/*.py${D}${PTEST_PATH}/gpiod-test/procname
}meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +2
-1+ +INSANE_SKIP:${PN}-ptest += "buildpaths" --Quoted 6 lines
2.40.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#106749):
https://lists.openembedded.org/g/openembedded-devel/message/106749
Mute This Topic: https://lists.openembedded.org/mt/102494202/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-