WebThingsIO / gateway-addon-python

Python bindings for developing add-ons for WebThings Gateway
Mozilla Public License 2.0
16 stars 10 forks source link

Compilation error with Python 2.7.15 #32

Closed jernst closed 5 years ago

jernst commented 5 years ago

Attempting to build this add-on as a UBOS package, like this.

With Python 2.7.15, this produces Syntax error: invalid syntax in this line:

print = functools.partial(print, flush=True)

which seems to exist in several files, such as adapter.py line 9.

It works with Python 3.7.2.

The setup.cfg file has a comment saying it is supposed to work with both Python 2 and 3.

mrstegeman commented 5 years ago

Thanks for pointing this out. I'm not sure how we've never found this, as we install this package in our Raspbian image for both Python 2.7 and 3.5.