Patchwork [1/2] python3-distribute: fix interpreter

login
register
mail settings
Submitter Robert Yang
Date Aug. 15, 2014, 8:49 a.m.
Message ID <27d6a067f84e300af1e31238f07667e46556bc72.1408092524.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/78339/
State Accepted
Commit a9c628d0337a8b47e26e5314a8dea0409abcf2df
Headers show

Comments

Robert Yang - Aug. 15, 2014, 8:49 a.m.
It should use "/usr/bin/env python3" rather than python, otherwise it
would cause python2 to be installed when we install python3-distribute.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 .../python/python3-distribute_0.6.32.bb            |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
index 573096c..0ef3a87 100644
--- a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
@@ -37,6 +37,8 @@  do_install_append() {
     rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
     mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
     echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+    sed -i -e '1s|^#!.*python|#!/usr/bin/env python3|' \
+        ${D}${PYTHON_SITEPACKAGES_DIR}/distribute-${PV}-py${PYTHON_BASEVERSION}.egg/setuptools/tests/test_resources.py
 }
 
 RDEPENDS_${PN} = "\