Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: aduskett at gmail.com <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] dependencies.sh: Check for a host python version >= 2.7
Date: Sat, 15 Dec 2018 15:29:37 -0500	[thread overview]
Message-ID: <20181215202937.81372-1-aduskett@gmail.com> (raw)

From: Adam Duskett <Aduskett@gmail.com>

Older distributions such as CentOS6 come with python2.6, which causes build
failures in packages such as host-libglib2 because they require python2.7 or
above.

CentOS6 does have the centos-release-scl which allows users to install
python2.7, making this transition reasonably easy.

Debian 6 and 7 have reached EOL, and Debian 8 comes with Python 2.7, so
this patch should be relatively low impact.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 support/dependencies/dependencies.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 58c34d880f..d0b6bdc23a 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -181,6 +181,14 @@ if test "${missing_progs}" = "yes" ; then
 	exit 1
 fi
 
+# Check that the python version is at least 2.7
+PYTHON_VERSION=$(python -V 2>&1 |awk '{print $2}')
+if [ $(echo $PYTHON_VERSION |sed -e 's/\.//g') -lt 2700 ]; then
+	echo
+	echo "You have python '$PYTHON_VERSION' installed.  Python >= 2.7 is required"
+	exit 1;
+fi
+
 if grep ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG > /dev/null; then
 	if ! which locale > /dev/null ; then
 		echo
-- 
2.19.2

             reply	other threads:[~2018-12-15 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15 20:29 aduskett at gmail.com [this message]
2018-12-15 20:42 ` [Buildroot] [PATCH 1/1] dependencies.sh: Check for a host python version >= 2.7 Baruch Siach
2018-12-15 20:47   ` Adam Duskett
2018-12-16 15:02     ` Thomas Petazzoni

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=20181215202937.81372-1-aduskett@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox