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.

89 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2018 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:=python-automat
  9. PKG_VERSION:=0.7.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=Automat-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/A/Automat
  13. PKG_HASH:=cbd78b83fa2d81fe2a4d23d258e1661dd7493c9a50ee2f1a5b2cac61c1793b0e
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-automat-$(PKG_VERSION)
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../python-package.mk
  20. include ../python3-package.mk
  21. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  22. PYTHON_PKG_SETUP_VARS:= \
  23. PKG_VERSION="$(PKG_VERSION)"
  24. PYTHON3_PKG_SETUP_VARS:= \
  25. PKG_VERSION="$(PKG_VERSION)"
  26. define Package/python-automat/Default
  27. SECTION:=lang
  28. CATEGORY:=Languages
  29. SUBMENU:=Python
  30. TITLE:=Concise, idiomatic finite-state automata
  31. URL:=https://github.com/glyph/Automat
  32. endef
  33. define Package/python-automat
  34. $(call Package/python-automat/Default)
  35. DEPENDS:= \
  36. +PACKAGE_python-automat:python-light \
  37. +PACKAGE_python-automat:python-attrs \
  38. +PACKAGE_python-automat:python-six
  39. VARIANT:=python
  40. endef
  41. define Package/python3-automat
  42. $(call Package/python-automat/Default)
  43. DEPENDS:= \
  44. +PACKAGE_python3-automat:python3-light \
  45. +PACKAGE_python3-automat:python3-attrs \
  46. +PACKAGE_python3-automat:python3-six
  47. VARIANT:=python3
  48. endef
  49. define Package/python-automat/description
  50. Automat is a library for concise, idiomatic Python expression of
  51. finite-state automata (particularly deterministic finite-state
  52. transducers).
  53. endef
  54. define Package/python3-automat/description
  55. $(call Package/python-automat/description)
  56. .
  57. (Variant for Python3)
  58. endef
  59. define PyPackage/python-automat/filespec
  60. +|$(PYTHON_PKG_DIR)
  61. -|$(PYTHON_PKG_DIR)/automat/_visualize.py
  62. endef
  63. define Py3Package/python3-automat/filespec
  64. +|$(PYTHON3_PKG_DIR)
  65. -|$(PYTHON3_PKG_DIR)/automat/_visualize.py
  66. endef
  67. $(eval $(call PyPackage,python-automat))
  68. $(eval $(call BuildPackage,python-automat))
  69. $(eval $(call BuildPackage,python-automat-src))
  70. $(eval $(call Py3Package,python3-automat))
  71. $(eval $(call BuildPackage,python3-automat))
  72. $(eval $(call BuildPackage,python3-automat-src))