[Buildroot] [PATCH v4] package/python-pillow: new package

Angelo Compagnucci angelo.compagnucci at gmail.com
Wed Feb 24 07:06:42 UTC 2016


Dear Thomas Petazzoni,

2016-02-23 23:35 GMT+01:00 Thomas Petazzoni
<thomas.petazzoni at free-electrons.com>:
> Hello,
>
> On Tue, 23 Feb 2016 23:18:47 +0100, Angelo Compagnucci wrote:
>
>> Right.
>>
>> I actually implemented something lie this in pkg-python.mk
>>
>> [...]
>> $(2)_BUILD_TARGET ?= build
>> [...]
>> $(2)_BASE_BUILD_TGT   = $$($(2)_BUILD_TARGET)
>> [...]
>>
>> and seems to work and not breaking other packages.
>> This way I can add:
>>
>> PYTHON_PILLOW_BUILD_TARGET = build_ext
>>
>> What do you think?
>
> Since it's the first package to require this, I would rather suggest to
> override PYTHON_PILLOW_BUILD_CMDS in python-pillow.mk, so that this
> hack is limited to this package.
>
> Should more packages need this in the future, we can add better
> support in the infrastructure.

I just sent a patch in which I implemented custom BUILD_CMDS and
INSTALL_TARGET_CMDS.

> But a Python package that needs to pass options only to build_ext is
> IMO broken, and should allow them to be passed to the "build" target.
> build_ext is more or less an internal step, which we shouldn't have to
> worry about.
>
>
>> >> +Signed-off-by: Angelo Compagnucci <angelo.compagnucci at gmail.com>
>> >
>> > Can you submit this patch upstream or at least report the issue?
>>
>> I don't think so. That piece of code is used to guess the platform on
>> which your are compiling with the assumption that host arch == target
>> arch. Probably, pillow is not originally designed to be cross compiled
>> and the build system would require a rewrite for a more structured
>> approach.
>> The only way to let buildroot passing the appropriate options to build
>> and setup is to remove that piece of code.
>
> Well, you can make it upstreamable by making it understand some
> environment variable, or better some option, to indicate that we are
> cross-compiling.
>
> So yes, your patch is not acceptable upstream as is, but my comment is
> precisely that is should ideally be in a form that can potentially be
> accepted upstream.

IMHO not having pillow in Buildroot in really a pity. I used it so
many times in various projects that I was shocked when I realized it
was lacking.

I would invest some time to try to understand better the build system
and try to submit an upstream patch for a fully cross compilation, in
the meantime, could you accept this patch?

It now looks good to me!

>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo



More information about the buildroot mailing list