All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence
@ 2022-04-24 21:39 James Hilliard
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 2/5] package/pkg-python.mk: remove hardcoded paths for host Python James Hilliard
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: James Hilliard @ 2022-04-24 21:39 UTC (permalink / raw)
  To: buildroot; +Cc: Asaf Kahlon, James Hilliard, Thomas Petazzoni, Yann E . MORIN

There are a number of flit toolchain dependencies currently in the
process of deprecating distutils based fallbacks.

This will be needed in order to update tomli.

We need to migrate these to use a new bootstrap based build+install
sequence which relies on flit's bootstrap wheel build+install
features to build and install host-python-pypa-build and
host-python-installer which gives us a full pep517 toolchain.

Note that one can run host-python-flit-core commands for building
and installing itself since the package build directory is the cwd.

We need to add a special flit-bootstrap SETUP_TYPE for dependencies
of host-python-pypa-build and host-python-installer which can not
use the normal flit SETUP_TYPE which would cause a circular dependency
issue.

We need to special case dependency exclusions for
host-python-flit-core and host-python-installer to avoid circular
dependencies in the flit-bootstrap SETUP_TYPE.

We also need to special case the installation command for
host-python-flit-core since it can not depend on host-python-installer
due to host-python-installer requiring host-python-flit-core.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
Changes v3 -> v4:
  - rebase
Changes v2 -> v3:
  - add special flit-bootstrap SETUP_TYPE
  - don't change package SETUP_TYPE's yet
Changes v1 -> v2:
  - formatting/cleanup
  - add comments
---
 package/pkg-python.mk | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 867341fc7b..2e7704a0a9 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -154,6 +154,9 @@ 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
+
 ################################################################################
 # inner-python-package -- defines how the configuration, compilation
 # and installation of a Python package should be done, implements a
@@ -203,7 +206,7 @@ $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_SETUPTOOLS_ENV)
 $(2)_BASE_BUILD_CMD = setup.py build
 $(2)_BASE_INSTALL_CMD = setup.py install $$(HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS)
 endif
-else ifneq ($$(filter flit pep517,$$($(2)_SETUP_TYPE)),)
+else ifneq ($$(filter flit flit-bootstrap pep517,$$($(2)_SETUP_TYPE)),)
 ifeq ($(4),target)
 $(2)_BASE_ENV = $$(PKG_PYTHON_PEP517_ENV)
 $(2)_BASE_BUILD_CMD = -m build -n -w
@@ -211,9 +214,24 @@ $(2)_BASE_INSTALL_TARGET_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $
 $(2)_BASE_INSTALL_STAGING_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(PKG_PYTHON_PEP517_INSTALL_STAGING_OPTS)
 else
 $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
+# Use flit built in wheel builder for packages that are flit-bootstrap packages.
+# This is needed to avoid a circular with host-python-pypa-build and those dependencies.
+#
+ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
+$(2)_BASE_BUILD_CMD = -m flit_core.wheel
+ifeq ($(1),host-python-flit-core)
+# 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.
+#
+$(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)
+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)
 endif
+endif
 else
 $$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils', 'setuptools', 'pep517' or 'flit'.")
 endif
@@ -239,6 +257,12 @@ $(2)_DEPENDENCIES += host-python-pypa-build host-python-installer
 ifeq ($$($(2)_SETUP_TYPE),flit)
 $(2)_DEPENDENCIES += host-python-flit-core
 endif
+else ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
+ifneq ($$(filter host-python-flit-core host-python-installer,$(1)),)
+$(2)_DEPENDENCIES += $$(if $$(filter host-python-flit-core,$(1)),,host-python-flit-core)
+else
+$(2)_DEPENDENCIES += host-python-flit-core host-python-installer
+endif
 endif # SETUP_TYPE
 
 # Python interpreter to use for building the package.
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v7 2/5] package/pkg-python.mk: remove hardcoded paths for host Python
  2022-04-24 21:39 [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence James Hilliard
@ 2022-04-24 21:39 ` James Hilliard
  2022-04-25 21:32   ` Arnout Vandecappelle
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 3/5] package/python-flit-core: migrate setup type to flit bootstrap James Hilliard
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: James Hilliard @ 2022-04-24 21:39 UTC (permalink / raw)
  To: buildroot
  Cc: Asaf Kahlon, James Hilliard,
	Роман
	Донченко,
	Thomas Petazzoni, Yann E . MORIN

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 --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
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v7 3/5] package/python-flit-core: migrate setup type to flit bootstrap
  2022-04-24 21:39 [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence James Hilliard
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 2/5] package/pkg-python.mk: remove hardcoded paths for host Python James Hilliard
@ 2022-04-24 21:39 ` James Hilliard
  2022-04-25 21:34   ` Arnout Vandecappelle
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1 James Hilliard
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: James Hilliard @ 2022-04-24 21:39 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Asaf Kahlon, Thomas Petazzoni, Yann E . MORIN

This package needs to use flit-bootstrap since it is a dependency
of host-python-pypa-build.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/python-flit-core/python-flit-core.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/python-flit-core/python-flit-core.mk b/package/python-flit-core/python-flit-core.mk
index 0e058a1f17..aaf4c77c6a 100644
--- a/package/python-flit-core/python-flit-core.mk
+++ b/package/python-flit-core/python-flit-core.mk
@@ -8,6 +8,6 @@ PYTHON_FLIT_CORE_VERSION = 3.7.1
 PYTHON_FLIT_CORE_SOURCE = flit_core-$(PYTHON_FLIT_CORE_VERSION).tar.gz
 PYTHON_FLIT_CORE_SITE = https://files.pythonhosted.org/packages/15/d1/d8798b83e953fd6f86ca9b50f93eec464a9305b0661469c8234e61095481
 PYTHON_FLIT_CORE_LICENSE = BSD-3-Clause
