| Message ID | 20261129070552.3072212-1-khem.raj@oss.qualcomm.com |
|---|---|
| State | New |
| Headers | show |
| Series | python_flit_core: Drop upper bounds on flit_core in build requires | expand |
On Sun, 29 Nov 2026 at 08:05, Khem Raj via openembedded-core <raj.khem= gmail.com@lists.openembedded.org> wrote: > Most projects pin the flit_core build backend below its next major > version (flit_core <4 or <5) in pyproject.toml. With flit-core 4.2.0, > pyproject-build rejects 35 recipes in oe-core and meta-openembedded, > including python3-typing-extensions, python3-docutils, python3-jinja2 > and python3-click, before flit_core is even called. > > Remove the upper bound on flit_core from pyproject.toml before > configure, so the flit-core we ship satisfies these requirements. > Projects that still use the [tool.flit.metadata] table, which > flit_core 4 removed, need their own fix. > > AI-Generated: Uses Claude Code Wait. flit-core 4.x is a major release with incompatible changes (as listed in the next patch), so brute-forcing removal of build time version restrictions is asking for trouble. Have you verified that these 35 recipes do not break at runtime? Alex
diff --git a/meta/classes-recipe/python_flit_core.bbclass b/meta/classes-recipe/python_flit_core.bbclass index cb40ab0faf..ea37630746 100644 --- a/meta/classes-recipe/python_flit_core.bbclass +++ b/meta/classes-recipe/python_flit_core.bbclass @@ -8,6 +8,20 @@ inherit python_pep517 DEPENDS += "python3-flit-core-native" +# Many projects pin flit_core below the next major version in their +# build-system requires; pyproject-build then rejects the flit-core we +# ship once it is newer. Drop the upper bound on flit_core there. +python_flit_core_relax_requires () { + if [ -f ${PEP517_SOURCE_PATH}/pyproject.toml ]; then + sed -i -E \ + -e '/flit[_-]core/s/,[[:space:]]*<[[:space:]]*[0-9][0-9.]*//' \ + -e '/flit[_-]core/s/<[[:space:]]*[0-9][0-9.]*[[:space:]]*,[[:space:]]*//' \ + -e '/flit[_-]core/s/<[[:space:]]*[0-9][0-9.]*//' \ + ${PEP517_SOURCE_PATH}/pyproject.toml + fi +} +do_configure[prefuncs] += "python_flit_core_relax_requires" + python_flit_core_do_manual_build () { cd ${PEP517_SOURCE_PATH} nativepython3 -m flit_core.wheel --outdir ${PEP517_WHEEL_PATH} .
Most projects pin the flit_core build backend below its next major version (flit_core <4 or <5) in pyproject.toml. With flit-core 4.2.0, pyproject-build rejects 35 recipes in oe-core and meta-openembedded, including python3-typing-extensions, python3-docutils, python3-jinja2 and python3-click, before flit_core is even called. Remove the upper bound on flit_core from pyproject.toml before configure, so the flit-core we ship satisfies these requirements. Projects that still use the [tool.flit.metadata] table, which flit_core 4 removed, need their own fix. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- meta/classes-recipe/python_flit_core.bbclass | 14 ++++++++++++++ 1 file changed, 14 insertions(+)