Skip to contentSkip to conversation

python3: dont disable readline module for editline

PATCH In review Nick Owens 2 participants 2 messages Feb 27, 2024 – Mar 29, 2024

lore
Share & tools
lore

Nick Owens

author
#0 lore raw

PATCH 1/1 python3: dont disable readline module for editline

if we use editline, then the readline module must also be enabled for python to build the readline module and link it against libedit.

---
 meta/recipes-devtools/python/python3_3.12.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3_3.12.1.bb +1 -1
index 771902cd2c..b4916d8cef 100644
@@ -113,7 +113,7 @@ do_configure:prepend () {
     cat > ${B}/Modules/Setup.local << EOF
 *disabled*
 ${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)}
-${@bb.utils.contains('PACKAGECONFIG', 'readline', '', 'readline', d)}
+${@bb.utils.contains_any('PACKAGECONFIG', 'readline editline', '', 'readline', d)}
 ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', '_tkinter', d)}
 EOF
 }
Signature · 1 line
2.34.1
#1 lore raw

unfortunately this change regresses ptests on musl based systems. Similar to https://github.com/python/cpython/issues/87338
but that issue is fixed so enabling both must be triggering it again in some way.

======================================================================
FAIL: test_write_read_append (test.test_readline.TestHistoryManipulation.test_write_read_append)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.12/test/test_readline.py", line 96, in test_write_read_append
self.assertEqual(readline.get_current_history_length(), 3)
AssertionError: 4 != 3

----------------------------------------------------------------------
Ran 9 tests in 0.178s

FAILED (failures=1, skipped=1)
test test_readline failed