-PYTHON_FLIT_CORE_SETUP_TYPE = pep517
+PYTHON_FLIT_CORE_SETUP_TYPE = flit-bootstrap
 
 $(eval $(host-python-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1
  2022-04-24 21:39 [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence James Hilliard
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 2/5] package/pkg-python.mk: remove hardcoded paths for host Python James Hilliard
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 3/5] package/python-flit-core: migrate setup type to flit bootstrap James Hilliard
@ 2022-04-24 21:39 ` James Hilliard
  2022-04-25 21:37   ` Arnout Vandecappelle
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 5/5] package/python-pyparsing: bump to version 3.0.8 James Hilliard
  2022-04-25 21:32 ` [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence Arnout Vandecappelle
  4 siblings, 1 reply; 14+ messages in thread
From: James Hilliard @ 2022-04-24 21:39 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Asaf Kahlon, Thomas Petazzoni, Yann E . MORIN

This package now requires flit and must use the flit-bootstrap setup
type for the host build since it is a dependency of
host-python-pypa-build.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v6 -> v7:
  - only use flit-boostrap for host-python-tomli
---
 package/python-tomli/python-tomli.hash | 4 ++--
 package/python-tomli/python-tomli.mk   | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/package/python-tomli/python-tomli.hash b/package/python-tomli/python-tomli.hash
index 1a274c8a40..8368f9ee13 100644
--- a/package/python-tomli/python-tomli.hash
+++ b/package/python-tomli/python-tomli.hash
@@ -1,5 +1,5 @@
 # md5, sha256 from https://pypi.org/pypi/tomli/json
-md5  2ecbc7a23b8c8dc2fe96f588f88463d9  tomli-1.2.0.tar.gz
-sha256  d60e681734099207a6add7a10326bc2ddd1fdc36c1b0f547d00ef73ac63739c2  tomli-1.2.0.tar.gz
+md5  d4341621d423a7ca6822e23d6d52bb9a  tomli-2.0.1.tar.gz
+sha256  de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f  tomli-2.0.1.tar.gz
 # Locally computed sha256 checksums
 sha256  b80816b0d530b8accb4c2211783790984a6e3b61922c2b5ee92f3372ab2742fe  LICENSE
diff --git a/package/python-tomli/python-tomli.mk b/package/python-tomli/python-tomli.mk
index b8c20ca736..b803d67466 100644
--- a/package/python-tomli/python-tomli.mk
+++ b/package/python-tomli/python-tomli.mk
@@ -4,12 +4,13 @@
 #
 ################################################################################
 
-PYTHON_TOMLI_VERSION = 1.2.0
+PYTHON_TOMLI_VERSION = 2.0.1
 PYTHON_TOMLI_SOURCE = tomli-$(PYTHON_TOMLI_VERSION).tar.gz
-PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/ec/38/8eccdc662c61aed187d5f5b168c18b1d2de3827976c3691e4da8be7375aa
-PYTHON_TOMLI_SETUP_TYPE = distutils
+PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3
 PYTHON_TOMLI_LICENSE = MIT
 PYTHON_TOMLI_LICENSE_FILES = LICENSE
+PYTHON_TOMLI_SETUP_TYPE = flit
+HOST_PYTHON_TOMLI_SETUP_TYPE = flit-bootstrap
 
 $(eval $(python-package))
 $(eval $(host-python-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v7 5/5] package/python-pyparsing: bump to version 3.0.8
  2022-04-24 21:39 [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence James Hilliard
                   ` (2 preceding siblings ...)
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1 James Hilliard
@ 2022-04-24 21:39 ` James Hilliard
  2022-04-25 21:38   ` Arnout Vandecappelle
  2022-04-25 21:32 ` [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence Arnout Vandecappelle
  4 siblings, 1 reply; 14+ messages in thread
From: James Hilliard @ 2022-04-24 21:39 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Asaf Kahlon, Thomas Petazzoni, Yann E . MORIN

This package now requires flit and must use the flit-bootstrap setup
type for the host build since it is a dependency of
host-python-pypa-build.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v6 -> v7:
  - only use flit-boostrap for host-python-pyparsing
---
 package/python-pyparsing/python-pyparsing.hash | 4 ++--
 package/python-pyparsing/python-pyparsing.mk   | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/package/python-pyparsing/python-pyparsing.hash b/package/python-pyparsing/python-pyparsing.hash
index 1e56e878a1..e7137d55c9 100644
--- a/package/python-pyparsing/python-pyparsing.hash
+++ b/package/python-pyparsing/python-pyparsing.hash
@@ -1,5 +1,5 @@
 # md5, sha256 from https://pypi.org/pypi/pyparsing/json
-md5  9d38774991175444e21a3dfa865876cc  pyparsing-3.0.7.tar.gz
-sha256  18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea  pyparsing-3.0.7.tar.gz
+md5  971252e99e1e02a4c27f001894e0422d  pyparsing-3.0.8.tar.gz
+sha256  7bf433498c016c4314268d95df76c81b842a4cb2b276fa3312cfb1e1d85f6954  pyparsing-3.0.8.tar.gz
 # Locally computed sha256 checksums
 sha256  10d5120a16805804ffda8b688c220bfb4e8f39741b57320604d455a309e01972  LICENSE
diff --git a/package/python-pyparsing/python-pyparsing.mk b/package/python-pyparsing/python-pyparsing.mk
index 2fb705bc7a..7e458042f5 100644
--- a/package/python-pyparsing/python-pyparsing.mk
+++ b/package/python-pyparsing/python-pyparsing.mk
@@ -4,12 +4,13 @@
 #
 ################################################################################
 
-PYTHON_PYPARSING_VERSION = 3.0.7
+PYTHON_PYPARSING_VERSION = 3.0.8
 PYTHON_PYPARSING_SOURCE = pyparsing-$(PYTHON_PYPARSING_VERSION).tar.gz
-PYTHON_PYPARSING_SITE = https://files.pythonhosted.org/packages/d6/60/9bed18f43275b34198eb9720d4c1238c68b3755620d20df0afd89424d32b
+PYTHON_PYPARSING_SITE = https://files.pythonhosted.org/packages/31/df/789bd0556e65cf931a5b87b603fcf02f79ff04d5379f3063588faaf9c1e4
 PYTHON_PYPARSING_LICENSE = MIT
 PYTHON_PYPARSING_LICENSE_FILES = LICENSE
-PYTHON_PYPARSING_SETUP_TYPE = setuptools
+PYTHON_PYPARSING_SETUP_TYPE = flit
+HOST_PYTHON_PYPARSING_SETUP_TYPE = flit-bootstrap
 
 $(eval $(python-package))
 $(eval $(host-python-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence
  2022-04-24 21:39 [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence James Hilliard
                   ` (3 preceding siblings ...)
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 5/5] package/python-pyparsing: bump to version 3.0.8 James Hilliard
@ 2022-04-25 21:32 ` Arnout Vandecappelle
  4 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2022-04-25 21:32 UTC (permalink / raw)
  To: James Hilliard, buildroot; +Cc: Asaf Kahlon, Thomas Petazzoni, Yann E . MORIN



On 24/04/2022 23:39, James Hilliard wrote:
> There are a number of flit toolchain dependencies currently in the
> process of deprecating distutils based fallbacks.
> 
> This will be needed in order to update tomli.
> 
> We need to migrate these to use a new bootstrap based build+install
> sequence which relies on flit's bootstrap wheel build+install
> features to build and install host-python-pypa-build and
> host-python-installer which gives us a full pep517 toolchain.
> 
> Note that one can run host-python-flit-core commands for building
> and installing itself since the package build directory is the cwd.
> 
> We need to add a special flit-bootstrap SETUP_TYPE for dependencies
> of host-python-pypa-build and host-python-installer which can not
> use the normal flit SETUP_TYPE which would cause a circular dependency
> issue.
> 
> We need to special case dependency exclusions for
> host-python-flit-core and host-python-installer to avoid circular
> dependencies in the flit-bootstrap SETUP_TYPE.
> 
> We also need to special case the installation command for
> host-python-flit-core since it can not depend on host-python-installer
> due to host-python-installer requiring host-python-flit-core.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
> Changes v3 -> v4:
>    - rebase
> Changes v2 -> v3:
>    - add special flit-bootstrap SETUP_TYPE
>    - don't change package SETUP_TYPE's yet
> Changes v1 -> v2:
>    - formatting/cleanup
>    - add comments
> ---
>   package/pkg-python.mk | 26 +++++++++++++++++++++++++-
>   1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index 867341fc7b..2e7704a0a9 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -154,6 +154,9 @@ 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
> +
>   ################################################################################
>   # inner-python-package -- defines how the configuration, compilation
>   # and installation of a Python package should be done, implements a
> @@ -203,7 +206,7 @@ $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_SETUPTOOLS_ENV)
>   $(2)_BASE_BUILD_CMD = setup.py build
>   $(2)_BASE_INSTALL_CMD = setup.py install $$(HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS)
>   endif
> -else ifneq ($$(filter flit pep517,$$($(2)_SETUP_TYPE)),)
> +else ifneq ($$(filter flit flit-bootstrap pep517,$$($(2)_SETUP_TYPE)),)
>   ifeq ($(4),target)
>   $(2)_BASE_ENV = $$(PKG_PYTHON_PEP517_ENV)
>   $(2)_BASE_BUILD_CMD = -m build -n -w
> @@ -211,9 +214,24 @@ $(2)_BASE_INSTALL_TARGET_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $
>   $(2)_BASE_INSTALL_STAGING_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(PKG_PYTHON_PEP517_INSTALL_STAGING_OPTS)
>   else
>   $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
> +# Use flit built in wheel builder for packages that are flit-bootstrap packages.
> +# This is needed to avoid a circular with host-python-pypa-build and those dependencies.
> +#
> +ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
> +$(2)_BASE_BUILD_CMD = -m flit_core.wheel
> +ifeq ($(1),host-python-flit-core)
> +# 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.
> +#
> +$(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)
> +endif

  I still think this is too complicated. And I'm stubborn, so I changed it and 
committed to master [1]. I've basically done two things:

- Treat flit-bootstrap as a completely separate setup type. Only the _BASE_ENV 
is exactly the same as in the other cases; the conditional flow becomes a lot 
easier to understand by making it explicit. This also allows an $(error ...) 
when it's used for a target package.

  The special-casing for flit-core I solved by using ?= and overriding it in 
python-flit-core.mk

> +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)
>   endif
> +endif
>   else
>   $$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils', 'setuptools', 'pep517' or 'flit'.")
>   endif
> @@ -239,6 +257,12 @@ $(2)_DEPENDENCIES += host-python-pypa-build host-python-installer
>   ifeq ($$($(2)_SETUP_TYPE),flit)
>   $(2)_DEPENDENCIES += host-python-flit-core
>   endif
> +else ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
> +ifneq ($$(filter host-python-flit-core host-python-installer,$(1)),)
> +$(2)_DEPENDENCIES += $$(if $$(filter host-python-flit-core,$(1)),,host-python-flit-core)

  Again, too complicated for me. I just removed this conditional branch. So for 
host-python-flit-core and host-python-installer, no dependencies are added. 
host-python-flit-core in fact doesn't need any. host-python-installer has to add 
it manually.

  Regards,
  Arnout

[1] 
https://git.buildroot.org/buildroot/commit/?id=8b4f831f36cd653504f38023f909f76912730534


> +else
> +$(2)_DEPENDENCIES += host-python-flit-core host-python-installer
> +endif
>   endif # SETUP_TYPE
>   
>   # Python interpreter to use for building the package.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 2/5] package/pkg-python.mk: remove hardcoded paths for host Python
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 2/5] package/pkg-python.mk: remove hardcoded paths for host Python James Hilliard
@ 2022-04-25 21:32   ` Arnout Vandecappelle
  0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2022-04-25 21:32 UTC (permalink / raw)
  To: James Hilliard, buildroot
  Cc: Роман
	Донченко,
	Thomas Petazzoni, Asaf Kahlon, Yann E . MORIN



