diff --git a/lang/python/chardet/Makefile b/lang/python/chardet/Makefile deleted file mode 100644 index 27020c759..000000000 --- a/lang/python/chardet/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=chardet -PKG_VERSION:=3.0.4 -PKG_RELEASE:=1 -PKG_LICENSE:=LGPL-2.1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/ -PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae - -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/chardet - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Universal encoding detector for Python 2 and 3 - URL:=https://github.com/chardet/chardet - DEPENDS:=+python -endef - -define Package/chardet/description - Universal encoding detector for Python 2 and 3 -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/chardet/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \ - $(1)/usr/bin - # fix python exec path in scripts - sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect -endef - -$(eval $(call BuildPackage,chardet)) diff --git a/lang/python/python-chardet/Makefile b/lang/python/python-chardet/Makefile new file mode 100644 index 000000000..24d164ada --- /dev/null +++ b/lang/python/python-chardet/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2007-2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-chardet +PKG_VERSION:=3.0.4 +PKG_RELEASE:=1 +PKG_LICENSE:=LGPL-2.1 + +PKG_SOURCE:=chardet-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/ +PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-chardet-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-chardet/Defaults + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Alexandru Ardelean + URL:=https://github.com/chardet/chardet +endef + +define Package/python-chardet +$(call Package/python-chardet/Default) + TITLE:=Universal encoding detector for Python 2 + DEPENDS:=+PACKAGE_python-chardet:python + VARIANT:=python +endef + +define Package/python3-chardet +$(call Package/python-chardet/Default) + TITLE:=Universal encoding detector for Python3 + DEPENDS:=+PACKAGE_python3-chardet:python3-light + VARIANT:=python3 +endef + +define Package/python-chardet/description + Universal encoding detector for Python 2 and 3 +endef + +define Package/python3-chardet/description +$(call Package/python-chardet/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-chardet)) +$(eval $(call BuildPackage,python-chardet)) +$(eval $(call BuildPackage,python-chardet-src)) + +$(eval $(call Py3Package,python3-chardet)) +$(eval $(call BuildPackage,python3-chardet)) +$(eval $(call BuildPackage,python3-chardet-src)) diff --git a/lang/python/python-pytz/Makefile b/lang/python/python-pytz/Makefile new file mode 100644 index 000000000..069f75ba6 --- /dev/null +++ b/lang/python/python-pytz/Makefile @@ -0,0 +1,76 @@ +# +# Copyright (C) 2007-2019 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pytz +PKG_VERSION:=2018.9 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=pytz-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz +PKG_HASH:=d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pytz-$(PKG_VERSION) + +HOST_BUILD_DEPENDS:=python/host + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-pytz/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Alexandru Ardelean + URL:=https://sourceforge.net/projects/pytz/ +endef + +define Package/python-pytz +$(call Package/python-pytz/Default) + TITLE:=World timezone definitions, modern and historical + DEPENDS:=+PACKAGE_python-pytz:python-light + VARIANT:=python +endef + +define Package/python3-pytz +$(call Package/python-pytz/Default) + TITLE:=World timezone definitions, modern and historical for Python3 + DEPENDS:=+PACKAGE_python3-pytz:python3-light + VARIANT:=python3 +endef + +define Package/python-pytz/description + World timezone definitions, modern and historical +endef + +define Package/python3-pytz/description +$(call Package/python-pytz/description) +. +(Variant for Python3) +endef + +define Host/Compile + $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") +endef + +Host/Install:= + +$(eval $(call HostBuild)) + +$(eval $(call PyPackage,python-pytz)) +$(eval $(call BuildPackage,python-pytz)) +$(eval $(call BuildPackage,python-pytz-src)) + +$(eval $(call Py3Package,python3-pytz)) +$(eval $(call BuildPackage,python3-pytz)) +$(eval $(call BuildPackage,python3-pytz-src)) diff --git a/lang/python/python-requests/Makefile b/lang/python/python-requests/Makefile index cc2648761..926ac8c86 100644 --- a/lang/python/python-requests/Makefile +++ b/lang/python/python-requests/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2007-2019 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -15,28 +15,62 @@ PKG_LICENSE:=Apache-2.0 PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests PKG_HASH:=502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e -PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION) PKG_CPE_ID:=cpe:/a:python-requests:requests include $(INCLUDE_DIR)/package.mk include ../python-package.mk +include ../python3-package.mk -define Package/python-requests +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-requests/Defaults SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Eneas U de Queiroz - TITLE:=HTTP library for Python + PKG_MAINTAINER:=Josef Schlehofer , Alexandru Ardelean URL:=http://python-requests.org/ - DEPENDS:=+python +chardet +python-idna +python-urllib3 +python-certifi +endef + +define Package/python-requests +$(call Package/python-requests/Default) + TITLE:=HTTP library for Python + DEPENDS:= \ + +PACKAGE_python-requests:python \ + +PACKAGE_python-requests:chardet \ + +PACKAGE_python-requests:python-idna \ + +PACKAGE_python-requests:python-urllib3 \ + +PACKAGE_python-requests:python-certifi VARIANT:=python endef +define Package/python3-requests +$(call Package/python-requests/Default) + TITLE:=HTTP library for Python3 + DEPENDS:= \ + +PACKAGE_python3-requests:python3-light \ + +PACKAGE_python3-requests:python3-chardet \ + +PACKAGE_python3-requests:python3-idna \ + +PACKAGE_python3-requests:python3-urllib3 \ + +PACKAGE_python3-requests:python3-certifi + VARIANT:=python3 +endef + define Package/python-requests/description Requests is the only Non-GMO HTTP library for Python, safe for human consumption. endef +define Package/python3-requests/description +$(call Package/python-requests/description) +. +(Variant for Python3) +endef + $(eval $(call PyPackage,python-requests)) $(eval $(call BuildPackage,python-requests)) $(eval $(call BuildPackage,python-requests-src)) + +$(eval $(call Py3Package,python3-requests)) +$(eval $(call BuildPackage,python3-requests)) +$(eval $(call BuildPackage,python3-requests-src)) diff --git a/lang/python/python-simplejson/Makefile b/lang/python/python-simplejson/Makefile new file mode 100644 index 000000000..3ba4a6764 --- /dev/null +++ b/lang/python/python-simplejson/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2007-2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-simplejson +PKG_VERSION:=3.16.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=simplejson-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson +PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-simplejson-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-simplejson/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Alexandru Ardelean + URL:=https://simplejson.readthedocs.org/ +endef + +define Package/python-simplejson +$(call Package/python-simplejson/Default) + TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2 + DEPENDS:=+PACKAGE_python-simplejson:python-light + VARIANT:=python +endef + +define Package/python3-simplejson +$(call Package/python-simplejson/Default) + TITLE:=Simple, fast, extensible JSON encoder/decoder for Python3 + DEPENDS:=+PACKAGE_python3-simplejson:python3-light + VARIANT:=python3 +endef + +define Package/python-simplejson/description + Simple, fast, extensible JSON encoder/decoder for Python +endef + +define Package/python3-simplejson/description +$(call Package/python-simplejson/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-simplejson)) +$(eval $(call BuildPackage,python-simplejson)) +$(eval $(call BuildPackage,python-simplejson-src)) + +$(eval $(call Py3Package,python3-simplejson)) +$(eval $(call BuildPackage,python3-simplejson)) +$(eval $(call BuildPackage,python3-simplejson-src)) diff --git a/lang/python/pytz/Makefile b/lang/python/pytz/Makefile deleted file mode 100644 index 1aadc3af8..000000000 --- a/lang/python/pytz/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2007-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pytz -PKG_VERSION:=2018.9 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz -PKG_HASH:=d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c - -PKG_BUILD_DEPENDS:=python/host -HOST_BUILD_DEPENDS:=python/host - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/pytz - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=World timezone definitions, modern and historical - URL:=https://sourceforge.net/projects/pytz/ - DEPENDS:=+python -endef - -define Package/pytz/description - World timezone definitions, modern and historical -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") -endef - -Host/Install:= - -define Package/pytz/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,pytz)) diff --git a/lang/python/simplejson/Makefile b/lang/python/simplejson/Makefile deleted file mode 100644 index 0f43a675c..000000000 --- a/lang/python/simplejson/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=simplejson -PKG_VERSION:=3.16.0 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson -PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5 - -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/simplejson - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Simple, fast, extensible JSON encoder/decoder for Python - URL:=https://simplejson.readthedocs.org/ - DEPENDS:=+python -endef - -define Package/simplejson/description - Simple, fast, extensible JSON encoder/decoder for Python -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/simplejson/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,simplejson))