diff mbox series

[v5,2/2] package/pkg-python.mk: remove hardcoded paths for host Python

Message ID 20220406222904.421610-2-james.hilliard1@gmail.com
State Superseded
Headers show
Series [v5,1/2] package/pkg-python: migrate flit to new bootstrapping sequence | expand

Commit Message

James Hilliard April 6, 2022, 10:29 p.m. UTC
From: Роман Донченко <dpb@corrigendum.ru>

When installer is used to install packages for host Python, it can figure
out by itself which paths to use. We just need to use the installer CLI
instead of our wrapper script.

Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v4 -> v5:
  - add rebased remove hardcoded paths patch
---
 package/pkg-python.mk | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 2e7704a0a9..154810e1cc 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -146,14 +146,6 @@  HOST_PKG_PYTHON_PEP517_ENV = \
 	PYTHONNOUSERSITE=1 \
 	$(HOST_CONFIGURE_OPTS)
 
-HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
-	--interpreter=/bin/python \
-	--script-kind=posix \
-	--purelib=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
-	--headers=$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR) \
-	--scripts=$(HOST_DIR)/bin \
-	--data=$(HOST_DIR)
-
 HOST_PKG_PYTHON_PEP517_BOOTSTRAP_INSTALL_OPTS = \
 	--installdir=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
 
@@ -225,11 +217,11 @@  ifeq ($(1),host-python-flit-core)
 #
 $(2)_BASE_INSTALL_CMD = -m bootstrap_install dist/* $$(HOST_PKG_PYTHON_PEP517_BOOTSTRAP_INSTALL_OPTS)
 else
-$(2)_BASE_INSTALL_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
+$(2)_BASE_INSTALL_CMD = -m installer dist/*
 endif
 else
 $(2)_BASE_BUILD_CMD = -m build -n -w
-$(2)_BASE_INSTALL_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
+$(2)_BASE_INSTALL_CMD = -m installer dist/*
 endif
 endif
 else