python,python3: Add PYTHON_PKG_SETUP_DIR

This adds a variable (PYTHON_PKG_SETUP_DIR / PYTHON3_PKG_SETUP_DIR) that
allows a Python package Makefile to control the directory where setup.py
is called (as part of PyBuild/Compile/Default /
Py3Build/Compile/Default).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To
2019-02-21 19:52:07 +08:00
parent cd3291d014
commit 5d72e9bf7e
2 changed files with 6 additions and 2 deletions

View File

@@ -114,6 +114,7 @@ define Build/Compile/PyMod
$(3))
endef
PYTHON_PKG_SETUP_DIR ?=
PYTHON_PKG_SETUP_ARGS:=--single-version-externally-managed
PYTHON_PKG_SETUP_VARS:=
@@ -121,7 +122,8 @@ define PyBuild/Compile/Default
$(foreach pkg,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
$(call host_python_pip_install_host,$(pkg))
)
$(call Build/Compile/PyMod,, \
$(call Build/Compile/PyMod, \
$(PYTHON_PKG_SETUP_DIR), \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
$(PYTHON_PKG_SETUP_ARGS), \
$(PYTHON_PKG_SETUP_VARS) \