You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=PyYAML
  9. PKG_VERSION:=5.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/PyYAML
  13. PKG_HASH:=436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95
  14. PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../python-package.mk
  21. include ../python3-package.mk
  22. PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  23. define Package/python-yaml/Default
  24. SECTION:=lang
  25. SUBMENU:=Python
  26. CATEGORY:=Languages
  27. TITLE:=YAML parser and emitter for Python
  28. URL:=https://github.com/yaml/pyyaml
  29. DEPENDS:=+libyaml
  30. endef
  31. define Package/python-yaml
  32. $(call Package/python-yaml/Default)
  33. DEPENDS+= \
  34. +PACKAGE_python-yaml:python-light \
  35. +PACKAGE_python-yaml:python-codecs
  36. VARIANT:=python
  37. endef
  38. define Package/python3-yaml
  39. $(call Package/python-yaml/Default)
  40. DEPENDS+=+PACKAGE_python3-yaml:python3-light
  41. VARIANT:=python3
  42. endef
  43. define Package/python-yaml/description
  44. PyYAML is a YAML parser and emitter for the Python programming language.
  45. endef
  46. define Package/python3-yaml/description
  47. $(call Package/python-yaml/description)
  48. .
  49. (Variant for Python3)
  50. endef
  51. PYTHON_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
  52. PYTHON_PKG_SETUP_ARGS:=
  53. PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
  54. PYTHON3_PKG_SETUP_ARGS:=
  55. $(eval $(call PyPackage,python-yaml))
  56. $(eval $(call BuildPackage,python-yaml))
  57. $(eval $(call BuildPackage,python-yaml-src))
  58. $(eval $(call Py3Package,python3-yaml))
  59. $(eval $(call BuildPackage,python3-yaml))
  60. $(eval $(call BuildPackage,python3-yaml-src))