Patchwork [3/3] python-serial: fix shebang

login
register
mail settings
Submitter Gustavo Zacarias
Date April 13, 2013, 4:56 p.m.
Message ID <1365872210-20167-3-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/236370/
State Accepted
Commit 2f40b6ae2b27486af2deb999385e3d7f034e4bd5
Headers show

Comments

Gustavo Zacarias - April 13, 2013, 4:56 p.m.
Add the --executable shebang fixup option to the build phase so that the
script ends with a proper #!/usr/bin/python interpeter line set.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/python-serial/python-serial.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Peter Korsgaard - May 6, 2013, 7:35 a.m.
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Add the --executable shebang fixup option to the build phase
 Gustavo> so that the script ends with a proper #!/usr/bin/python
 Gustavo> interpeter line set.

Committed, thanks.

I see we have the same issue with usr/bin/smtpd.py from python itself,
but I'm not sure how to fix that (besides running sed after
installation).

Any idea?
Gustavo Zacarias - May 6, 2013, 11:08 a.m.
On 05/06/2013 04:35 AM, Peter Korsgaard wrote:

> I see we have the same issue with usr/bin/smtpd.py from python itself,
> but I'm not sure how to fix that (besides running sed after
> installation).
> 
> Any idea?

Some (all?) distributions just remove it, it's a smtp proxy, kind of a
sample program, not something we want lingering on the target filesystem
IMHO.
Regards.
Peter Korsgaard - May 6, 2013, 11:27 a.m.
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> On 05/06/2013 04:35 AM, Peter Korsgaard wrote:
 >> I see we have the same issue with usr/bin/smtpd.py from python itself,
 >> but I'm not sure how to fix that (besides running sed after
 >> installation).
 >> 
 >> Any idea?

 Gustavo> Some (all?) distributions just remove it, it's a smtp proxy,
 Gustavo> kind of a sample program, not something we want lingering on
 Gustavo> the target filesystem

Ok, thanks. Care to send a patch doing that?

Patch

diff --git a/package/python-serial/python-serial.mk b/package/python-serial/python-serial.mk
index fb6b31c..4bfc355 100644
--- a/package/python-serial/python-serial.mk
+++ b/package/python-serial/python-serial.mk
@@ -6,12 +6,12 @@ 
 
 PYTHON_SERIAL_VERSION = 2.6
 PYTHON_SERIAL_SOURCE  = pyserial-$(PYTHON_SERIAL_VERSION).tar.gz
-PYTHON_SERIAL_SITE    = http://pypi.python.org/packages/source/p/pyserial/
+PYTHON_SERIAL_SITE    = http://pypi.python.org/packages/source/p/pyserial
 
 PYTHON_SERIAL_DEPENDENCIES = python
 
 define PYTHON_SERIAL_BUILD_CMDS
-	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python)
 endef
 
 define PYTHON_SERIAL_INSTALL_TARGET_CMDS