python-jinja2: don't remove async files for Python 3
authorYegor Yefremov <yegorslists@googlemail.com>
Thu, 6 Jul 2017 08:57:53 +0000 (10:57 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 Jul 2017 19:27:52 +0000 (21:27 +0200)
The needed functionality is already included into Python 3.6.x,
so these files can be now compiled without errors.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/python-jinja2/python-jinja2.mk

index 34342ab704ba9317c9ed56696ac33a9b4c86fe1c..c7dd4902b0768e38f8ce72138348842c40c0c6d4 100644 (file)
@@ -17,11 +17,13 @@ HOST_PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe
 # not available in Python 2 and some features available in Python 3.6.
 # So in both cases *.py compilation would produce compiler errors.
 # Hence remove both files after package extraction.
+ifeq ($(BR2_PACKAGE_PYTHON),y)
 define PYTHON_JINJA2_REMOVE_ASYNC_SUPPORT
        rm $(@D)/jinja2/asyncsupport.py $(@D)/jinja2/asyncfilters.py
 endef
 
 PYTHON_JINJA2_POST_EXTRACT_HOOKS = PYTHON_JINJA2_REMOVE_ASYNC_SUPPORT
+endif
 
 $(eval $(python-package))
 $(eval $(host-python-package))