python,python3: Add PYTHON[3]_PKG_SETUP_GLOBAL_ARGS 8600/head
authorJeffery To <jeffery.to@gmail.com>
Fri, 5 Apr 2019 08:44:55 +0000 (16:44 +0800)
committerJeffery To <jeffery.to@gmail.com>
Fri, 5 Apr 2019 08:44:55 +0000 (16:44 +0800)
Some packages (PyYAML,
https://github.com/openwrt/packages/pull/8482#discussion_r270692276)
recognize "global" options to setup.py; these must appear before the
"install" command on the command line.

This adds PYTHON[3]_PKG_SETUP_GLOBAL_ARGS, which let packages set these
global options.

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

index e1196bbb82010b1e96099de84c9e553351cfd83e..c594f614ed34c240fe027f1da4e91eff2fe5d07c 100644 (file)
@@ -116,6 +116,7 @@ define Build/Compile/PyMod
 endef
 
 PYTHON_PKG_SETUP_DIR ?=
+PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
 PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON_PKG_SETUP_VARS ?=
 
@@ -125,6 +126,7 @@ define PyBuild/Compile/Default
        )
        $(call Build/Compile/PyMod, \
                $(PYTHON_PKG_SETUP_DIR), \
+               $(PYTHON_PKG_SETUP_GLOBAL_ARGS) \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
                $(PYTHON_PKG_SETUP_ARGS), \
                $(PYTHON_PKG_SETUP_VARS) \
index 40feef420c52df2ded5c08f0ecb7300d9e4b2ded..4a3dddd6439bb867d69d5340157e0ab2aeac5b5e 100644 (file)
@@ -115,6 +115,7 @@ define Build/Compile/Py3Mod
 endef
 
 PYTHON3_PKG_SETUP_DIR ?=
+PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
 PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON3_PKG_SETUP_VARS ?=
 
@@ -124,6 +125,7 @@ define Py3Build/Compile/Default
        )
        $(call Build/Compile/Py3Mod, \
                $(PYTHON3_PKG_SETUP_DIR), \
+               $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
                $(PYTHON3_PKG_SETUP_ARGS), \
                $(PYTHON3_PKG_SETUP_VARS) \