python: move PYTHON_VERSION in own .mk file
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 7 Nov 2016 07:31:18 +0000 (09:31 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 7 Nov 2016 08:55:31 +0000 (10:55 +0200)
Allows for more granularity with respect to python-host.mk
and python-package.mk inclusions.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/Makefile
lang/python/files/python-host.mk
lang/python/files/python-package.mk
lang/python/files/python-version.mk [new file with mode: 0644]

index 336c3b0a680b2914034024fe72640dbac2469920..687481faba918826c57f9ff96e0da205fcec3453 100644 (file)
@@ -7,10 +7,13 @@
 
 include $(TOPDIR)/rules.mk
 
+# For PYTHON_VERSION
+include ./files/python-version.mk
+
 # This file provides the necsessary host build variables
 include ./files/python-host.mk
 
-# The file included below defines PYTHON_VERSION
+# For PyPackage
 include ./files/python-package.mk
 
 PKG_NAME:=python
@@ -142,6 +145,7 @@ define Build/InstallDev
        $(INSTALL_DATA) \
                ./files/python-package.mk \
                ./files/python-host.mk \
+               ./files/python-version.mk \
                $(STAGING_DIR)/mk/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
index da24f3dc17f1bba2df2dc625e93878a4f4f65285..21f238fe0b472391da7a71bd5f40a94d62c81e52 100644 (file)
@@ -8,6 +8,9 @@
 ifneq ($(__python_host_mk_inc),1)
 __python_host_mk_inc=1
 
+# For PYTHON_VERSION
+$(call include_mk, python-version.mk)
+
 # Compatibility fallback for older OpenWrt and LEDE versions
 ifeq ($(STAGING_DIR_HOSTPKG),)
   $(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host)
index 52b6cf37e0c97ecfb0fc6b8360c3e7b73ecf9379..2a2e371c31e7fbeaf06ede36b9ea27cec96baae9 100644 (file)
@@ -5,8 +5,7 @@
 # See /LICENSE for more information.
 #
 
-PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=12
+$(call include_mk, python-version.mk)
 
 PYTHON_DIR:=$(STAGING_DIR)/usr
 PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
diff --git a/lang/python/files/python-version.mk b/lang/python/files/python-version.mk
new file mode 100644 (file)
index 0000000..6905c3d
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+PYTHON_VERSION:=2.7
+PYTHON_VERSION_MICRO:=12
+