python-requests-oauthlib: use PyPackage to build 7580/head
authorEneas U de Queiroz <cote2004-github@yahoo.com>
Tue, 4 Dec 2018 18:08:50 +0000 (16:08 -0200)
committerEneas U de Queiroz <cote2004-github@yahoo.com>
Wed, 5 Dec 2018 10:34:01 +0000 (08:34 -0200)
Updated Makefile to use PyPackage, added option to build source package,
updated PKG_SOURCE_URL, and adpated to python-pyjwt new package name.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
lang/python/python-requests-oauthlib/Makefile

index 618925fafa4cd22aa9333083c84a0f760f60afcb..17b5fd30c0f1f4162b84b4316d9f5a75715102f4 100644 (file)
@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-requests-oauthlib
 PKG_VERSION:=1.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=ISC
 
 PKG_SOURCE:=requests-oauthlib-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/95/be/072464f05b70e4142cb37151e215a2037b08b1400f8a56f2538b76ca6205
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests-oauthlib
 PKG_HASH:=8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f
 PKG_BUILD_DIR:=$(BUILD_DIR)/requests-oauthlib-$(PKG_VERSION)
 
@@ -27,22 +27,14 @@ define Package/python-requests-oauthlib
   MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
   TITLE:=OAuthlib authentication support for Requests.
   URL:=https://github.com/requests/requests-oauthlib
-  DEPENDS:=+python +python-requests +python-oauthlib +python-cryptography +pyjwt
+  DEPENDS:=+python +python-requests +python-oauthlib +python-cryptography +python-pyjwt
+  VARIANT:=python
 endef
 
 define Package/python-requests-oauthlib/description
   This project provides first-class OAuth library support for Requests.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/python-requests-oauthlib/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
+$(eval $(call PyPackage,python-requests-oauthlib))
 $(eval $(call BuildPackage,python-requests-oauthlib))
+$(eval $(call BuildPackage,python-requests-oauthlib-src))