From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/5] package/pkg-python: rely on python wrapper in HOST_BIN_CROSS
Date: Tue, 4 Feb 2020 15:24:55 +0100 [thread overview]
Message-ID: <20200204142456.1537358-5-arnout@mind.be> (raw)
In-Reply-To: <20200204142456.1537358-1-arnout@mind.be>
Since we now have a python wrapper in HOST_BIN_CROSS, we no longer need
to set all these environment variables from the python-package
infrastructure.
Add HOST_BIN_CROSS to the PATH for target packages, and remove all
environment variables which are already set by the wrapper. Use this
python as the python that is used to run setup.py.
PKG_PYTHON_SYSCONFIGDATA_NAME is no longer used so it can be removed.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
package/pkg-python.mk | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 4ded4fde83..93f24856bf 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -20,21 +20,11 @@
#
################################################################################
-define PKG_PYTHON_SYSCONFIGDATA_NAME
-$(basename $(notdir $(wildcard $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/_sysconfigdata__linux_*.py)))
-endef
-
# Target distutils-based packages
PKG_PYTHON_DISTUTILS_ENV = \
- PATH=$(BR_PATH) \
+ PATH=$(HOST_BIN_CROSS):$(BR_PATH) \
$(TARGET_CONFIGURE_OPTS) \
LDSHARED="$(TARGET_CROSS)gcc -shared" \
- PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
- PYTHONNOUSERSITE=1 \
- _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \
- _python_sysroot=$(STAGING_DIR) \
- _python_prefix=/usr \
- _python_exec_prefix=/usr
PKG_PYTHON_DISTUTILS_BUILD_OPTS = \
--executable=/usr/bin/python
@@ -58,14 +48,8 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \
# Target setuptools-based packages
PKG_PYTHON_SETUPTOOLS_ENV = \
- _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \
- PATH=$(BR_PATH) \
+ PATH=$(HOST_BIN_CROSS):$(BR_PATH) \
$(TARGET_CONFIGURE_OPTS) \
- PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
- PYTHONNOUSERSITE=1 \
- _python_sysroot=$(STAGING_DIR) \
- _python_prefix=/usr \
- _python_exec_prefix=/usr
PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS = \
--prefix=/usr \
@@ -225,7 +209,7 @@ endif # SETUP_TYPE
# - otherwise, we use the one requested by *_NEEDS_HOST_PYTHON.
#
ifeq ($(4),target)
-$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python
+$(2)_PYTHON_INTERPRETER = $$(HOST_BIN_CROSS)/python
else
ifeq ($$($(2)_NEEDS_HOST_PYTHON),)
$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python
--
2.24.1
next prev parent reply other threads:[~2020-02-04 14:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 14:24 [Buildroot] [PATCH 0/5] [RFC] Introduce cross-bin directory Arnout Vandecappelle
2020-02-04 14:24 ` [Buildroot] [PATCH 1/5] package/Makefile.in: add HOST_BIN_CROSS Arnout Vandecappelle
2020-02-04 14:24 ` [Buildroot] [PATCH 2/5] package/python3: install wrapper in HOST_BIN_CROSS Arnout Vandecappelle
2020-02-04 14:24 ` [Buildroot] [PATCH 3/5] package/python: " Arnout Vandecappelle
2020-02-04 14:24 ` Arnout Vandecappelle [this message]
2020-02-04 14:24 ` [Buildroot] [PATCH 5/5] package/pkg-meson: use TARGET_MAKE_ENV in configure Arnout Vandecappelle
2020-02-04 15:15 ` [Buildroot] [PATCH 0/5] [RFC] Introduce cross-bin directory Arnout Vandecappelle
2021-05-26 18:45 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200204142456.1537358-5-arnout@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.