package/python-engineio: drop asyncio files for python 2.x to fix pycompile issue
authorPeter Korsgaard <peter@korsgaard.com>
Sun, 4 Oct 2020 21:49:02 +0000 (23:49 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 8 Oct 2020 20:07:14 +0000 (22:07 +0200)
commitb8ae383dd3a94f79530e98c1b658eaf214db9d07
treef9785468cd6cf7a386af31ae6584de5f318eccf1
parent6beb6dd5c6d6232b2ff6f2ca983c5cb99a4ca9ab
package/python-engineio: drop asyncio files for python 2.x to fix pycompile issue

engineio has conditional logic to load asyncio files when running under
Python 3.x:

if sys.version_info >= (3, 5):  # pragma: no cover
    from .asyncio_server import AsyncServer
    from .asyncio_client import AsyncClient
    from .async_drivers.asgi import ASGIApp
    try:
        from .async_drivers.tornado import get_tornado_handler
    except ImportError:
        get_tornado_handler = None
else:  # pragma: no cover
    AsyncServer = None
    AsyncClient = None
    get_tornado_handler = None
    ASGIApp = None

pycompile unfortunately errors out on these files when running under Python
2.x:

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

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

Fixes:
http://autobuild.buildroot.net/results/72c/72cfdffeb4d0fb7c3032b52f0a26a4758eea6762/

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/python-engineio/python-engineio.mk