diff mbox

[1/1] python-protobuf: Allow host building

Message ID 20161117061212.4638-1-wak@google.com
State Changes Requested
Headers show

Commit Message

William Kennington Nov. 17, 2016, 6:12 a.m. UTC
Currently python-protobuf does not allow the building as a host package
during a cross compile. We would like to be able to build nanopb as a
host package but can't without host-python-protobuf.

Google-Bug-Id: 28000875
Change-Id: Id09f461bda3f9c7a0bd6b5c36a6a8fa92e4adb27
Signed-off-by: William A. Kennington III <wak@google.com>
---
  package/python-protobuf/python-protobuf.mk | 1 +
  1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni Nov. 17, 2016, 8:32 a.m. UTC | #1
Hello,

On Wed, 16 Nov 2016 22:12:12 -0800, William A. Kennington III wrote:
> Currently python-protobuf does not allow the building as a host package
> during a cross compile. We would like to be able to build nanopb as a
> host package but can't without host-python-protobuf.
> 
> Google-Bug-Id: 28000875
> Change-Id: Id09f461bda3f9c7a0bd6b5c36a6a8fa92e4adb27
> Signed-off-by: William A. Kennington III <wak@google.com>

Thanks for this contribution!

However, we don't really like to have "orphan" host packages, i.e host
packages that are not a dependency of anything else in Buildroot.

Do you intend to submit a Buildroot package for nanopb? Even if it's a
host package, it would probably be OK to have it in
package/Config.in.host so that it appears in menuconfig.

Thanks,

Thomas
William Kennington Nov. 17, 2016, 8:51 a.m. UTC | #2
Thomas,

The intention is to add nanopb as a host package for use in a library that
will also eventually be added. I can just add that to this patch series if
needed. I've never sent PR's via mail so I figured i would start with a
tiny one to try things out which is why I didn't also send nanopb.
Unfortunately the library depending on nanopb can't be added at this time
but I plan to have it upstream within a month.

Thanks,
William

On Thu, Nov 17, 2016 at 12:32 AM Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Wed, 16 Nov 2016 22:12:12 -0800, William A. Kennington III wrote:
> > Currently python-protobuf does not allow the building as a host package
> > during a cross compile. We would like to be able to build nanopb as a
> > host package but can't without host-python-protobuf.
> >
> > Google-Bug-Id: 28000875
> > Change-Id: Id09f461bda3f9c7a0bd6b5c36a6a8fa92e4adb27
> > Signed-off-by: William A. Kennington III <wak@google.com>
>
> Thanks for this contribution!
>
> However, we don't really like to have "orphan" host packages, i.e host
> packages that are not a dependency of anything else in Buildroot.
>
> Do you intend to submit a Buildroot package for nanopb? Even if it's a
> host package, it would probably be OK to have it in
> package/Config.in.host so that it appears in menuconfig.
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Thomas Petazzoni Nov. 17, 2016, 9:14 a.m. UTC | #3
Hello,

On Thu, 17 Nov 2016 08:51:20 +0000, William Kennington wrote:

> The intention is to add nanopb as a host package for use in a library that
> will also eventually be added. I can just add that to this patch series if
> needed. I've never sent PR's via mail so I figured i would start with a
> tiny one to try things out which is why I didn't also send nanopb.

OK, understood.

> Unfortunately the library depending on nanopb can't be added at this time
> but I plan to have it upstream within a month.

It would be great to send the whole thing as a patch series:

 PATCH 1: adds the host variant of python-protobuf
 PATCH 2: adds the host nanopb package
 PATCH 3: adds the library that itself needs the host nanopb package

Thanks!

Thomas
William Kennington Nov. 17, 2016, 7:10 p.m. UTC | #4
Sounds good, closed. I'll submit the new patch series when it is ready.

On Thu, Nov 17, 2016 at 1:14 AM Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Thu, 17 Nov 2016 08:51:20 +0000, William Kennington wrote:
>
> > The intention is to add nanopb as a host package for use in a library
> that
> > will also eventually be added. I can just add that to this patch series
> if
> > needed. I've never sent PR's via mail so I figured i would start with a
> > tiny one to try things out which is why I didn't also send nanopb.
>
> OK, understood.
>
> > Unfortunately the library depending on nanopb can't be added at this time
> > but I plan to have it upstream within a month.
>
> It would be great to send the whole thing as a patch series:
>
>  PATCH 1: adds the host variant of python-protobuf
>  PATCH 2: adds the host nanopb package
>  PATCH 3: adds the library that itself needs the host nanopb package
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
diff mbox

Patch

diff --git a/package/python-protobuf/python-protobuf.mk  
b/package/python-protobuf/python-protobuf.mk
index d8be76d..d46bda2 100644
--- a/package/python-protobuf/python-protobuf.mk
+++ b/package/python-protobuf/python-protobuf.mk
@@ -13,4 +13,5 @@  PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf
  PYTHON_PROTOBUF_SETUP_TYPE = setuptools
  PYTHON_PROTOBUF_SUBDIR = python

+$(eval $(host-python-package))
  $(eval $(python-package))