python: fix host-python symlink installation when no python is selected
authorSamuel Martin <s.martin49@gmail.com>
Sun, 6 Apr 2014 07:35:15 +0000 (09:35 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 6 Apr 2014 09:55:26 +0000 (11:55 +0200)
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/

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/python/python.mk

index feff64411e6b9a8dd2397ab1adff21d8a0fd9411..8a2ba651607851721a3ecf7de66a7f2c0e1b050d 100644 (file)
@@ -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