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.

66 lines
1.7 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:=3.13
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/PyYAML
  13. PKG_HASH:=3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf
  14. PKG_LICENSE:=MIT
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../python-package.mk
  21. include ../python3-package.mk
  22. define Package/python-yaml/Default
  23. SUBMENU:=Python
  24. SECTION:=lang
  25. CATEGORY:=Languages
  26. URL:=https://pyyaml.org/wiki/PyYAML
  27. DEPENDS:=+libyaml
  28. endef
  29. define Package/python-yaml
  30. $(call Package/python-yaml/Default)
  31. TITLE:=YAML parser and emitter for Python
  32. DEPENDS+=+PACKAGE_python-yaml:python-light +PACKAGE_python-yaml:python-codecs
  33. VARIANT:=python
  34. endef
  35. define Package/python3-yaml
  36. $(call Package/python-yaml/Default)
  37. TITLE:=YAML parser and emitter for Python3
  38. DEPENDS+=+PACKAGE_python3-yaml:python3-light
  39. VARIANT:=python3
  40. endef
  41. define PyBuild/Compile
  42. $(call Build/Compile/PyMod,,\
  43. --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
  44. )
  45. endef
  46. define Py3Build/Compile
  47. $(call Build/Compile/Py3Mod,,\
  48. --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
  49. )
  50. endef
  51. $(eval $(call PyPackage,python-yaml))
  52. $(eval $(call BuildPackage,python-yaml))
  53. $(eval $(call Py3Package,python3-yaml))
  54. $(eval $(call BuildPackage,python3-yaml))