All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/2] dependencies: build a host python2 if no suitable one cane be found
Date: Sun, 15 Jul 2012 13:50:17 +0200	[thread overview]
Message-ID: <5002AE79.5020206@mind.be> (raw)
In-Reply-To: <1338674897-1810-1-git-send-email-s.martin49@gmail.com>

On 06/03/12 00:08, Samuel Martin wrote:
> Some distros choose to change the /usr/bin/python binary, make it pointed to
> python3 instead of python2.
>
> This may have some bad consequences for packages that uses some
> non-python3-compliant python scripts in their build system (eg. in install or
> post-install scripts).
>
> This patch checks for a suitable python2 version (2.6 or 2.7) on the host
> system, and declares the following variables:
> - PYTHON2: pointing to the host python2 binary;
> - NEED_PYTHON2: sets to "host-python" if no python2 binary has been found.
>
> This way, a package using some python2 scripts must:
> - adds $(NEED_PYTHON2) to its dependency list;
> - sets $(PYTHON2) as the python binary to be used.
>
> A side effect of this patch is getting rid of any host python. Buildroot can
> runs on a host without python, or with a too old python2 version, or with only
> python3.
>
> Changes since v2:
> - misc. fixes and cleanup
>
> Changes since v1:
> - use support/dependency infrastructure
> - rename some symbols

  The patch changelog should go under the Signed-off-by line, separated with
---

>
> Signed-off-by: Samuel Martin<s.martin49@gmail.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


>
>   create mode 100644 support/dependencies/check-host-python2.mk
>   create mode 100755 support/dependencies/check-host-python2.sh
>
> diff --git a/support/dependencies/check-host-python2.mk b/support/dependencies/check-host-python2.mk
> new file mode 100644
> index 0000000..3b66ffc
> --- /dev/null
> +++ b/support/dependencies/check-host-python2.mk
> @@ -0,0 +1,6 @@
> +PYTHON2 = $(call suitable-host-package,python2)
> +
> +ifeq (,$(PYTHON2))

  Minor nit: we always write ifeq ($(PYTHON2),)


  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

      parent reply	other threads:[~2012-07-15 11:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-02 22:08 [Buildroot] [PATCH v3 1/2] dependencies: build a host python2 if no suitable one cane be found Samuel Martin
2012-06-02 22:08 ` [Buildroot] [PATCH v3 2/2] libglib2: fix install even if the host python binary refers to python3 Samuel Martin
2012-06-28 20:59   ` Samuel Martin
2012-07-15 11:50   ` Arnout Vandecappelle
2012-07-17  8:22   ` Thomas Petazzoni
2012-07-17  8:34     ` Samuel Martin
2012-08-18 12:06       ` Samuel Martin
2012-08-20 18:56         ` Thomas Petazzoni
2012-08-20 20:23           ` Samuel Martin
2012-06-28 20:58 ` [Buildroot] [PATCH v3 1/2] dependencies: build a host python2 if no suitable one cane be found Samuel Martin
2012-07-15 11:50 ` Arnout Vandecappelle [this message]

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=5002AE79.5020206@mind.be \
    --to=arnout@mind.be \
    --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.