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.

71 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.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3
  13. PKG_HASH:=ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6
  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. $(call include_mk, python-package.mk)
  23. $(call include_mk, 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. URL:=http://cffi.readthedocs.org/
  30. DEPENDS:=+libffi
  31. endef
  32. define Package/python-cffi
  33. $(call Package/python-cffi/Default)
  34. TITLE:=python-cffi
  35. DEPENDS+=+PACKAGE_python-cffi:python-light +PACKAGE_python-cffi:python-pycparser
  36. VARIANT:=python
  37. endef
  38. define Package/python3-cffi
  39. $(call Package/python-cffi/Default)
  40. TITLE:=python3-cffi
  41. DEPENDS+=+PACKAGE_python3-cffi:python3-light +PACKAGE_python3-cffi:python3-pycparser
  42. VARIANT:=python3
  43. endef
  44. define Package/python-cffi/description
  45. Foreign Function Interface for Python calling C code.
  46. endef
  47. define Package/python3-cffi/description
  48. $(call Package/python-cffi/description)
  49. .
  50. (Variant for Python3)
  51. endef
  52. $(eval $(call PyPackage,python-cffi))
  53. $(eval $(call BuildPackage,python-cffi))
  54. $(eval $(call Py3Package,python3-cffi))
  55. $(eval $(call BuildPackage,python3-cffi))