python3: split python3-urllib from python3-light 8307/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Tue, 26 Feb 2019 13:37:47 +0000 (15:37 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Tue, 26 Feb 2019 13:37:48 +0000 (15:37 +0200)
This is the result of this discussion:
  https://github.com/openwrt/packages/issues/8285

`urllib.request` requires the `email` module/lib, which was part of
python3-light.
This change moves the Lib/urllib folder from the python3-light into it's
own package, making it lighter. At least this way, users that want `urllib`
(on top of `python3-light`) will be forced to install it via opkg and this
will make sure `python3-email` gets installed as well.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python3/Makefile
lang/python/python3/files/python3-package-urllib.mk [new file with mode: 0644]

index 872f654b8d59263a3aef0845429eed34854e2177..46d88ae51ed26dbc5b02db05d7680719876ec1c9 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
diff --git a/lang/python/python3/files/python3-package-urllib.mk b/lang/python/python3/files/python3-package-urllib.mk
new file mode 100644 (file)
index 0000000..ddd7b1d
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-urllib
+$(call Package/python3/Default)
+  TITLE:=Python $(PYTHON3_VERSION) URL library module
+  DEPENDS:=+python3-light +python3-email
+endef
+
+$(eval $(call Py3BasePackage,python3-urllib, \
+       /usr/lib/python$(PYTHON3_VERSION)/urllib \
+))