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.

79 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2007-2019 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-requests
  9. PKG_VERSION:=2.22.0
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
  12. PKG_LICENSE:=Apache-2.0
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_CPE_ID:=cpe:/a:python-requests:requests
  15. PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz
  16. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests
  17. PKG_HASH:=11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION)
  19. PKG_CPE_ID:=cpe:/a:python-requests:requests
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../python-package.mk
  22. include ../python3-package.mk
  23. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  24. define Package/python-requests/Default
  25. SUBMENU:=Python
  26. SECTION:=lang
  27. CATEGORY:=Languages
  28. TITLE:=HTTP library for Python
  29. URL:=https://2.python-requests.org/
  30. endef
  31. define Package/python-requests
  32. $(call Package/python-requests/Default)
  33. DEPENDS:= \
  34. +PACKAGE_python-requests:python \
  35. +PACKAGE_python-requests:python-chardet \
  36. +PACKAGE_python-requests:python-idna \
  37. +PACKAGE_python-requests:python-urllib3 \
  38. +PACKAGE_python-requests:python-certifi
  39. VARIANT:=python
  40. endef
  41. define Package/python3-requests
  42. $(call Package/python-requests/Default)
  43. DEPENDS:= \
  44. +PACKAGE_python3-requests:python3-light \
  45. +PACKAGE_python3-requests:python3-chardet \
  46. +PACKAGE_python3-requests:python3-idna \
  47. +PACKAGE_python3-requests:python3-urllib3 \
  48. +PACKAGE_python3-requests:python3-certifi
  49. VARIANT:=python3
  50. endef
  51. define Package/python-requests/description
  52. Requests is the only Non-GMO HTTP library for Python, safe for human consumption
  53. endef
  54. define Package/python3-requests/description
  55. $(call Package/python-requests/description)
  56. .
  57. (Variant for Python3)
  58. endef
  59. $(eval $(call PyPackage,python-requests))
  60. $(eval $(call BuildPackage,python-requests))
  61. $(eval $(call BuildPackage,python-requests-src))
  62. $(eval $(call Py3Package,python3-requests))
  63. $(eval $(call BuildPackage,python3-requests))
  64. $(eval $(call BuildPackage,python3-requests-src))