python,python3: define PyBuild/Compile & Py3Build/Compile
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Tue, 4 Jul 2017 17:58:37 +0000 (20:58 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 7 Jul 2017 15:07:10 +0000 (18:07 +0300)
Similar to LEDE/OpenWrt's Build/Compile/Default rule,
and other similarities like this.

This should allow Python packages to define
PyBuild/Compile rules to do specific stuff per
package.

The advantage of using these (over just overriding
Build/Compile) is the VARIANT mechanism that is
in place to support packaging both for Python & Python3.

So, PyBuild/Compile will get picked up for the Python
variant build, and Py3Build/Compile will get picked
up for the Python3 variant build.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python/files/python-package.mk
lang/python/python3/files/python3-package.mk

index 0805fc9c2c70b13758b140e36b2993cf6a7c6c81..1b82352c1fb4d1c47487ec510c104677f951164e 100644 (file)
@@ -132,8 +132,10 @@ define PyBuild/Compile/Default
        )
 endef
 
+PyBuild/Compile=$(PyBuild/Compile/Default)
+
 ifeq ($(BUILD_VARIANT),python)
 define Build/Compile
-       $(call PyBuild/Compile/Default)
+       $(call PyBuild/Compile)
 endef
 endif # python
index 36a030c02b02e30504b0e62ba7f69758a2d82b23..22ee527a1c126757e0cdd731ae64345ff9c82477 100644 (file)
@@ -132,8 +132,10 @@ define Py3Build/Compile/Default
        )
 endef
 
+Py3Build/Compile=$(Py3Build/Compile/Default)
+
 ifeq ($(BUILD_VARIANT),python3)
 define Build/Compile
-       $(call Py3Build/Compile/Default)
+       $(call Py3Build/Compile)
 endef
 endif # python3