Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] python: fix host-python symlink installation when no python is selected
Date: Sun, 6 Apr 2014 11:30:00 +0300	[thread overview]
Message-ID: <20140406083000.GD4096@tarshish> (raw)
In-Reply-To: <1396769715-28635-1-git-send-email-s.martin49@gmail.com>

Hi Samuel,

On Sun, Apr 06, 2014 at 09:35:15AM +0200, Samuel Martin wrote:
> When no python interpreter is selected, all host-python symlink
> installation were disabled.
> This could lead to a non-existing $(HOST_DIR)/usr/bin/python program.
> 
> Fixes:
>   http://autobuild.buildroot.net/results/6e7/6e74a343b4e8e113fd34d45c9279419e233afe8a/

I'm working on a similar problem 
(http://autobuild.buildroot.net/results/dd0/dd04833b11a0ebb0193c861cb375b2112dd339d1/). 
The following configure log shows the problem:

checking for a Python interpreter with version >= 2.6... python
checking for python... /usr/bin/python
checking for python version... 2.6

The host packaged python (2.6) is detected instead of the buildroot built one 
(2.7), because the python symlink is missing. In this case 
BR2_PACKAGE_PYTHON3=y so even with this patch the problem is not fixed. Your 
commit e1584b7d3350 (python: rework python symlinks installation) originally 
limited host python symlink creation, but I could not understand the reason 
for this from the commit log.

baruch

> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  package/python/python.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/package/python/python.mk b/package/python/python.mk
> index feff644..8a2ba65 100644
> --- a/package/python/python.mk
> +++ b/package/python/python.mk
> @@ -192,9 +192,9 @@ PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_INSTALL_STAGING_PYTHON_CONFIG_SYMLIN
>  PYTHON_AUTORECONF = YES
>  
>  # Some packages may have build scripts requiring python2.
> -# Only install the python symlink in the host tree if python2 is enabled
> -# for the target.
> -ifeq ($(BR2_PACKAGE_PYTHON),y)
> +# Only install the python symlink in the host tree if python3 is not enabled
> +# for the target, otherwise the default python program may be missing.
> +ifneq ($(BR2_PACKAGE_PYTHON3),y)
>  define HOST_PYTHON_INSTALL_PYTHON_SYMLINK
>  	ln -sf python2 $(HOST_DIR)/usr/bin/python
>  	ln -sf python2-config $(HOST_DIR)/usr/bin/python-config
> -- 
> 1.9.1

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2014-04-06  8:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-06  7:35 [Buildroot] [PATCH] python: fix host-python symlink installation when no python is selected Samuel Martin
2014-04-06  8:30 ` Baruch Siach [this message]
2014-04-06 10:48   ` Samuel Martin
2014-04-06 11:03     ` Thomas Petazzoni
2014-04-06 11:35       ` Samuel Martin
2014-04-06  9:55 ` 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=20140406083000.GD4096@tarshish \
    --to=baruch@tkos.co.il \
    --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