python-jinja2.mk 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. ################################################################################
  2. #
  3. # python-jinja2
  4. #
  5. ################################################################################
  6. # Please keep in sync with package/python3-jinja2/python3-jinja2.mk
  7. PYTHON_JINJA2_VERSION = 2.11.3
  8. PYTHON_JINJA2_SOURCE = Jinja2-$(PYTHON_JINJA2_VERSION).tar.gz
  9. PYTHON_JINJA2_SITE = https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7
  10. PYTHON_JINJA2_SETUP_TYPE = setuptools
  11. PYTHON_JINJA2_LICENSE = BSD-3-Clause
  12. PYTHON_JINJA2_LICENSE_FILES = LICENSE.rst
  13. # In host build, setup.py tries to download markupsafe if it is not installed
  14. HOST_PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe
  15. # Both asyncsupport.py and asyncfilters.py use async feature, that is
  16. # not available in Python 2 and some features available in Python 3.6.
  17. # So in both cases *.py compilation would produce compiler errors.
  18. # Hence remove both files after package extraction.
  19. ifeq ($(BR2_PACKAGE_PYTHON),y)
  20. define PYTHON_JINJA2_REMOVE_ASYNC_SUPPORT
  21. rm $(@D)/src/jinja2/asyncsupport.py $(@D)/src/jinja2/asyncfilters.py
  22. endef
  23. PYTHON_JINJA2_POST_EXTRACT_HOOKS = PYTHON_JINJA2_REMOVE_ASYNC_SUPPORT
  24. endif
  25. $(eval $(python-package))
  26. $(eval $(host-python-package))