[Buildroot] [PATCH v3 3/5] Add common declaration to ease the support of both version

Patrick Gerber kpa_info at yahoo.fr
Wed Feb 13 09:20:35 UTC 2013


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 at yahoo.fr>
---
 package/python-common/python-common.mk |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 package/python-common/python-common.mk

diff --git a/package/python-common/python-common.mk b/package/python-common/python-common.mk
new file mode 100644
index 0000000..712b895
--- /dev/null
+++ b/package/python-common/python-common.mk
@@ -0,0 +1,16 @@
+#############################################################
+#
+# python-common
+#
+#############################################################
+# Define some symbol usefull to make python package that works 
+# with python2 and python3. 
+
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+	PYTHON = python
+endif
+
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
+	PYTHON = python3
+endif
+
-- 
1.7.9.5




More information about the buildroot mailing list