Skip to contentSkip to conversation

python-serial: fix Python 2.7.x related compilation error

PATCH New yegorslists at googlemail.com 2 participants 2 messages Jun 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-serial: fix Python 2.7.x related compilation error

From: Yegor Yefremov <[email protected]>

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/

---
 package/python-serial/python-serial.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/python-serial/python-serial.mk +10 -0
index 696e207..4b3ffad 100644
@@ -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))
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 python-serial: fix Python 2.7.x related compilation error

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"yegorslists" == yegorslists <[email protected]> writes:

From: Yegor Yefremov <[email protected]> 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/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard