Skip to contentSkip to conversation

python3: add PACKAGECONFIG[editline]

PATCH In review Etienne Cordonnier 2 participants 2 messages Sep 13, 2022 – Sep 14, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 python3: add PACKAGECONFIG[editline]

editline is a BSD alternative for readline which is GPLv3.

---
 meta/recipes-devtools/python/python3_3.10.6.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3_3.10.6.bb +1 -0
index 1b28728732..1f8b60a7a5 100644
@@ -105,6 +105,7 @@ PACKAGECONFIG:class-target ??= "readline gdbm ${@bb.utils.filter('DISTRO_FEATURE
 PACKAGECONFIG:class-native ??= "readline gdbm"
 PACKAGECONFIG:class-nativesdk ??= "readline gdbm"
 PACKAGECONFIG[readline] = ",,readline"
+PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline"
 # Use profile guided optimisation by running PyBench inside qemu-user
 PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
 PACKAGECONFIG[tk] = ",,tk"
Signature · 1 line
2.36.1.vfs.0.0
#1 lore raw

Hi Etienne,

Quoted 12 lines · Etienne Cordonnier via lists.openembedded.org

editline is a BSD alternative for readline which is GPLv3.

---
  meta/recipes-devtools/python/python3_3.10.6.bb | 1 +
  1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3_3.10.6.bb +0 -0
index 1b28728732..1f8b60a7a5 100644

meta/recipes-devtools/python/python3_3.10.6.bb PACKAGECONFIG:class-target ??= "readline gdbm ${@bb.utils.filter('DISTRO_FEATURE · line 108

Quoted 4 lines
meta/recipes-devtools/python/python3_3.10.6.bb +1 -0
@@ -105,6 +105,7 @@ PACKAGECONFIG:class-target ??= "readline gdbm ${@bb.utils.filter('DISTRO_FEATURE
  PACKAGECONFIG:class-native ??= "readline gdbm"
  PACKAGECONFIG:class-nativesdk ??= "readline gdbm"
  PACKAGECONFIG[readline] = ",,readline"
+PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline"

I'm wondering if something else isn't missing just below:
https://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python3_3.10.6.bb?h=master#n119

Considering the introducing commit: https://cgit.openembedded.org/openembedded-core/commit/?id=79ebbca6943bc66b619671f93ac283ed2cfc8e5c

I'm wondering if there isn't something we can do better here.

I see that the configure.ac script allows to disable readline entirely, c.f. https://github.com/python/cpython/blob/v3.10.6/configure.ac#L4945-L5062

--without-readline should work. I hope this can fix the issue the aforementioned commit works around by avoiding to always try to build the readline module.

Now we'll have another issue is that this without-readline should be passed only when both readline and editline PACKAGECONFIG are not used.

I guess we usually do it by having EXTRA_OECONF with the --without-readline always set (you'll need --with-readline in the readline PACKAGECONFIG though). Then if readline or editline is set, --without-readline will be overridden by either --with-readline or --with-readline=editline?

Cc'ing Alex as author of the aforementioned commit, hope you don't mind :)

Cheers,
Quentin

Quoted 14 lines
meta/recipes-devtools/python/python3_3.10.6.bb +0 -1
  # Use profile guided optimisation by running PyBench inside qemu-user
  PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
  PACKAGECONFIG[tk] = ",,tk"
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#170597): https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_170597&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=XNvdvtLikCKaFjNcAWNt5mIde00pSKx-u0DJa3IygGZ8HV_LB2KCmWfxVykHwOx9&s=SKoNv6E4PhcWNWbzSaKgReME4onz_12fEFLgVq9UTbI&e=
Mute This Topic: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_93657764_6293953&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=XNvdvtLikCKaFjNcAWNt5mIde00pSKx-u0DJa3IygGZ8HV_LB2KCmWfxVykHwOx9&s=oTjBsA6DrUJHv0YGJ-JKxn9gexa5br-EM3G0Yo6jRUM&e=
Group Owner: [email protected]
Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=XNvdvtLikCKaFjNcAWNt5mIde00pSKx-u0DJa3IygGZ8HV_LB2KCmWfxVykHwOx9&s=4Q3jRB_dGGJ86BqqJLUoXjixcpsEqtwuhC9ImPl0kng&e= [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-