python3: add python3-readline subpackage 15659/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 19 May 2021 09:16:20 +0000 (12:16 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 19 May 2021 11:17:00 +0000 (14:17 +0300)
Python3 comes with a built-in readline module. It wasn't included up until
now; mostly because it wasn't considered.

This change introduces it as a sub-package of the main Python3 package.
readline support is included in Python.

libreadline pulls libncursesw as a package, so python3-ncurses was
updated to pull libncursesw as well.
It should be the same package; mostly done for consistency.

Resolves the issue reported here:
  https://forum.openwrt.org/t/python3-repl-missing-readline/90039

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

index ba1b6df5a53638138f3407ba0f9aba91b73a8712..121a2905435676c2c479d3b0a162577262e43495 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 include ../python3-version.mk
 
 PKG_NAME:=python3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -270,7 +270,6 @@ define Py3Package/python3-light/filespec
 -|/usr/lib/python$(PYTHON3_VERSION)/tkinter
 -|/usr/lib/python$(PYTHON3_VERSION)/turtledemo
 -|/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_test*.so
--|/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/readline*.so
 -|/usr/lib/python$(PYTHON3_VERSION)/pdb.doc
 -|/usr/lib/python$(PYTHON3_VERSION)/test
 -|/usr/lib/python$(PYTHON3_VERSION)/webbrowser.py
index 45649ac754ede42412e273546c7a37c8d50e2cc3..3ecdeb336226051218f654fe71f8fcb074c8454f 100644 (file)
@@ -8,7 +8,7 @@
 define Package/python3-ncurses
 $(call Package/python3/Default)
   TITLE:=Python $(PYTHON3_VERSION) ncurses module
-  DEPENDS:=+python3-light +libncurses
+  DEPENDS:=+python3-light +libncursesw
 endef
 
 $(eval $(call Py3BasePackage,python3-ncurses, \
diff --git a/lang/python/python3/files/python3-package-readline.mk b/lang/python/python3/files/python3-package-readline.mk
new file mode 100644 (file)
index 0000000..4ce408d
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2021 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-readline
+$(call Package/python3/Default)
+  TITLE:=Python $(PYTHON3_VERSION) readline module
+  DEPENDS:=+python3-light +libreadline +libncursesw
+endef
+
+$(eval $(call Py3BasePackage,python3-readline, \
+       /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/readline.$(PYTHON3_SO_SUFFIX) \
+))