python-jinja2.mk 1.2 KB

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