From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/2] dependencies: build a host python2 if no suitable one can be found
Date: Tue, 15 May 2012 23:43:33 +0200 [thread overview]
Message-ID: <4FB2CE05.9030208@mind.be> (raw)
In-Reply-To: <1336905822-10021-1-git-send-email-s.martin49@gmail.com>
On 05/13/12 12:43, Samuel Martin wrote:
> diff --git a/support/dependencies/check-host-python2.mk b/support/dependencies/check-host-python2.mk
> new file mode 100644
> index 0000000..79197cb
> --- /dev/null
> +++ b/support/dependencies/check-host-python2.mk
> @@ -0,0 +1,7 @@
> +PYTHON2 := $(call suitable-host-package,python2)
> +NEED_PYTHON2 :=
This can be removed, empty is the default.
> +
> +ifeq (,$(PYTHON2))
> + NEED_PYTHON2 = host-python
> + PYTHON2 = $(HOST_DIR)/usr/bin/python
> +endif
Does this work? I thought it wasn't allowed to mix := and = assignments.
> diff --git a/support/dependencies/check-host-python2.sh b/support/dependencies/check-host-python2.sh
> new file mode 100755
> index 0000000..6adb328
> --- /dev/null
> +++ b/support/dependencies/check-host-python2.sh
> @@ -0,0 +1,13 @@
> +#!/bin/sh
> +
> +candidates="python python2"
> +
> +for candidate in ${candidates} ; do
> + which ${candidate}&>/dev/null || continue
> + # restrict version of python2 to 2.6 or 2.7
> + if ${candidate} --version 2>&1 | grep -qE 'Python 2\.[6-7]*' ; then
The * is a mistake, I think. This way, 2.5 also matches (zero repetitions).
The -E is also a redundant since you're not using extended regexp.
Regards,
Arnout
> + # found a valid candidate, so quit now
> + echo $(which ${candidate})
> + exit
> + fi
> +done
--
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
next prev parent reply other threads:[~2012-05-15 21:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 20:45 [Buildroot] [PATCH 0/2] Ensure host python is python2 Samuel Martin
2012-05-08 20:45 ` [Buildroot] [PATCH 1/2] Makefile.in: add host python2 binary detection Samuel Martin
2012-05-11 22:15 ` Arnout Vandecappelle
2012-05-11 22:50 ` Samuel Martin
2012-05-13 10:43 ` [Buildroot] [PATCH v2 1/2] dependencies: build a host python2 if no suitable one can be found Samuel Martin
2012-05-13 10:43 ` [Buildroot] [PATCH v2 2/2] libglib2: fix install even if the host python binary refers to python3 Samuel Martin
2012-05-15 21:43 ` Arnout Vandecappelle [this message]
2012-05-15 22:01 ` [Buildroot] [PATCH v2 1/2] dependencies: build a host python2 if no suitable one can be found Samuel Martin
2012-05-08 20:45 ` [Buildroot] [PATCH 2/2] libglib2: fix install even if the host python binary refers to python3 Samuel Martin
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=4FB2CE05.9030208@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.