Unimportable python module gpiod
The modules are installed in the .egg directory, and therefore cannot be imported after that:
/usr/lib/python3.11/site-packages/gpiod-2.0.1-py3.11-linux-x86_64.egg/gpiod/
/usr/lib/python3.11/site-packages/gpiod-2.0.1-py3.11-linux-x86_64.egg/gpiod/__init__.py
...
The reason is incorrect usage of --prefix option by upstream's Makefile.am in bindings/python.
The quick fix is adding sed
in PKGBUILD like this:
build() {
cd $pkgname-$pkgver
sed -i -e 's|--prefix=\$(DESTDIR)\$(prefix)|--prefix=$(prefix) --root=$(if $(DESTDIR),$(DESTDIR),/)|g' bindings/python/Makefile.am
./autogen.sh \
--prefix=/usr \
--enable-tools=yes \
--enable-bindings-cxx \
--enable-bindings-python
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
I've already reported it to upstream, but please fix it in Arch and rebuild the package, because gpiod
module is unimportable in the current state.