On 24/04/2022 23:39, James Hilliard wrote:
> 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>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
> Changes v4 -> v5:
>    - add rebased remove hardcoded paths patch
> ---
>   package/pkg-python.mk | 12 ++----------
>   1 file changed, 2 insertions(+), 10 deletions(-)
> 
> 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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 3/5] package/python-flit-core: migrate setup type to flit bootstrap
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 3/5] package/python-flit-core: migrate setup type to flit bootstrap James Hilliard
@ 2022-04-25 21:34   ` Arnout Vandecappelle
  0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2022-04-25 21:34 UTC (permalink / raw)
  To: James Hilliard, buildroot; +Cc: Thomas Petazzoni, Asaf Kahlon, Yann E . MORIN



On 24/04/2022 23:39, James Hilliard wrote:
> This package needs to use flit-bootstrap since it is a dependency
> of host-python-pypa-build.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
>   package/python-flit-core/python-flit-core.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/python-flit-core/python-flit-core.mk b/package/python-flit-core/python-flit-core.mk
> index 0e058a1f17..aaf4c77c6a 100644
> --- a/package/python-flit-core/python-flit-core.mk
> +++ b/package/python-flit-core/python-flit-core.mk
> @@ -8,6 +8,6 @@ PYTHON_FLIT_CORE_VERSION = 3.7.1
>   PYTHON_FLIT_CORE_SOURCE = flit_core-$(PYTHON_FLIT_CORE_VERSION).tar.gz
>   PYTHON_FLIT_CORE_SITE = https://files.pythonhosted.org/packages/15/d1/d8798b83e953fd6f86ca9b50f93eec464a9305b0661469c8234e61095481
>   PYTHON_FLIT_CORE_LICENSE = BSD-3-Clause
> -PYTHON_FLIT_CORE_SETUP_TYPE = pep517
> +PYTHON_FLIT_CORE_SETUP_TYPE = flit-bootstrap

  So here I added

HOST_PYTHON_FLIT_CORE_BASE_INSTALL_CMD = -m bootstrap_install dist/* 
$(HOST_PKG_PYTHON_PEP517_BOOTSTRAP_INSTALL_OPTS)

  Applied to master, thanks.

  Regards,
  Arnout


>   
>   $(eval $(host-python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1 James Hilliard
@ 2022-04-25 21:37   ` Arnout Vandecappelle
  2022-04-26  1:35     ` James Hilliard
  0 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2022-04-25 21:37 UTC (permalink / raw)
  To: James Hilliard, buildroot; +Cc: Thomas Petazzoni, Asaf Kahlon, Yann E . MORIN



On 24/04/2022 23:39, James Hilliard wrote:
> This package now requires flit and must use the flit-bootstrap setup
> type for the host build since it is a dependency of
> host-python-pypa-build.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>


  Applied to master, thanks.

  While testing this series, I noticed that the following gives an error (this 
was already the case in the original series; I haven't checked how it was before 
your series was applied - for tomli, it certainly wouldn't happen because it 
would still be using setuptools, but maybe for other flit packages, I don't know).

make python-tomli
make python-tomli-dirclean
make python-tomli
...
FileExistsError: File already exists: 
/home/arnout/src/buildroot/output/target/usr/lib/python3.10/site-packages/tomli/__init__.py

  Would be nice to get that fixed...

  Regards,
  Arnout

> ---
> Changes v6 -> v7:
>    - only use flit-boostrap for host-python-tomli
> ---
>   package/python-tomli/python-tomli.hash | 4 ++--
>   package/python-tomli/python-tomli.mk   | 7 ++++---
>   2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/package/python-tomli/python-tomli.hash b/package/python-tomli/python-tomli.hash
> index 1a274c8a40..8368f9ee13 100644
> --- a/package/python-tomli/python-tomli.hash
> +++ b/package/python-tomli/python-tomli.hash
> @@ -1,5 +1,5 @@
>   # md5, sha256 from https://pypi.org/pypi/tomli/json
> -md5  2ecbc7a23b8c8dc2fe96f588f88463d9  tomli-1.2.0.tar.gz
> -sha256  d60e681734099207a6add7a10326bc2ddd1fdc36c1b0f547d00ef73ac63739c2  tomli-1.2.0.tar.gz
> +md5  d4341621d423a7ca6822e23d6d52bb9a  tomli-2.0.1.tar.gz
> +sha256  de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f  tomli-2.0.1.tar.gz
>   # Locally computed sha256 checksums
>   sha256  b80816b0d530b8accb4c2211783790984a6e3b61922c2b5ee92f3372ab2742fe  LICENSE
> diff --git a/package/python-tomli/python-tomli.mk b/package/python-tomli/python-tomli.mk
> index b8c20ca736..b803d67466 100644
> --- a/package/python-tomli/python-tomli.mk
> +++ b/package/python-tomli/python-tomli.mk
> @@ -4,12 +4,13 @@
>   #
>   ################################################################################
>   
> -PYTHON_TOMLI_VERSION = 1.2.0
> +PYTHON_TOMLI_VERSION = 2.0.1
>   PYTHON_TOMLI_SOURCE = tomli-$(PYTHON_TOMLI_VERSION).tar.gz
> -PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/ec/38/8eccdc662c61aed187d5f5b168c18b1d2de3827976c3691e4da8be7375aa
> -PYTHON_TOMLI_SETUP_TYPE = distutils
> +PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3
>   PYTHON_TOMLI_LICENSE = MIT
>   PYTHON_TOMLI_LICENSE_FILES = LICENSE
> +PYTHON_TOMLI_SETUP_TYPE = flit
> +HOST_PYTHON_TOMLI_SETUP_TYPE = flit-bootstrap
>   
>   $(eval $(python-package))
>   $(eval $(host-python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 5/5] package/python-pyparsing: bump to version 3.0.8
  2022-04-24 21:39 ` [Buildroot] [PATCH v7 5/5] package/python-pyparsing: bump to version 3.0.8 James Hilliard
