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.

76 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2015-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-cffi
  9. PKG_VERSION:=1.12.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cffi
  13. PKG_HASH:=9b6f7ba4e78c52c1a291d0c0c0bd745d19adde1a9e1c03cb899f0c6efd6f8033
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION)
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
  18. PKG_BUILD_DEPENDS:=libffi/host
  19. HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
  20. HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
  21. include $(INCLUDE_DIR)/package.mk
  22. include ../python-package.mk
  23. include ../python3-package.mk
  24. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  25. define Package/python-cffi/Default
  26. SECTION:=lang
  27. CATEGORY:=Languages
  28. SUBMENU:=Python
  29. TITLE:=C Foreign Function Interface
  30. URL:=http://cffi.readthedocs.org/
  31. DEPENDS:=+libffi
  32. endef
  33. define Package/python-cffi
  34. $(call Package/python-cffi/Default)
  35. DEPENDS+= \
  36. +PACKAGE_python-cffi:python-light \
  37. +PACKAGE_python-cffi:python-pycparser
  38. VARIANT:=python
  39. endef
  40. define Package/python3-cffi
  41. $(call Package/python-cffi/Default)
  42. DEPENDS+= \
  43. +PACKAGE_python3-cffi:python3-light \
  44. +PACKAGE_python3-cffi:python3-pycparser
  45. VARIANT:=python3
  46. endef
  47. define Package/python-cffi/description
  48. Foreign Function Interface for Python calling C code.
  49. endef
  50. define Package/python3-cffi/description
  51. $(call Package/python-cffi/description)
  52. .
  53. (Variant for Python3)
  54. endef
  55. $(eval $(call PyPackage,python-cffi))
  56. $(eval $(call BuildPackage,python-cffi))
  57. $(eval $(call BuildPackage,python-cffi-src))
  58. $(eval $(call Py3Package,python3-cffi))
  59. $(eval $(call BuildPackage,python3-cffi))
  60. $(eval $(call BuildPackage,python3-cffi-src))