[Buildroot] package/pkg-python.mk: refactor setup-type variables

James Hilliard james.hilliard1 at gmail.com
Sun Oct 1 08:41:17 UTC 2023


On Sun, Oct 1, 2023 at 2:21 AM Arnout Vandecappelle <arnout at mind.be> wrote:
>
>
>
> On 01/10/2023 06:05, James Hilliard wrote:
> > On Sat, Sep 30, 2023 at 4:17 PM Arnout Vandecappelle <arnout at mind.be> wrote:
> >>
> >> Most of the python-package infrastructure consists of a big conditional
> >> tree that sets various variables based on the package's setup type.
> >> Initially, this was quite OK, but since we have 7 different setup types
> >> now, some of which share some variables with others, it's becoming quite
> >> complicated and hard to read.
> >
> > It might be a good idea to apply my setuptools pep517 patch first which
> > simplifies things a bit by largely combining the setuptools setup type with
> > pep517 builds.
> >
> > https://patchwork.ozlabs.org/project/buildroot/patch/20230930152517.1077576-3-james.hilliard1@gmail.com/
>
>   Yeah, my series was already finished when you sent that, but the testing took
> more than 24 hours...
>
>   The two will conflict with each other, obviously, but I think they can be
> applied in either order.

True, however the complexity reduction of the pep517 migration should also
simplify your series a bit and make it a lot easier to review.

>
>
> > We can probably drop distutils setup type as well as we should be able to
> > instead just use setuptools for any packages using that.
>
>   That's a bit a longer-term project.

I only see 4 packages still using distutils still so assuming they work ok under
setuptools this may actually be quite simple.

I'll try and test if those build under setuptools and migrate them if they do.

>
>   That said, assuming that distutils is gone, do you think the current condition
> tree would be simpler than the indirect variables that my series ends up with?

It's a little hard to tell, ultimately we're only going to have pep517
style builds for
everything plus flit-core-boostrap for bootstrapping our pep517 toolchain since
the entire python ecosystem appears to have moved to pep517 packaging.

>
>   Regards,
>   Arnout
>
> [snip]



More information about the buildroot mailing list