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