package/python-txtorcon.mk: drop _py3 file for python 2.x to fix pycompile issue
authorPeter Korsgaard <peter@korsgaard.com>
Wed, 30 Sep 2020 07:31:57 +0000 (09:31 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 30 Sep 2020 19:10:06 +0000 (21:10 +0200)
commit6728c67307858a103456a05a3daaddbbb49dba36
tree5d903393aea6381c7b8edd779b4d258d7260c292
parent6d87acc19f1cd0bc738bf920b775caf96d7c3c4e
package/python-txtorcon.mk: drop _py3 file for python 2.x to fix pycompile issue

Fixes:
http://autobuild.buildroot.net/results/76b580000e6311e88584874f942517badd6fadf6/

python-txtorcon DOES support python 2.x, but it contains some optional
python 3 / async code in controller_py3.py which is conditionally used from
controller.py:

try:
    from .controller_py3 import _AsyncOnionAuthContext
    HAVE_ASYNC = True
except Exception:
    HAVE_ASYNC = False

pycompile unfortunately errors out on the async code:

../scripts/pycompile.py ..
error:   File "/usr/lib/python2.7/site-packages/txtorcon/controller_py3.py", line 13
    async def __aenter__(self):
            ^
SyntaxError: invalid syntax

As a workaround, simply drop the unusable _py3 file from TARGET_DIR if
building for python 2.x.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/python-txtorcon/python-txtorcon.mk