diff mbox

[v2,05/20] python3: add python -> python3 symlink for the host variant

Message ID 1392756013-27757-6-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Headers show

Commit Message

Thomas Petazzoni Feb. 18, 2014, 8:39 p.m. UTC
The target python3 depends on host-python3, but most of the scripts
call "python", so we need to ensure that $(HOST_DIR)/usr/bin/python
exists. This patch achieves this by creating a python -> python3
symbolic link in $(HOST_DIR), just like we are already doing for the
target Python 3.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/python3/python3.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Peter Korsgaard Feb. 18, 2014, 9:58 p.m. UTC | #1
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > The target python3 depends on host-python3, but most of the scripts
 > call "python", so we need to ensure that $(HOST_DIR)/usr/bin/python
 > exists. This patch achieves this by creating a python -> python3
 > symbolic link in $(HOST_DIR), just like we are already doing for the
 > target Python 3.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed to next, thanks.
diff mbox

Patch

diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index d49fe48..ba72e75 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -159,5 +159,11 @@  ifneq ($(BR2_PACKAGE_PYTHON),y)
 PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK
 endif
 
+define HOST_PYTHON3_INSTALL_SYMLINK
+	ln -fs python3 $(HOST_DIR)/usr/bin/python
+endef
+
+HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))