Hi Ross, On Wed, Oct 28, 2026 at 12:43 PM Ross Burton <[email protected]> wrote:
> On 22 Oct 2026, at 19:36, Leon Anavi via lists.openembedded.org > <[email protected]> wrote: > > diff --git a/scripts/lib/recipetool/create.py > b/scripts/lib/recipetool/create.py > > index bf533a45cf..3baf19c7c2 100644 > > --- a/scripts/lib/recipetool/create.py > > +++ b/scripts/lib/recipetool/create.py > > @@ -795,6 +795,20 @@ def create_recipe(args): > > if name_pv and not realpv: > > realpv = name_pv > > > > + # PYPI_PACKAGE is not needed if it matches the default derived from > BPN (see pypi.bbclass) > > + if pn and 'pypi' in classes and extravalues.get('PYPI_PACKAGE'): > > + bpn = pn > > + if bpn.endswith('-native'): > > + bpn = bpn[:-len('-native')] > > + if bpn.startswith('nativesdk-'): > > + bpn = bpn[len('nativesdk-'):] > > + for prefix in ('python-', 'python3-'): > > + if bpn.startswith(prefix): > > + bpn = bpn[len(prefix):] > > + break > > + if re.sub(r"[-_.]+", "-", bpn).lower() == > extravalues['PYPI_PACKAGE']: > > + del extravalues['PYPI_PACKAGE'] > > + > > handle_license_vars(srctree_use, lines_before, handled, extravalues, > tinfoil.config_data) > > > > if not outfile: > > This is adding buildsystem-specific logic into the generic create.py, > which is continued will mean the logic is spread across multiple places. > > I think it would be better to have a “cleanup” hook for the build system > plugins, so the python-specific cleanup can remain in the python plugin. > Thank you for the code review. Following your suggestion, I have submitted version 2 of the patch, which includes a cleanup hook in create_buildsys_python.py. Please let me know if you have any remarks. Best regards, Leon
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#249036): https://lists.openembedded.org/g/openembedded-core/message/249036 Mute This Topic: https://lists.openembedded.org/mt/121889035/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
