python,python3: add vars to customize setup arguments / variables 5457/head
authorJeffery To <jeffery.to@gmail.com>
Mon, 15 Jan 2018 20:10:49 +0000 (04:10 +0800)
committerJeffery To <jeffery.to@gmail.com>
Mon, 15 Jan 2018 20:10:49 +0000 (04:10 +0800)
This adds:

* PYTHON_PKG_SETUP_ARGS
* PYTHON_PKG_SETUP_VARS
* PYTHON3_PKG_SETUP_ARGS
* PYTHON3_PKG_SETUP_VARS

to customize Python package setup arguments / environment variables.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/python-package.mk
lang/python/python3-package.mk

index 8bfd5e37f0259715fc6a70cfee05bbcb149a23f1..cf47115215b1e23fd5cb7267a84a79c6877210d0 100644 (file)
@@ -116,13 +116,17 @@ define Build/Compile/PyMod
        find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
 endef
 
+PYTHON_PKG_SETUP_ARGS:=--single-version-externally-managed
+PYTHON_PKG_SETUP_VARS:=
+
 define PyBuild/Compile/Default
        $(foreach pkg,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
                $(call host_python_pip_install_host,$(pkg))
        )
        $(call Build/Compile/PyMod,, \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
-               --single-version-externally-managed \
+               $(PYTHON_PKG_SETUP_ARGS), \
+               $(PYTHON_PKG_SETUP_VARS) \
        )
 endef
 
index c5bfd71de39daa1d33b9c837d3522213c8cd12ff..73c5da308575fc2b02b141c51394b650e8330010 100644 (file)
@@ -115,13 +115,17 @@ define Build/Compile/Py3Mod
        find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
 endef
 
+PYTHON3_PKG_SETUP_ARGS:=--single-version-externally-managed
+PYTHON3_PKG_SETUP_VARS:=
+
 define Py3Build/Compile/Default
        $(foreach pkg,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS),
                $(call host_python3_pip_install_host,$(pkg))
        )
        $(call Build/Compile/Py3Mod,, \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
-               --single-version-externally-managed \
+               $(PYTHON3_PKG_SETUP_ARGS), \
+               $(PYTHON3_PKG_SETUP_VARS) \
        )
 endef