aboutsummaryrefslogtreecommitdiff
path: root/package/python-socketio/python-socketio.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/python-socketio/python-socketio.mk')
-rw-r--r--package/python-socketio/python-socketio.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/python-socketio/python-socketio.mk b/package/python-socketio/python-socketio.mk
index ece4f65b78..73dab26f3c 100644
--- a/package/python-socketio/python-socketio.mk
+++ b/package/python-socketio/python-socketio.mk
@@ -10,4 +10,14 @@ PYTHON_SOCKETIO_SETUP_TYPE = setuptools
PYTHON_SOCKETIO_LICENSE = MIT
PYTHON_SOCKETIO_LICENSE_FILES = LICENSE
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+# only needed/valid for python 3.x
+define PYTHON_SOCKETIO_RM_PY3_FILES
+ rm -f $(TARGET_DIR)/usr/lib/python*/site-packages/socketio/asgi.py \
+ $(TARGET_DIR)/usr/lib/python*/site-packages/socketio/asyncio_*.py
+endef
+
+PYTHON_SOCKETIO_POST_INSTALL_TARGET_HOOKS += PYTHON_SOCKETIO_RM_PY3_FILES
+endif
+
$(eval $(python-package))