@@ -53,6 +53,12 @@ HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
PYTHON_INSTALL_STAGING = YES
+# The PYTHON variable could be used by external python package to
+# works with both python's version (python and python3)
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+ PYTHON = python
+endif
+
ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y)
PYTHON_DEPENDENCIES += readline
endif
@@ -55,6 +55,12 @@ HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib
PYTHON3_INSTALL_STAGING = YES
+# The PYTHON variable could be used by external python package to
+# works with both python's version (python and python3)
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
+ PYTHON = python3
+endif
+
ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
PYTHON3_DEPENDENCIES += readline
endif
Define a new variable called PYTHON that contains either "python" or "python3" depending of the selected Python version. This is needed to easily set dependencies and to call the right version of python for packages that support both version of python. Signed-off-by: Patrick Gerber <kpa_info@yahoo.fr> --- package/python/python.mk | 6 ++++++ package/python3/python3.mk | 6 ++++++ 2 files changed, 12 insertions(+)