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 (#208689): 
https://lists.openembedded.org/g/openembedded-core/message/208689
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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to