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