The first and most critical issue is that there is no SWIG wrapper defined for INDI::Properties, so d.getProperties() returns a non-iterable generic proxy for PySwigObject *. This was addressed by adding %include <indiproperties.h> and definitions for __getitem__ and __len__ to the SWIG template. I believe this also addresses a warning about a missing destructor call. I had to tell SWIG to ignore the at, front, and back member functions to prevent C++ compilation errors related to creating pointers to references (obscured by a typedef used in the method declaration), and also the empty member function which for some reason caused a runtime link error due to a missing symbol when the PyIndi library was loaded. (Perhaps the optimization settings differ between the system INDI library and the SWIG wrapper, so the INDI library expected empty to be inlined but the wrapper failed to do so?)
The second issue, easily corrected, is that there is no .decode() method on the objects returned by .name and .device. I tested this in both Python 3.10 and Python 2.7 and in both environments it sufficed to simply remove the .decode() calls, as the objects are already of type str.
Finally, in testing the SWIG wrapper changes I found an error related to the use of super() without arguments in the CustomInstall class when running the setup.py install command with Python 2.7. This was addressed by explicity invoking the .run() method on the base class, which works in both Python 2.7 and Python 3.10.
The first and most critical issue is that there is no SWIG wrapper defined for INDI::Properties, so
d.getProperties()
returns a non-iterable generic proxy forPySwigObject *
. This was addressed by adding%include <indiproperties.h>
and definitions for__getitem__
and__len__
to the SWIG template. I believe this also addresses a warning about a missing destructor call. I had to tell SWIG to ignore theat
,front
, andback
member functions to prevent C++ compilation errors related to creating pointers to references (obscured by a typedef used in the method declaration), and also theempty
member function which for some reason caused a runtime link error due to a missing symbol when the PyIndi library was loaded. (Perhaps the optimization settings differ between the system INDI library and the SWIG wrapper, so the INDI library expectedempty
to be inlined but the wrapper failed to do so?)The second issue, easily corrected, is that there is no .decode() method on the objects returned by
.name
and.device
. I tested this in both Python 3.10 and Python 2.7 and in both environments it sufficed to simply remove the.decode()
calls, as the objects are already of typestr
.Finally, in testing the SWIG wrapper changes I found an error related to the use of
super()
without arguments in the CustomInstall class when running thesetup.py install
command with Python 2.7. This was addressed by explicity invoking the.run()
method on the base class, which works in both Python 2.7 and Python 3.10.