@ 2022-04-25 21:38   ` Arnout Vandecappelle
  0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2022-04-25 21:38 UTC (permalink / raw)
  To: James Hilliard, buildroot; +Cc: Thomas Petazzoni, Asaf Kahlon, Yann E . MORIN



On 24/04/2022 23:39, James Hilliard wrote:
> This package now requires flit and must use the flit-bootstrap setup
> type for the host build since it is a dependency of
> host-python-pypa-build.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
> Changes v6 -> v7:
>    - only use flit-boostrap for host-python-pyparsing
> ---
>   package/python-pyparsing/python-pyparsing.hash | 4 ++--
>   package/python-pyparsing/python-pyparsing.mk   | 7 ++++---
>   2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/package/python-pyparsing/python-pyparsing.hash b/package/python-pyparsing/python-pyparsing.hash
> index 1e56e878a1..e7137d55c9 100644
> --- a/package/python-pyparsing/python-pyparsing.hash
> +++ b/package/python-pyparsing/python-pyparsing.hash
> @@ -1,5 +1,5 @@
>   # md5, sha256 from https://pypi.org/pypi/pyparsing/json
> -md5  9d38774991175444e21a3dfa865876cc  pyparsing-3.0.7.tar.gz
> -sha256  18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea  pyparsing-3.0.7.tar.gz
> +md5  971252e99e1e02a4c27f001894e0422d  pyparsing-3.0.8.tar.gz
> +sha256  7bf433498c016c4314268d95df76c81b842a4cb2b276fa3312cfb1e1d85f6954  pyparsing-3.0.8.tar.gz
>   # Locally computed sha256 checksums
>   sha256  10d5120a16805804ffda8b688c220bfb4e8f39741b57320604d455a309e01972  LICENSE
> diff --git a/package/python-pyparsing/python-pyparsing.mk b/package/python-pyparsing/python-pyparsing.mk
> index 2fb705bc7a..7e458042f5 100644
> --- a/package/python-pyparsing/python-pyparsing.mk
> +++ b/package/python-pyparsing/python-pyparsing.mk
> @@ -4,12 +4,13 @@
>   #
>   ################################################################################
>   
> -PYTHON_PYPARSING_VERSION = 3.0.7
> +PYTHON_PYPARSING_VERSION = 3.0.8
>   PYTHON_PYPARSING_SOURCE = pyparsing-$(PYTHON_PYPARSING_VERSION).tar.gz
> -PYTHON_PYPARSING_SITE = https://files.pythonhosted.org/packages/d6/60/9bed18f43275b34198eb9720d4c1238c68b3755620d20df0afd89424d32b
> +PYTHON_PYPARSING_SITE = https://files.pythonhosted.org/packages/31/df/789bd0556e65cf931a5b87b603fcf02f79ff04d5379f3063588faaf9c1e4
>   PYTHON_PYPARSING_LICENSE = MIT
>   PYTHON_PYPARSING_LICENSE_FILES = LICENSE
> -PYTHON_PYPARSING_SETUP_TYPE = setuptools
> +PYTHON_PYPARSING_SETUP_TYPE = flit
> +HOST_PYTHON_PYPARSING_SETUP_TYPE = flit-bootstrap
>   
>   $(eval $(python-package))
>   $(eval $(host-python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1
  2022-04-25 21:37   ` Arnout Vandecappelle
