|
@@ -11,4 +11,14 @@ PYTHON_SERIAL_LICENSE = Python Software Foundation License
|
|
|
PYTHON_SERIAL_LICENSE_FILES = LICENSE.txt
|
|
|
PYTHON_SERIAL_SETUP_TYPE = setuptools
|
|
|
|
|
|
+# aio.py is an experimental module, that is compatible only with
|
|
|
+# Python 3, so remove it for Python 2 environment or it will
|
|
|
+# cause compilation errors
|
|
|
+ifeq ($(BR2_PACKAGE_PYTHON),y)
|
|
|
+define PYTHON_SERIAL_REMOVE_AIO_PY
|
|
|
+ rm $(@D)/serial/aio.py
|
|
|
+endef
|
|
|
+PYTHON_SERIAL_POST_EXTRACT_HOOKS = PYTHON_SERIAL_REMOVE_AIO_PY
|
|
|
+endif
|
|
|
+
|
|
|
$(eval $(python-package))
|