All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v14 4/5] package/pkg-meson.mk: set Python sysconfigdata
Date: Wed, 23 Oct 2019 13:42:54 -0700	[thread overview]
Message-ID: <CAFSsvmowGKsba5LaD5S6xXbK0uL2kVYCvNbh9vN9-Mnu2=LFzA@mail.gmail.com> (raw)
In-Reply-To: <99a57ce9-4573-87c9-d978-f14e7fa00dba@mind.be>

Arnout:

On Tue, Oct 22, 2019 at 3:19 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 22/10/2019 23:58, Arnout Vandecappelle wrote:
> >  Note that this patch was authored by me, Adam accidentally took over authorship
> > (which is why he said on IRC he needs to send a v15).
> >
> > On 22/10/2019 22:59, Thomas Petazzoni wrote:
> >> On Mon, 21 Oct 2019 13:04:37 -0700
> >> aduskett at gmail.com wrote:
> >>
> >>> +   _PYTHON_SYSCONFIGDATA_NAME="$$(if $$(BR2_PACKAGE_PYTHON3),$$(PKG_PYTHON_SYSCONFIGDATA_NAME),_sysconfigdata)" \
> >>
> >> Why do we need this conditional on BR2_PACKAGE_PYTHON3 ?
> >> package/pkg-python.mk is using PKG_PYTHON_SYSCONFIGDATA_NAME
> >> unconditionally, regardless of Python 2.x vs. Python 3.x. Could you
> >> explain this ?
> >
> >  I can :-)
> >
> >  It's a mistake. I noticed that PKG_PYTHON_SYSCONFIGDATA_NAME was left empty for
> > python2, so I made sure it got the correct value (in Python2 there is only one
> > _sysconfigdata). However, python2 doesn't have the _PYTHON_SYSCONFIGDATA_NAME
> > variable so it's meaningless.
> >
> >  Should be tested if things work OK with python2 on target, but I expect they do.
>
>  I hadn't read Adam's remark in the cover letter yet, about how this patch
> breaks the build of libglib2.
>
>  I suspect that we shold not set _PYTHON_SYSCONFIGDATA_NAME if python3 is not
> selected. Indeed, python3 *will* observe this environment variable, but if
> target python3 is not selected, it will be empty. meson will do checks for
> host-python, and setting that environment variable will break the check (which
> is BTW an example of the comment I made in the commit log of this patch: "Note
> that this approach will still break things when meson needs to build something
> for the host during a target build."). libglib2 indeed does use python3 during
> the build, so it asks meson to check for it, but since it doesn't try to build C
> modules for the host, it still works even with a wrong _sysconfigdata.
>
>  Adam, could you test if this works better?
>
> +       $$(if
> $$(BR2_PACKAGE_PYTHON3),_PYTHON_SYSCONFIGDATA_NAME="$$(PKG_PYTHON_SYSCONFIGDATA_NAME)")
> \
$$(if $$(BR2_PACKAGE_PYTHON3),_PYTHON_SYSCONFIGDATA_NAME="$$(PKG_PYTHON_SYSCONFIGDATA_NAME),_sysconfigdata)"
Also does not work, because the target python3 may not yet be built.

>
>
>
>  Regards,
>  Arnout

  parent reply	other threads:[~2019-10-23 20:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 20:04 [Buildroot] [PATCH v14 0/5] gobject-introspection: New package aduskett at gmail.com
2019-10-21 20:04 ` [Buildroot] [PATCH v14 1/5] package/libiberty: new package aduskett at gmail.com
2020-01-16 10:33   ` Yegor Yefremov
2019-10-21 20:04 ` [Buildroot] [PATCH v14 2/5] package/prelink-cross: " aduskett at gmail.com
2019-10-21 20:04 ` [Buildroot] [PATCH v14 3/5] package/gdb: depend on libiberty aduskett at gmail.com
2019-10-21 20:04 ` [Buildroot] [PATCH v14 4/5] package/pkg-meson.mk: set Python sysconfigdata aduskett at gmail.com
2019-10-22 20:59   ` Thomas Petazzoni
2019-10-22 21:58     ` Arnout Vandecappelle
2019-10-22 22:19       ` Arnout Vandecappelle
2019-10-23 19:48         ` Adam Duskett
2019-10-23 20:42         ` Adam Duskett [this message]
2019-10-23 20:50           ` Thomas Petazzoni
2019-10-23 21:03             ` Arnout Vandecappelle
2019-10-23 21:27               ` Arnout Vandecappelle
2019-10-24 16:22                 ` Adam Duskett
2020-01-27 16:55   ` Giulio Benetti
2019-10-21 20:04 ` [Buildroot] [PATCH v14 5/5] package/gobject-introspection: new package aduskett at gmail.com
2020-02-04 10:53   ` Arnout Vandecappelle
2020-01-26 20:42 ` [Buildroot] [PATCH v14 0/5] gobject-introspection: New package Giulio Benetti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFSsvmowGKsba5LaD5S6xXbK0uL2kVYCvNbh9vN9-Mnu2=LFzA@mail.gmail.com' \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.