@ 2022-04-26  1:35     ` James Hilliard
  2022-04-27  7:07       ` Arnout Vandecappelle
  0 siblings, 1 reply; 14+ messages in thread
From: James Hilliard @ 2022-04-26  1:35 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Yann E . MORIN, Thomas Petazzoni, Asaf Kahlon, buildroot

On Mon, Apr 25, 2022 at 4:37 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 24/04/2022 23:39, James Hilliard wrote:
> > This package now requires flit and must use the flit-bootstrap setup
> > type for the host build since it is a dependency of
> > host-python-pypa-build.
> >
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
>
>
>   Applied to master, thanks.
>
>   While testing this series, I noticed that the following gives an error (this
> was already the case in the original series; I haven't checked how it was before
> your series was applied - for tomli, it certainly wouldn't happen because it
> would still be using setuptools, but maybe for other flit packages, I don't know).
>
> make python-tomli
> make python-tomli-dirclean
> make python-tomli
> ...
> FileExistsError: File already exists:
> /home/arnout/src/buildroot/output/target/usr/lib/python3.10/site-packages/tomli/__init__.py

I think it happens only when building across version bumps, probably a bug
with installer(https://github.com/pypa/installer) upstream.

>
>   Would be nice to get that fixed...

Yeah, I'll see if I can track that issue down.

>
>   Regards,
>   Arnout
>
> > ---
> > Changes v6 -> v7:
> >    - only use flit-boostrap for host-python-tomli
> > ---
> >   package/python-tomli/python-tomli.hash | 4 ++--
> >   package/python-tomli/python-tomli.mk   | 7 ++++---
> >   2 files changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/package/python-tomli/python-tomli.hash b/package/python-tomli/python-tomli.hash
> > index 1a274c8a40..8368f9ee13 100644
> > --- a/package/python-tomli/python-tomli.hash
> > +++ b/package/python-tomli/python-tomli.hash
> > @@ -1,5 +1,5 @@
> >   # md5, sha256 from https://pypi.org/pypi/tomli/json
> > -md5  2ecbc7a23b8c8dc2fe96f588f88463d9  tomli-1.2.0.tar.gz
> > -sha256  d60e681734099207a6add7a10326bc2ddd1fdc36c1b0f547d00ef73ac63739c2  tomli-1.2.0.tar.gz
> > +md5  d4341621d423a7ca6822e23d6d52bb9a  tomli-2.0.1.tar.gz
> > +sha256  de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f  tomli-2.0.1.tar.gz
> >   # Locally computed sha256 checksums
> >   sha256  b80816b0d530b8accb4c2211783790984a6e3b61922c2b5ee92f3372ab2742fe  LICENSE
> > diff --git a/package/python-tomli/python-tomli.mk b/package/python-tomli/python-tomli.mk
> > index b8c20ca736..b803d67466 100644
> > --- a/package/python-tomli/python-tomli.mk
> > +++ b/package/python-tomli/python-tomli.mk
> > @@ -4,12 +4,13 @@
> >   #
> >   ################################################################################
> >
> > -PYTHON_TOMLI_VERSION = 1.2.0
> > +PYTHON_TOMLI_VERSION = 2.0.1
> >   PYTHON_TOMLI_SOURCE = tomli-$(PYTHON_TOMLI_VERSION).tar.gz
> > -PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/ec/38/8eccdc662c61aed187d5f5b168c18b1d2de3827976c3691e4da8be7375aa
> > -PYTHON_TOMLI_SETUP_TYPE = distutils
> > +PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3
> >   PYTHON_TOMLI_LICENSE = MIT
> >   PYTHON_TOMLI_LICENSE_FILES = LICENSE
> > +PYTHON_TOMLI_SETUP_TYPE = flit
> > +HOST_PYTHON_TOMLI_SETUP_TYPE = flit-bootstrap
> >
> >   $(eval $(python-package))
> >   $(eval $(host-python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1
  2022-04-26  1:35     ` James Hilliard
@ 2022-04-27  7:07       ` Arnout Vandecappelle
  2022-04-27  7:15         ` James Hilliard
  0 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2022-04-27  7:07 UTC (permalink / raw)
  To: James Hilliard; +Cc: Yann E . MORIN, Thomas Petazzoni, Asaf Kahlon, buildroot



On 26/04/2022 03:35, James Hilliard wrote:
> On Mon, Apr 25, 2022 at 4:37 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>>
>>
>>
>> On 24/04/2022 23:39, James Hilliard wrote:
>>> This package now requires flit and must use the flit-bootstrap setup
>>> type for the host build since it is a dependency of
>>> host-python-pypa-build.
>>>
>>> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
>>
>>
>>    Applied to master, thanks.
>>
>>    While testing this series, I noticed that the following gives an error (this
>> was already the case in the original series; I haven't checked how it was before
>> your series was applied - for tomli, it certainly wouldn't happen because it
>> would still be using setuptools, but maybe for other flit packages, I don't know).
>>
>> make python-tomli
>> make python-tomli-dirclean
>> make python-tomli
>> ...
>> FileExistsError: File already exists:
>> /home/arnout/src/buildroot/output/target/usr/lib/python3.10/site-packages/tomli/__init__.py
> 
> I think it happens only when building across version bumps, probably a bug
> with installer(https://github.com/pypa/installer) upstream.

  No, it's exactly the sequence of commands that I wrote above that triggers it.

  I haven't checked if this is the case for flit/pep517 packages in general, or 
just for flit-bootstrap.

  Regards,
  Arnout

> 
>>
>>    Would be nice to get that fixed...
> 
> Yeah, I'll see if I can track that issue down.
> 
>>
>>    Regards,
>>    Arnout
>>
>>> ---
>>> Changes v6 -> v7:
>>>     - only use flit-boostrap for host-python-tomli
>>> ---
>>>    package/python-tomli/python-tomli.hash | 4 ++--
>>>    package/python-tomli/python-tomli.mk   | 7 ++++---
>>>    2 files changed, 6 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/package/python-tomli/python-tomli.hash b/package/python-tomli/python-tomli.hash
>>> index 1a274c8a40..8368f9ee13 100644
>>> --- a/package/python-tomli/python-tomli.hash
>>> +++ b/package/python-tomli/python-tomli.hash
>>> @@ -1,5 +1,5 @@
>>>    # md5, sha256 from https://pypi.org/pypi/tomli/json
>>> -md5  2ecbc7a23b8c8dc2fe96f588f88463d9  tomli-1.2.0.tar.gz
>>> -sha256  d60e681734099207a6add7a10326bc2ddd1fdc36c1b0f547d00ef73ac63739c2  tomli-1.2.0.tar.gz
>>> +md5  d4341621d423a7ca6822e23d6d52bb9a  tomli-2.0.1.tar.gz
>>> +sha256  de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f  tomli-2.0.1.tar.gz
>>>    # Locally computed sha256 checksums
>>>    sha256  b80816b0d530b8accb4c2211783790984a6e3b61922c2b5ee92f3372ab2742fe  LICENSE
>>> diff --git a/package/python-tomli/python-tomli.mk b/package/python-tomli/python-tomli.mk
>>> index b8c20ca736..b803d67466 100644
>>> --- a/package/python-tomli/python-tomli.mk
>>> +++ b/package/python-tomli/python-tomli.mk
>>> @@ -4,12 +4,13 @@
>>>    #
>>>    ################################################################################
>>>
>>> -PYTHON_TOMLI_VERSION = 1.2.0
>>> +PYTHON_TOMLI_VERSION = 2.0.1
>>>    PYTHON_TOMLI_SOURCE = tomli-$(PYTHON_TOMLI_VERSION).tar.gz
>>> -PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/ec/38/8eccdc662c61aed187d5f5b168c18b1d2de3827976c3691e4da8be7375aa
>>> -PYTHON_TOMLI_SETUP_TYPE = distutils
>>> +PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3
>>>    PYTHON_TOMLI_LICENSE = MIT
>>>    PYTHON_TOMLI_LICENSE_FILES = LICENSE
>>> +PYTHON_TOMLI_SETUP_TYPE = flit
>>> +HOST_PYTHON_TOMLI_SETUP_TYPE = flit-bootstrap
>>>
>>>    $(eval $(python-package))
>>>    $(eval $(host-python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1
  2022-04-27  7:07       ` Arnout Vandecappelle
@ 2022-04-27  7:15         ` James Hilliard
  2022-04-29 20:04           ` James Hilliard
  0 siblings, 1 reply; 14+ messages in thread
From: James Hilliard @ 2022-04-27  7:15 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Yann E . MORIN, Thomas Petazzoni, Asaf Kahlon, buildroot

On Wed, Apr 27, 2022 at 1:07 AM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 26/04/2022 03:35, James Hilliard wrote:
> > On Mon, Apr 25, 2022 at 4:37 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> >>
> >>
> >>
> >> On 24/04/2022 23:39, James Hilliard wrote:
> >>> This package now requires flit and must use the flit-bootstrap setup
> >>> type for the host build since it is a dependency of
> >>> host-python-pypa-build.
> >>>
> >>> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> >>
> >>
> >>    Applied to master, thanks.
> >>
> >>    While testing this series, I noticed that the following gives an error (this
> >> was already the case in the original series; I haven't checked how it was before
> >> your series was applied - for tomli, it certainly wouldn't happen because it
> >> would still be using setuptools, but maybe for other flit packages, I don't know).
> >>
> >> make python-tomli
> >> make python-tomli-dirclean
> >> make python-tomli
> >> ...
> >> FileExistsError: File already exists:
> >> /home/arnout/src/buildroot/output/target/usr/lib/python3.10/site-packages/tomli/__init__.py
> >
> > I think it happens only when building across version bumps, probably a bug
> > with installer(https://github.com/pypa/installer) upstream.
>
>   No, it's exactly the sequence of commands that I wrote above that triggers it.

Oh, yeah, I see what's happening, I was testing with per-package directories
which prevents one from hitting that issue in most cases since it clears out
the conflicting/old artifacts with dirclean.

>
>   I haven't checked if this is the case for flit/pep517 packages in general, or
> just for flit-bootstrap.

Likely affects all flit/flit-bootstrap and pep517 packages if I had to
guess, seems
due to stale build artifacts lying around combined with installer not wanting to
overwrite artifacts in general, might need to upstream some way to enable
artifact overwrites, I'll look into that.

>
>   Regards,
>   Arnout
>
> >
> >>
> >>    Would be nice to get that fixed...
> >
> > Yeah, I'll see if I can track that issue down.
> >
> >>
> >>    Regards,
> >>    Arnout
> >>
> >>> ---
> >>> Changes v6 -> v7:
> >>>     - only use flit-boostrap for host-python-tomli
> >>> ---
> >>>    package/python-tomli/python-tomli.hash | 4 ++--
> >>>    package/python-tomli/python-tomli.mk   | 7 ++++---
> >>>    2 files changed, 6 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/package/python-tomli/python-tomli.hash b/package/python-tomli/python-tomli.hash
> >>> index 1a274c8a40..8368f9ee13 100644
> >>> --- a/package/python-tomli/python-tomli.hash
> >>> +++ b/package/python-tomli/python-tomli.hash
> >>> @@ -1,5 +1,5 @@
> >>>    # md5, sha256 from https://pypi.org/pypi/tomli/json
> >>> -md5  2ecbc7a23b8c8dc2fe96f588f88463d9  tomli-1.2.0.tar.gz
> >>> -sha256  d60e681734099207a6add7a10326bc2ddd1fdc36c1b0f547d00ef73ac63739c2  tomli-1.2.0.tar.gz
> >>> +md5  d4341621d423a7ca6822e23d6d52bb9a  tomli-2.0.1.tar.gz
> >>> +sha256  de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f  tomli-2.0.1.tar.gz
> >>>    # Locally computed sha256 checksums
> >>>    sha256  b80816b0d530b8accb4c2211783790984a6e3b61922c2b5ee92f3372ab2742fe  LICENSE
> >>> diff --git a/package/python-tomli/python-tomli.mk b/package/python-tomli/python-tomli.mk
> >>> index b8c20ca736..b803d67466 100644
> >>> --- a/package/python-tomli/python-tomli.mk
> >>> +++ b/package/python-tomli/python-tomli.mk
> >>> @@ -4,12 +4,13 @@
> >>>    #
> >>>    ################################################################################
> >>>
> >>> -PYTHON_TOMLI_VERSION = 1.2.0
> >>> +PYTHON_TOMLI_VERSION = 2.0.1
> >>>    PYTHON_TOMLI_SOURCE = tomli-$(PYTHON_TOMLI_VERSION).tar.gz
> >>> -PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/ec/38/8eccdc662c61aed187d5f5b168c18b1d2de3827976c3691e4da8be7375aa
> >>> -PYTHON_TOMLI_SETUP_TYPE = distutils
> >>> +PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3
> >>>    PYTHON_TOMLI_LICENSE = MIT
> >>>    PYTHON_TOMLI_LICENSE_FILES = LICENSE
> >>> +PYTHON_TOMLI_SETUP_TYPE = flit
> >>> +HOST_PYTHON_TOMLI_SETUP_TYPE = flit-bootstrap
> >>>
> >>>    $(eval $(python-package))
> >>>    $(eval $(host-python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1
  2022-04-27  7:15         ` James Hilliard
@ 2022-04-29 20:04           ` James Hilliard
  0 siblings, 0 replies; 14+ messages in thread
From: James Hilliard @ 2022-04-29 20:04 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Yann E . MORIN, Thomas Petazzoni, Asaf Kahlon, buildroot

On Wed, Apr 27, 2022 at 1:15 AM James Hilliard
<james.hilliard1@gmail.com> wrote:
>
> On Wed, Apr 27, 2022 at 1:07 AM Arnout Vandecappelle <arnout@mind.be> wrote:
> >
> >
> >
> > On 26/04/2022 03:35, James Hilliard wrote:
> > > On Mon, Apr 25, 2022 at 4:37 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> > >>
> > >>
> > >>
> > >> On 24/04/2022 23:39, James Hilliard wrote:
> > >>> This package now requires flit and must use the flit-bootstrap setup
> > >>> type for the host build since it is a dependency of
> > >>> host-python-pypa-build.
> > >>>
> > >>> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > >>
> > >>
> > >>    Applied to master, thanks.
> > >>
> > >>    While testing this series, I noticed that the following gives an error (this
> > >> was already the case in the original series; I haven't checked how it was before
> > >> your series was applied - for tomli, it certainly wouldn't happen because it
> > >> would still be using setuptools, but maybe for other flit packages, I don't know).
> > >>
> > >> make python-tomli
> > >> make python-tomli-dirclean
> > >> make python-tomli
> > >> ...
> > >> FileExistsError: File already exists:
> > >> /home/arnout/src/buildroot/output/target/usr/lib/python3.10/site-packages/tomli/__init__.py
> > >
> > > I think it happens only when building across version bumps, probably a bug
> > > with installer(https://github.com/pypa/installer) upstream.
> >
> >   No, it's exactly the sequence of commands that I wrote above that triggers it.
>
> Oh, yeah, I see what's happening, I was testing with per-package directories
> which prevents one from hitting that issue in most cases since it clears out
> the conflicting/old artifacts with dirclean.
>
> >
> >   I haven't checked if this is the case for flit/pep517 packages in general, or
> > just for flit-bootstrap.
>
> Likely affects all flit/flit-bootstrap and pep517 packages if I had to
> guess, seems
> due to stale build artifacts lying around combined with installer not wanting to
> overwrite artifacts in general, might need to upstream some way to enable
> artifact overwrites, I'll look into that.

Issue opened upstream:
https://github.com/pypa/installer/issues/121

>
> >
> >   Regards,
> >   Arnout
> >
> > >
> > >>
> > >>    Would be nice to get that fixed...
> > >
> > > Yeah, I'll see if I can track that issue down.
> > >
> > >>
> > >>    Regards,
> > >>    Arnout
> > >>
> > >>> ---
> > >>> Changes v6 -> v7:
> > >>>     - only use flit-boostrap for host-python-tomli
> > >>> ---
> > >>>    package/python-tomli/python-tomli.hash | 4 ++--
> > >>>    package/python-tomli/python-tomli.mk   | 7 ++++---
> > >>>    2 files changed, 6 insertions(+), 5 deletions(-)
> > >>>
> > >>> diff --git a/package/python-tomli/python-tomli.hash b/package/python-tomli/python-tomli.hash
> > >>> index 1a274c8a40..8368f9ee13 100644
> > >>> --- a/package/python-tomli/python-tomli.hash
> > >>> +++ b/package/python-tomli/python-tomli.hash
> > >>> @@ -1,5 +1,5 @@
> > >>>    # md5, sha256 from https://pypi.org/pypi/tomli/json
> > >>> -md5  2ecbc7a23b8c8dc2fe96f588f88463d9  tomli-1.2.0.tar.gz
> > >>> -sha256  d60e681734099207a6add7a10326bc2ddd1fdc36c1b0f547d00ef73ac63739c2  tomli-1.2.0.tar.gz
> > >>> +md5  d4341621d423a7ca6822e23d6d52bb9a  tomli-2.0.1.tar.gz
> > >>> +sha256  de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f  tomli-2.0.1.tar.gz
> > >>>    # Locally computed sha256 checksums
> > >>>    sha256  b80816b0d530b8accb4c2211783790984a6e3b61922c2b5ee92f3372ab2742fe  LICENSE
> > >>> diff --git a/package/python-tomli/python-tomli.mk b/package/python-tomli/python-tomli.mk
> > >>> index b8c20ca736..b803d67466 100644
> > >>> --- a/package/python-tomli/python-tomli.mk
> > >>> +++ b/package/python-tomli/python-tomli.mk
> > >>> @@ -4,12 +4,13 @@
> > >>>    #
> > >>>    ################################################################################
> > >>>
> > >>> -PYTHON_TOMLI_VERSION = 1.2.0
> > >>> +PYTHON_TOMLI_VERSION = 2.0.1
> > >>>    PYTHON_TOMLI_SOURCE = tomli-$(PYTHON_TOMLI_VERSION).tar.gz
> > >>> -PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/ec/38/8eccdc662c61aed187d5f5b168c18b1d2de3827976c3691e4da8be7375aa
> > >>> -PYTHON_TOMLI_SETUP_TYPE = distutils
> > >>> +PYTHON_TOMLI_SITE = https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3
> > >>>    PYTHON_TOMLI_LICENSE = MIT
> > >>>    PYTHON_TOMLI_LICENSE_FILES = LICENSE
> > >>> +PYTHON_TOMLI_SETUP_TYPE = flit
> > >>> +HOST_PYTHON_TOMLI_SETUP_TYPE = flit-bootstrap
> > >>>
> > >>>    $(eval $(python-package))
> > >>>    $(eval $(host-python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-04-29 20:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 21:39 [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence James Hilliard
2022-04-24 21:39 ` [Buildroot] [PATCH v7 2/5] package/pkg-python.mk: remove hardcoded paths for host Python James Hilliard
2022-04-25 21:32   ` Arnout Vandecappelle
2022-04-24 21:39 ` [Buildroot] [PATCH v7 3/5] package/python-flit-core: migrate setup type to flit bootstrap James Hilliard
2022-04-25 21:34   ` Arnout Vandecappelle
2022-04-24 21:39 ` [Buildroot] [PATCH v7 4/5] package/python-tomli: bump to version 2.0.1 James Hilliard
2022-04-25 21:37   ` Arnout Vandecappelle
2022-04-26  1:35     ` James Hilliard
2022-04-27  7:07       ` Arnout Vandecappelle
2022-04-27  7:15         ` James Hilliard
2022-04-29 20:04           ` James Hilliard
2022-04-24 21:39 ` [Buildroot] [PATCH v7 5/5] package/python-pyparsing: bump to version 3.0.8 James Hilliard
2022-04-25 21:38   ` Arnout Vandecappelle
2022-04-25 21:32 ` [Buildroot] [PATCH v7 1/5] package/pkg-python: migrate flit to new bootstrapping sequence Arnout Vandecappelle

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.