From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] python3: remove target Python packages from PYTHONPATH
Date: Mon, 21 Aug 2017 23:25:35 +0200 [thread overview]
Message-ID: <20170821232535.6ed70c51@windsurf> (raw)
In-Reply-To: <20170819211150.32340-1-thomas.petazzoni@free-electrons.com>
Hello,
On Sat, 19 Aug 2017 23:11:50 +0200, Thomas Petazzoni wrote:
> This commit is similar to 350941e31de5b454cad75abe5fb0d3db027bc1a7
> ("python: remove target Python packages from PYTHONPATH") but for
> python3.
>
> We currently have
> $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
> inside the PYTHON3_PATH variable, which gets used to define
> PYTHONPATH, passed to the host Python interpreter when
> building/installing target packages.
>
> However, this is terribly wrong, as it causes the host interpreter to
> potentially import target Python packages. This is wrong for several
> reasons:
>
> - Some Python packages might need some Python modules to be installed
> on the host (described in setup_requires in setup.py), but their
> installation currently works because by luck the corresponding
> Python module is installed for the target. Some of those cases were
> happening for real, and fixed by previous patches.
>
> - Some Python packages include some native code, therefore built for
> a specific CPU architecture. When you point the host Python
> interpreter to native libraries built for the target, you get nice
> build failures, such as the one affecting the python-cffi related
> packages.
>
> This change fixes the following build failures:
>
> http://autobuild.buildroot.net/results/9005b89407e46b537a54cac6cc0c69dcac4dc5ea/
> (python-cryptography)
>
> http://autobuild.buildroot.net/results/395682d33d02fdcaa39d3c0326355bd9ea3d6feb/
> (python-pynacl)
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/python3/python3.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2017-08-21 21:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-19 21:11 [Buildroot] [PATCH] python3: remove target Python packages from PYTHONPATH Thomas Petazzoni
2017-08-21 8:30 ` Yegor Yefremov
2017-08-21 21:25 ` Thomas Petazzoni [this message]
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=20170821232535.6ed70c51@windsurf \
--to=thomas.petazzoni@free-electrons.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox