浏览代码

package/python-flit-core: instantiate _INSTALL_CMDS

host-python-flit-core is the only package that overrides
_BASE_INSTALL_CMD. Since we're going to remove that variable in a
follow-up patch, we no longer will be able to do that.

Since host-python-flit-core is really a special case, it makes sense to
define HOST_PYTHON_FLIT_CORE_INSTALL_CMDS in its entirety.

While we're at it, also instantiate
HOST_PKG_PYTHON_PEP517_BOOTSTRAP_INSTALL_OPTS directly there. This
variable is not used anywhere else, and it's a bit confusing to have it
in pkg-python.mk - it looks like a mistake.

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Arnout Vandecappelle 1 年之前
父节点
当前提交
906a9fb989
共有 2 个文件被更改,包括 7 次插入5 次删除
  1. 0 3
      package/pkg-python.mk
  2. 7 2
      package/python-flit-core/python-flit-core.mk

+ 0 - 3
package/pkg-python.mk

@@ -177,9 +177,6 @@ HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
 	--scripts=$(HOST_DIR)/bin \
 	--data=$(HOST_DIR)
 
-HOST_PKG_PYTHON_PEP517_BOOTSTRAP_INSTALL_OPTS = \
-	--installdir=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
-
 # Target flit packages
 PKG_PYTHON_FLIT_ENV = \
 	$(PKG_PYTHON_PEP517_ENV)

+ 7 - 2
package/python-flit-core/python-flit-core.mk

@@ -13,7 +13,12 @@ PYTHON_FLIT_CORE_SETUP_TYPE = flit-bootstrap
 
 # Use flit built in bootstrap_install for installing host-python-flit-core.
 # This is due to host-python-installer depending on host-python-flit-core.
-#
-HOST_PYTHON_FLIT_CORE_BASE_INSTALL_CMD = -m bootstrap_install dist/* $(HOST_PKG_PYTHON_PEP517_BOOTSTRAP_INSTALL_OPTS)
+define HOST_PYTHON_FLIT_CORE_INSTALL_CMDS
+	cd $($(PKG)_BUILDDIR)/; \
+		$(HOST_PKG_PYTHON_FLIT_BOOTSTRAP_ENV) \
+		$(HOST_DIR)/bin/python3 \
+		-m bootstrap_install dist/* \
+		--installdir=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
+endef
 
 $(eval $(host-python-package))