All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/8] python-setuptools: check host-python version
Date: Tue, 2 Jan 2018 21:44:41 +0100	[thread overview]
Message-ID: <20180102214441.771066aa@windsurf.lan> (raw)
In-Reply-To: <20180102163337.6334-4-aduskett@gmail.com>

Hello,

On Tue,  2 Jan 2018 11:33:32 -0500, Adam Duskett wrote:
> python-setuptools is compatible with both python2 and python3, as such,
> there is no need to force python2 as a dependency.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
>  package/python-setuptools/python-setuptools.mk | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk
> index 28d4f29b5b..a21494a288 100644
> --- a/package/python-setuptools/python-setuptools.mk
> +++ b/package/python-setuptools/python-setuptools.mk
> @@ -10,10 +10,18 @@ PYTHON_SETUPTOOLS_LICENSE = MIT
>  PYTHON_SETUPTOOLS_LICENSE_FILES = LICENSE
>  PYTHON_SETUPTOOLS_SETUP_TYPE = setuptools
>  
> +ifeq ($(BR2_PACKAGE_HOST_PYTHON3),y)
> +HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON += python3
> +HOST_PYTHON_SETUPTOOLS_PYLIBVER = python$(PYTHON3_VERSION_MAJOR)
> +else
> +HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON += python
> +HOST_PYTHON_SETUPTOOLS_PYLIBVER = python$(PYTHON_VERSION_MAJOR)
> +endif

So, now, if the user selects:

BR2_PACKAGE_PYTHON=y
BR2_PACKAGE_PYTHON_ARROW=y
BR2_PACKAGE_HOST_PYTHON3=y

then the build will break. Indeed, since python2 is selected as the
Python for the target, python-arrow should be built and installed for
python2, so it will expect host-python-setuptools to be built and
installed for host-python.

But because the user has selected BR2_PACKAGE_HOST_PYTHON3,
host-python-setuptools will be installed for host-python3.

So, I believe the build breaks with your change.

Basically the current reasoning of the current Python packaging is:

 - The user selects the target version of Python, and from that we
   derive:

   * That we need to build the same Python version for the host

   * That all host Python modules should be built installed for that
     Python version

 - Optionally, packages may depend on the other host-python{,3} if they
   really need that specific Python version. However, we do not support
   installing third party Python modules for this secondary host Python
   version.

Best regards,

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

  reply	other threads:[~2018-01-02 20:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 16:33 [Buildroot] [PATCH 0/8] python: clean up host version logic Adam Duskett
2018-01-02 16:33 ` [Buildroot] [PATCH 1/8] python: add selectable host entry Adam Duskett
2018-01-02 16:33 ` [Buildroot] [PATCH 2/8] python3: " Adam Duskett
2018-01-02 16:33 ` [Buildroot] [PATCH 3/8] python-setuptools: check host-python version Adam Duskett
2018-01-02 20:44   ` Thomas Petazzoni [this message]
2018-01-02 22:13   ` Trent Piepho
2018-01-05 20:29     ` Thomas Petazzoni
2018-01-09  1:47       ` Trent Piepho
2018-01-09  7:59         ` Thomas Petazzoni
2018-01-02 16:33 ` [Buildroot] [PATCH 4/8] pkg-waf.mk: " Adam Duskett
2018-01-02 16:33 ` [Buildroot] [PATCH 5/8] ninja: " Adam Duskett
2018-01-02 16:33 ` [Buildroot] [PATCH 6/8] libselinux: " Adam Duskett
2018-01-02 16:33 ` [Buildroot] [PATCH 7/8] setools: " Adam Duskett
2018-01-02 16:33 ` [Buildroot] [PATCH 8/8] libselinux: " Adam Duskett
2018-01-02 20:40 ` [Buildroot] [PATCH 0/8] python: clean up host version logic Thomas Petazzoni
2018-01-02 21:40   ` Yann E. MORIN
2018-01-02 21:44     ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2018-01-02 15:27 Adam Duskett
2018-01-02 15:28 ` [Buildroot] [PATCH 3/8] python-setuptools: check host-python version Adam Duskett

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=20180102214441.771066aa@windsurf.lan \
    --to=thomas.petazzoni@free-electrons.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.