Unfortunately, there's a large swath of packages in both oe-core (>30) in meta-python (>70) that do not follow PEP625. I'll send a v3 patchset that normalizes the URLs and sdist filenames for the future (assuming folks standardize to follow PEP625 in the future), but we'll still carry a large number of special cases in the interim.
On Fri, Dec 13, 2024 at 12:09 PM Derek Straka <de...@asterius.io> wrote: > Hi Ross, > > I'll give that normalization another shot. I saw a couple older packages > not following the normalized filenames, but those could be outliers. > Thanks for the pointer. > > -Derek > > On Fri, Dec 13, 2024 at 12:07 PM Ross Burton <ross.bur...@arm.com> wrote: > >> On 13 Dec 2024, at 15:14, Alexander Kanavin via lists.openembedded.org >> <alex.kanavin=gmail....@lists.openembedded.org> wrote: >> > >> > On Fri, 13 Dec 2024 at 15:53, Derek Straka <de...@asterius.io> wrote: >> >> Thanks for your note. I’m working through the remaining downstream >> recipe changes today which should address the rest of the UNKNOWN_BROKEN >> recipes. >> >> >> >> While looking at it yesterday, the download packages come primarily in >> two archetypes: >> >> 1. Those that replace ‘_’ with ‘-‘ in the source archives >> >> 2. Those that leave the ‘_’ ONLY in the archives >> >> >> >> Given that, I think it’s unlikely there’s a clean fix in the bbclass >> without a more invasive change to the upstream check logic. I can, >> however, package all the changes for one-core into a single patchset and >> submit a v2. That will at least address all the core updates in one fell >> swoop. >> >> >> >> Does that sound reasonable? >> > >> > Seems so, yes. >> > >> > Historically pypi upstream checks have been a pain, as there has been >> > a constant stream of seemingly random breaking changes, of two types: >> > >> > 1. _ being replaced by - and vice versa >> > 2. CamelCasing being replaced by lowercasing and vice versa. >> > >> > I haven't been able to figure out any pattern in this, or come up with >> > a universal check. If you can simply fix up core recipes to not return >> > UNKNOWN_BROKEN, I'd appreciate. >> >> I’ve some partial branches that attempt to bring sanity to this but yes, >> it’s a mess. >> >> The good news is that https://peps.python.org/pep-0625/ says that sdist >> filenames should be normalised and from what I can tell everything but >> setuptools does normalise, and the use of setuptools is falling. >> >> The simple update API says that the project name is normalised, so we can >> add a little normalise function: >> >> def pypi_normalize(s): >> import re >> return re.sub(r"[-_.]+", "_", s).lower() >> >> And use that to turn the PYPI_PACKAGE into the right thing, surely? >> >> Rationalising this is the source of at least three wip branches I have >> locally, so I’d love to see it sorted. >> >> Ross > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#208694): https://lists.openembedded.org/g/openembedded-core/message/208694 Mute This Topic: https://lists.openembedded.org/mt/110085421/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-