]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
pypi.bbclass: improve UPSTREAM_CHECK_REGEX
authorTim Orling <tim.orling@konsulko.com>
Sun, 9 Aug 2026 23:19:02 +0000 (16:19 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Aug 2026 17:01:16 +0000 (18:01 +0100)
UPSTREAM_CHECK_REGEX was case-sensitive, but PyPI's simple index now lists
lowercase sdist filenames (e.g. gitpython-*.tar.gz) for packages whose
PYPI_PACKAGE is mixed-case (e.g. GitPython).

Added an (?i) inline flag so the regex matches regardless of case — this
fixes AUH detection for python3-git and any other pypi.bbclass recipe hit
by the same upstream lowercase-normalization trend, without needing
per-recipe overrides.

This will not magically fix fetching, but WILL at least mean AUH will
detect more upstream releases and maintainers will see when the
resulting default PYPI_SRC_URI is failing.

A fix for some recipes might be to set:

PYPI_SRC_URI = ""${@pypi_src_uri(d).lower()}"

but it is premature to set that globally, as legacy recipes with
releases before the PEP-625 normalization still exist.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/pypi.bbclass

index bd21557c60691956b1018d745f6dca9efb365ae1..0897994bb6516d04b04b2c9870d6a0bffec135c3 100644 (file)
@@ -51,7 +51,7 @@ UPSTREAM_CHECK_PYPI_PACKAGE ?= "${PYPI_PACKAGE}"
 #
 # NOTE: All URLs for the simple API MUST request canonical normalized URLs per the spec
 UPSTREAM_CHECK_URI ?= "https://pypi.org/simple/${@pypi_normalize(d)}/"
-UPSTREAM_CHECK_REGEX ?= "${UPSTREAM_CHECK_PYPI_PACKAGE}-(?P<pver>(\d+[\.\-_]*)+).(tar\.gz|tgz|zip|tar\.bz2)"
+UPSTREAM_CHECK_REGEX ?= "(?i)${UPSTREAM_CHECK_PYPI_PACKAGE}-(?P<pver>(\d+[\.\-_]*)+).(tar\.gz|tgz|zip|tar\.bz2)"
 
 CVE_PRODUCT ?= "python:${PYPI_PACKAGE}"