summaryrefslogtreecommitdiff
path: root/package/python-serial
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2016-06-06 13:30:11 +0200
committerPeter Korsgaard <peter@korsgaard.com>2016-06-06 21:42:54 +0200
commit042a79f0738cf432c622c1099942b36863663ae8 (patch)
tree780d4660b03e4e2f27cf617702c76ef078ffb69c /package/python-serial
parent3d2175780d70a864836c75343fd969fba1109057 (diff)
python-serial: fix Python 2.7.x related compilation error
aio.py is an experimental module, that is compatible with Python 3 only, so remove it for Python 2 environment or it will cause compilation errors. Fixes: http://autobuild.buildroot.org/results/f26/f26351da925d6ef3adea8053dc7fc24061554daf/ Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/python-serial')
-rw-r--r--package/python-serial/python-serial.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/python-serial/python-serial.mk b/package/python-serial/python-serial.mk
index 696e20794..4b3ffadc1 100644
--- a/package/python-serial/python-serial.mk
+++ b/package/python-serial/python-serial.mk
@@ -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))