Lot of python bindings missing since Swig 4.3.0
During build there are lot of errors like this
../include/hamlib/rotlist.h:575: Warning 304: Unsupported constant value (ignored)
../include/hamlib/rotlist.h:588: Warning 304: Unsupported constant value (ignored)
../include/hamlib/rotlist.h:602: Warning 304: Unsupported constant value (ignored)
../include/hamlib/rotlist.h:617: Warning 304: Unsupported constant value (ignored)
Meanwhile we discovered it was introduced somewhere near migration to python3.13, but more like it is because of swig 4.3.0.
Now there are two developers
- Hamlib
- Swig
Developers of Hamlib says it is problem of Swig and we should wait until 4.4.0 will be released. and developers of Swig can not say when even 4.3.1 (which should contain fix too) will be released.
Results is almost 3 months not working python bindings, thus make this package useless and forces to user to make some workarounds, like downgrade almost half of system packages (because python 13 to 12, swig and all python dependencies) or make some podman image with debian, which use old versions.
Bugreport on hamlib side https://github.com/Hamlib/Hamlib/issues/1669
Bugreport on Swig side https://github.com/swig/swig/issues/3118
But actually someone at swig side mentioned some Hamlib's patch (fix or workaround?) https://github.com/swig/swig/issues/3058#issuecomment-2439696279
So I thing until those two sides fight enough, we can here on Arch linux package use this patch, so Hamlib python bindings can be used.
patch -p1 < ../../swigheader.patch
patching file include/hamlib/riglist.h
patching file include/hamlib/rotlist.h
grep RIG_MODEL Hamlib.py |head -5
RIG_MODEL_NONE = _Hamlib.RIG_MODEL_NONE
RIG_MODEL_DUMMY = _Hamlib.RIG_MODEL_DUMMY
RIG_MODEL_NETRIGCTL = _Hamlib.RIG_MODEL_NETRIGCTL
RIG_MODEL_ARMSTRONG = _Hamlib.RIG_MODEL_ARMSTRONG
RIG_MODEL_FLRIG = _Hamlib.RIG_MODEL_FLRIG
Regards, Petr