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.

73 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.11.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/10/f7/3b302ff34045f25065091d40e074479d6893882faef135c96f181a57ed06
  13. PKG_HASH:=df9083a992b17a28cd4251a3f5c879e0198bb26c9e808c4647e0a18739f1d11d
  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. 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 BuildPackage,python-cffi-src))
  55. $(eval $(call Py3Package,python3-cffi))
  56. $(eval $(call BuildPackage,python3-cffi))
  57. $(eval $(call BuildPackage,python3-cffi-src))