All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Liu <net147@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] python: fix interpreter directive for python scripts
Date: Sun, 12 Aug 2012 16:57:34 +1000	[thread overview]
Message-ID: <502753DE.3040201@gmail.com> (raw)
In-Reply-To: <20120811230555.46b2f565@skate>

On 12/08/2012 7:05 AM, Thomas Petazzoni wrote:
> Le Sat, 11 Aug 2012 16:10:27 +1000,
> Jonathan Liu<net147@gmail.com>  a ?crit :
>
>> +# Fix Python interpreter directive
>> +define PYTHON_FIX_INTERPRETER
>> +        sed -i '1s|#!.*python.*|#!/usr/bin/env python|' $(TARGET_DIR)/usr/bin/{easy_install,easy_install-2.7,idle,smtpd.py}
>> +endef
>> +
>> +PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_FIX_INTERPRETER
> I agree the paths in those scripts is incorrect, *but*:
>
>   * Should these scripts have been installed in the first place? I don't
>     think there are useful for the typical usage of the Python
>     interpreter, so maybe we want to get rid of them.
Perhaps we could add a config option later on to not install idle and 
smtpd.py.
>
>   * Instead of fixing this patch manually in every Python script
>     installed, can we investigate on how to fix the root of the problem?
>     I'm the one who has reworked the patches that get Python to
>     cross-compile, and I know this stuff is really painful, but I think
>     it's worth at least trying to understand a bit if there could be a
>     way of handling things. From what I remember the problem is that the
>     host-python uses its host sysconfig parameters even when building
>     things for the target, simply because the whole Python things has
>     absolutely zero understanding of the fact that we could be using
>     Python on one machine to build stuff that will run on a different
>     machine.
easy_install and easy_install-2.7 shouldn't be in there apparently. It's 
part of setuptools package.
I've submitted a V2 patch so it only fixes idle and smtpd.py in python 
package. The V2 patch is independant of this setuptools interpreter 
directive issue.

I will see if I can look into fixing the interpreter for the setuptools 
package.

Regards,
Jonathan

  reply	other threads:[~2012-08-12  6:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-11  6:10 [Buildroot] [PATCH] python: fix interpreter directive for python scripts Jonathan Liu
2012-08-11 21:05 ` Thomas Petazzoni
2012-08-12  6:57   ` Jonathan Liu [this message]
2012-08-12 12:04   ` Jonathan Liu
2012-08-12 13:19     ` Avishay Orpaz
2012-08-12 14:50       ` Yann E. MORIN
2012-08-12 15:27         ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2012-08-11  5:43 Jonathan Liu
2012-08-22  7:17 ` Maxime Ripard

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=502753DE.3040201@gmail.com \
    --to=net147@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 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.