kumquat-buildroot/package/python-serial/python-serial.mk
Yegor Yefremov 042a79f073 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>
2016-06-06 21:42:54 +02:00

25 lines
881 B
Makefile

################################################################################
#
# python-serial
#
################################################################################
PYTHON_SERIAL_VERSION = 3.1
PYTHON_SERIAL_SOURCE = pyserial-$(PYTHON_SERIAL_VERSION).tar.gz
PYTHON_SERIAL_SITE = https://pypi.python.org/packages/ce/9c/694ce79a9d4a164e109aeba1a40fba23336f3b7554978553e22a5d41d54d
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))