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.

69 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2015-2016 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.11.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/4e/32/4070bdf32812c89eb635c80880a5caa2e0189aa7999994c265577e5154f3
  13. PKG_HASH:=5f4ff33371c6969b39b293d9771ee91e81d26f9129be093ca1b7be357fcefd15
  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. HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
  19. HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
  20. include $(INCLUDE_DIR)/package.mk
  21. $(call include_mk, python-package.mk)
  22. $(call include_mk, python3-package.mk)
  23. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  24. define Package/python-cffi/Default
  25. SECTION:=lang
  26. CATEGORY:=Languages
  27. SUBMENU:=Python
  28. URL:=http://cffi.readthedocs.org/
  29. DEPENDS:=+libffi
  30. endef
  31. define Package/python-cffi
  32. $(call Package/python-cffi/Default)
  33. TITLE:=python-cffi
  34. DEPENDS+=+PACKAGE_python-cffi:python-light +PACKAGE_python-cffi:python-pycparser
  35. VARIANT:=python
  36. endef
  37. define Package/python3-cffi
  38. $(call Package/python-cffi/Default)
  39. TITLE:=python3-cffi
  40. DEPENDS+=+PACKAGE_python3-cffi:python3-light +PACKAGE_python3-cffi:python3-pycparser
  41. VARIANT:=python3
  42. endef
  43. define Package/python-cffi/description
  44. Foreign Function Interface for Python calling C code.
  45. endef
  46. define Package/python3-cffi/description
  47. $(call Package/python-cffi/description)
  48. .
  49. (Variant for Python3)
  50. endef
  51. $(eval $(call PyPackage,python-cffi))
  52. $(eval $(call BuildPackage,python-cffi))
  53. $(eval $(call Py3Package,python3-cffi))
  54. $(eval $(call BuildPackage,python3-cffi))