From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Marcus Hoffmann <marcus.hoffmann@othermo.de>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 1/2] package/pkg-python: use pyinstaller.py for host python packages
Date: Mon, 22 Aug 2022 11:55:55 +0200 [thread overview]
Message-ID: <20220822095555.GZ2167049@scaer> (raw)
In-Reply-To: <20220822075418.903230-1-james.hilliard1@gmail.com>
James, All,
On 2022-08-22 01:54 -0600, James Hilliard spake thusly:
> The python installer cli isn't able to overwrite files of packages
> that already exist, this causes problems when doing a rebuild or
> update without a full clean.
>
> Since we need to add functionality to our pyinstaller.py script to fix
> this issue we must also use pyinstaller.py for host python packages.
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> Tested-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> Changes v2 -> v3:
> - set interpreter to $(HOST_DIR)/bin/python
> ---
> package/pkg-python.mk | 12 ++++++++++--
> support/scripts/pyinstaller.py | 0
> 2 files changed, 10 insertions(+), 2 deletions(-)
> mode change 100755 => 100644 support/scripts/pyinstaller.py
>
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index 5794e3a195..c15a168f60 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -139,6 +139,14 @@ PKG_PYTHON_PEP517_INSTALL_STAGING_OPTS = \
> HOST_PKG_PYTHON_PEP517_ENV = \
> $(HOST_PKG_PYTHON_ENV)
>
> +HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
> + --interpreter=$(HOST_DIR)/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
>
> @@ -200,7 +208,7 @@ $(2)_BASE_INSTALL_STAGING_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/*
> else
> $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
> $(2)_BASE_BUILD_CMD = -m build -n -w
> -$(2)_BASE_INSTALL_CMD = -m installer dist/*
> +$(2)_BASE_INSTALL_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
> endif
> else ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
> ifeq ($(4),target)
> @@ -208,7 +216,7 @@ $$(error flit-bootstrap setup type only supported for host packages)
> else
> $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
> $(2)_BASE_BUILD_CMD = -m flit_core.wheel
> -$(2)_BASE_INSTALL_CMD ?= -m installer dist/*
> +$(2)_BASE_INSTALL_CMD ?= $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
> endif
> else
> $$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils', 'setuptools', 'pep517' or 'flit'.")
> diff --git a/support/scripts/pyinstaller.py b/support/scripts/pyinstaller.py
> old mode 100755
> new mode 100644
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2022-08-22 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 7:54 [Buildroot] [PATCH v3 1/2] package/pkg-python: use pyinstaller.py for host python packages James Hilliard
2022-08-22 7:54 ` [Buildroot] [PATCH v3 2/2] package/pkg-python: clean conflicting pep517 packages before install James Hilliard
2022-08-22 9:57 ` Yann E. MORIN
2022-08-22 9:55 ` Yann E. MORIN [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=20220822095555.GZ2167049@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=james.hilliard1@gmail.com \
--cc=marcus.hoffmann@othermo.de \
--cc=thomas.petazzoni@bootlin.com \
/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.