aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2016-12-16 09:07:41 +0200
committerAlexandru Ardelean <ardeleanalex@gmail.com>2016-12-16 09:07:44 +0200
commit985dcd4b28fe30b8de699a9d2bceb338d661105f (patch)
treec93f7b7f51eabd544b6403ad20b978514fe999a1 /lang
parent73231f6d21ff181143ae207fc6dd6ea6ba4c60d5 (diff)
python3: split `python3-version.mk` from `python3-package.mk`
And move \`python3-package.mk\` include, same as in python package. This is mostly to have consistency/similarity between python & python3 packages. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'lang')
3 files changed, 21 insertions, 7 deletions
diff --git a/lang/python3/Makefile b/lang/python3/Makefile
index 2e0f872a0..6394211e2 100644
--- a/lang/python3/Makefile
+++ b/lang/python3/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
# The file included below defines PYTHON_VERSION
-include ./files/python3-package.mk
+include ./files/python3-version.mk
PYTHON_VERSION:=$(PYTHON3_VERSION)
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
@@ -24,6 +24,8 @@ PKG_MD5SUM:=8906efbacfcdc7c3c9198aeefafd159e
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
+include ./files/python3-package.mk
+
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
HOST_BUILD_PARALLEL:=1
@@ -141,7 +143,10 @@ define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/mk/
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
- $(INSTALL_DATA) ./files/python3-package.mk $(STAGING_DIR)/mk/
+ $(INSTALL_DATA) \
+ ./files/python3-package.mk \
+ ./files/python3-version.mk \
+ $(STAGING_DIR)/mk/
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
diff --git a/lang/python3/files/python3-package.mk b/lang/python3/files/python3-package.mk
index 60feaf195..56dbedc9c 100644
--- a/lang/python3/files/python3-package.mk
+++ b/lang/python3/files/python3-package.mk
@@ -11,11 +11,7 @@ ifeq ($(STAGING_DIR_HOSTPKG),)
STAGING_DIR_HOSTPKG := $(STAGING_DIR)/host
endif
-PYTHON3_VERSION_MAJOR:=3
-PYTHON3_VERSION_MINOR:=5
-PYTHON3_VERSION_MICRO:=2
-
-PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
+$(call include_mk, python3-version.mk)
PYTHON3_DIR:=$(STAGING_DIR)/usr
PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin
diff --git a/lang/python3/files/python3-version.mk b/lang/python3/files/python3-version.mk
new file mode 100644
index 000000000..ce3b6b70b
--- /dev/null
+++ b/lang/python3/files/python3-version.mk
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+PYTHON3_VERSION_MAJOR:=3
+PYTHON3_VERSION_MINOR:=5
+PYTHON3_VERSION_MICRO:=2
+
+PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
+