python3: add python3-readline subpackage

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>
This commit is contained in:
Alexandru Ardelean
2021-05-19 12:16:20 +03:00
parent 35264e0a2c
commit 49faf5d7ca
3 changed files with 18 additions and 3 deletions

View 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, \

View File

@@ -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) \
))