From 985dcd4b28fe30b8de699a9d2bceb338d661105f Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 16 Dec 2016 09:07:41 +0200 Subject: [PATCH] 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 --- lang/python3/Makefile | 9 +++++++-- lang/python3/files/python3-package.mk | 6 +----- lang/python3/files/python3-version.mk | 13 +++++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 lang/python3/files/python3-version.mk 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) +