diff --git a/package/python-autobahn/python-autobahn.mk b/package/python-autobahn/python-autobahn.mk index 6c5c608b9a..4b367177a6 100644 --- a/package/python-autobahn/python-autobahn.mk +++ b/package/python-autobahn/python-autobahn.mk @@ -11,4 +11,15 @@ PYTHON_AUTOBAHN_LICENSE = MIT PYTHON_AUTOBAHN_LICENSE_FILES = LICENSE PYTHON_AUTOBAHN_SETUP_TYPE = setuptools +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_AUTOBAHN_RM_PY3_FILES + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/autobahn/asyncio \ + $(TARGET_DIR)/usr/lib/python*/site-packages/autobahn/xbr \ + $(TARGET_DIR)/usr/lib/python*/site-packages/autobahn/twisted/xbr.py +endef + +PYTHON_AUTOBAHN_POST_INSTALL_TARGET_HOOKS += PYTHON_AUTOBAHN_RM_PY3_FILES +endif + $(eval $(python-package))