* [Buildroot] [PATCH v9 02/18] package/python-dbus-fast: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 03/18] package/python-dnspython: " James Hilliard
` (16 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate python-dbus-fast to the pep517 poetry-core backend
as setuptools is not supported when building with a pep517 frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
We do need to additinally keep a dependency on host-python-setuptools
as that is specified as an additional build requirement.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-dbus-fast/python-dbus-fast.mk | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/package/python-dbus-fast/python-dbus-fast.mk b/package/python-dbus-fast/python-dbus-fast.mk
index b890177c74..1456ce5e4c 100644
--- a/package/python-dbus-fast/python-dbus-fast.mk
+++ b/package/python-dbus-fast/python-dbus-fast.mk
@@ -7,10 +7,13 @@
PYTHON_DBUS_FAST_VERSION = 2.12.0
PYTHON_DBUS_FAST_SOURCE = dbus_fast-$(PYTHON_DBUS_FAST_VERSION).tar.gz
PYTHON_DBUS_FAST_SITE = https://files.pythonhosted.org/packages/f5/8c/220fcbe4337b842d730d5752f207fc8efd3a02405c71c329e61218e947b8
-PYTHON_DBUS_FAST_SETUP_TYPE = setuptools
+PYTHON_DBUS_FAST_SETUP_TYPE = pep517
PYTHON_DBUS_FAST_LICENSE = MIT
PYTHON_DBUS_FAST_LICENSE_FILES = LICENSE
PYTHON_DBUS_FAST_ENV = REQUIRE_CYTHON=1
-PYTHON_DBUS_FAST_DEPENDENCIES = host-python-cython
+PYTHON_DBUS_FAST_DEPENDENCIES = \
+ host-python-cython \
+ host-python-poetry-core \
+ host-python-setuptools
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 03/18] package/python-dnspython: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 02/18] package/python-dbus-fast: migrate to poetry core pep517 build backend James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 04/18] package/python-flask-babel: " James Hilliard
` (15 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate python-dnspython to the pep517 poetry-core backend
as setuptools is not supported when building with a pep517 frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-dnspython/python-dnspython.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/python-dnspython/python-dnspython.mk b/package/python-dnspython/python-dnspython.mk
index 1459ec8881..f0df733143 100644
--- a/package/python-dnspython/python-dnspython.mk
+++ b/package/python-dnspython/python-dnspython.mk
@@ -9,9 +9,9 @@ PYTHON_DNSPYTHON_SOURCE = dnspython-$(PYTHON_DNSPYTHON_VERSION).tar.gz
PYTHON_DNSPYTHON_SITE = https://files.pythonhosted.org/packages/65/2d/372a20e52a87b2ba0160997575809806111a72e18aa92738daccceb8d2b9
PYTHON_DNSPYTHON_LICENSE = ISC
PYTHON_DNSPYTHON_LICENSE_FILES = LICENSE
-PYTHON_DNSPYTHON_SETUP_TYPE = setuptools
-PYTHON_DNSPYTHON_DEPENDENCIES = host-python-setuptools-scm
-HOST_PYTHON_DNSPYTHON_DEPENDENCIES = host-python-setuptools-scm
+PYTHON_DNSPYTHON_SETUP_TYPE = pep517
+PYTHON_DNSPYTHON_DEPENDENCIES = host-python-poetry-core
+HOST_PYTHON_DNSPYTHON_DEPENDENCIES = host-python-poetry-core
$(eval $(python-package))
$(eval $(host-python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 04/18] package/python-flask-babel: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 02/18] package/python-dbus-fast: migrate to poetry core pep517 build backend James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 03/18] package/python-dnspython: " James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 05/18] package/python-flask-wtf: migrate to hatching " James Hilliard
` (14 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate python-flask-babel to the pep517 poetry-core
backend as setuptools is not supported when building with a pep517
frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-flask-babel/python-flask-babel.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/python-flask-babel/python-flask-babel.mk b/package/python-flask-babel/python-flask-babel.mk
index b3ecdf6cf6..3970a14db1 100644
--- a/package/python-flask-babel/python-flask-babel.mk
+++ b/package/python-flask-babel/python-flask-babel.mk
@@ -8,7 +8,8 @@ PYTHON_FLASK_BABEL_VERSION = 4.0.0
PYTHON_FLASK_BABEL_SOURCE = flask_babel-$(PYTHON_FLASK_BABEL_VERSION).tar.gz
PYTHON_FLASK_BABEL_SITE = https://files.pythonhosted.org/packages/58/1a/4c65e3b90bda699a637bfb7fb96818b0a9bbff7636ea91aade67f6020a31
PYTHON_FLASK_BABEL_LICENSE = BSD-3-Clause
-PYTHON_FLASK_BABEL_SETUP_TYPE = setuptools
+PYTHON_FLASK_BABEL_SETUP_TYPE = pep517
PYTHON_FLASK_BABEL_LICENSE_FILES = LICENSE
+PYTHON_FLASK_BABEL_DEPENDENCIES = host-python-poetry-core
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 05/18] package/python-flask-wtf: migrate to hatching pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (2 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 04/18] package/python-flask-babel: " James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 06/18] package/python-expandvars: new host package James Hilliard
` (13 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
When building with a pep517 frontend we need to use the specified
build backend as opposed to the fallback setuptools build which
only works when not building with a pep517 frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
hatchling and not setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-flask-wtf/python-flask-wtf.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/python-flask-wtf/python-flask-wtf.mk b/package/python-flask-wtf/python-flask-wtf.mk
index 8274585ad3..bb32d55e25 100644
--- a/package/python-flask-wtf/python-flask-wtf.mk
+++ b/package/python-flask-wtf/python-flask-wtf.mk
@@ -9,6 +9,7 @@ PYTHON_FLASK_WTF_SOURCE = flask_wtf-$(PYTHON_FLASK_WTF_VERSION).tar.gz
PYTHON_FLASK_WTF_SITE = https://files.pythonhosted.org/packages/9b/ef/b6ec35e02f479f6e76e02ede14594c9cfa5e6dcbab6ea0e82fa413993a2a
PYTHON_FLASK_WTF_LICENSE = BSD-3-Clause
PYTHON_FLASK_WTF_LICENSE_FILES = LICENSE.rst
-PYTHON_FLASK_WTF_SETUP_TYPE = setuptools
+PYTHON_FLASK_WTF_SETUP_TYPE = pep517
+PYTHON_FLASK_WTF_DEPENDENCIES = host-python-hatchling
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 06/18] package/python-expandvars: new host package
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (3 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 05/18] package/python-flask-wtf: migrate to hatching " James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 07/18] package/python-frozenlist: migrate to in-tree pep517 build backend James Hilliard
` (12 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-expandvars/python-expandvars.hash | 5 +++++
package/python-expandvars/python-expandvars.mk | 15 +++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 package/python-expandvars/python-expandvars.hash
create mode 100644 package/python-expandvars/python-expandvars.mk
diff --git a/package/python-expandvars/python-expandvars.hash b/package/python-expandvars/python-expandvars.hash
new file mode 100644
index 0000000000..0123ed5420
--- /dev/null
+++ b/package/python-expandvars/python-expandvars.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/expandvars/json
+md5 8091f578a547e2b4b9df59100a179266 expandvars-0.12.0.tar.gz
+sha256 7d1adfa55728cf4b5d812ece3d087703faea953e0c0a1a78415de9df5024d844 expandvars-0.12.0.tar.gz
+# Locally computed sha256 checksums
+sha256 b8a43c35080fc5855e4f8171e4d0d002f6ff1633d8cfc0b5dee0ac4ced2deac7 LICENSE
diff --git a/package/python-expandvars/python-expandvars.mk b/package/python-expandvars/python-expandvars.mk
new file mode 100644
index 0000000000..5c9a7249b3
--- /dev/null
+++ b/package/python-expandvars/python-expandvars.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-expandvars
+#
+################################################################################
+
+PYTHON_EXPANDVARS_VERSION = 0.12.0
+PYTHON_EXPANDVARS_SOURCE = expandvars-$(PYTHON_EXPANDVARS_VERSION).tar.gz
+PYTHON_EXPANDVARS_SITE = https://files.pythonhosted.org/packages/2b/a5/46d1f58edcae1d632fafdfee313e378240e002ae45d26502bac938bd8751
+PYTHON_EXPANDVARS_SETUP_TYPE = pep517
+PYTHON_EXPANDVARS_LICENSE = MIT
+PYTHON_EXPANDVARS_LICENSE_FILES = LICENSE
+HOST_PYTHON_EXPANDVARS_DEPENDENCIES = host-python-hatchling
+
+$(eval $(host-python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 07/18] package/python-frozenlist: migrate to in-tree pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (4 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 06/18] package/python-expandvars: new host package James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-04-01 18:54 ` Arnout Vandecappelle via buildroot
2024-03-31 0:41 ` [Buildroot] [PATCH v9 08/18] package/python-humanize: add setuptools-scm build dependency James Hilliard
` (11 subsequent siblings)
17 siblings, 1 reply; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
When building with a pep517 frontend we need to use the specified
build backend as opposed to the fallback setuptools build which
only works when not building with a pep517 frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
hatchling and not setuptools.
The custom in tree backend depends on setuptools and expandvars,
additionally it depends on cython 3 unless disabled.
As we do not currently support cython 3 lets use the pure python
build instead.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-frozenlist/python-frozenlist.mk | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/package/python-frozenlist/python-frozenlist.mk b/package/python-frozenlist/python-frozenlist.mk
index 9333598808..92670b3cbd 100644
--- a/package/python-frozenlist/python-frozenlist.mk
+++ b/package/python-frozenlist/python-frozenlist.mk
@@ -7,8 +7,12 @@
PYTHON_FROZENLIST_VERSION = 1.4.1
PYTHON_FROZENLIST_SOURCE = frozenlist-$(PYTHON_FROZENLIST_VERSION).tar.gz
PYTHON_FROZENLIST_SITE = https://files.pythonhosted.org/packages/cf/3d/2102257e7acad73efc4a0c306ad3953f68c504c16982bbdfee3ad75d8085
-PYTHON_FROZENLIST_SETUP_TYPE = setuptools
+PYTHON_FROZENLIST_SETUP_TYPE = pep517
PYTHON_FROZENLIST_LICENSE = Apache-2.0
PYTHON_FROZENLIST_LICENSE_FILES = LICENSE
+PYTHON_FROZENLIST_DEPENDENCIES = \
+ host-python-expandvars \
+ host-python-setuptools
+PYTHON_FROZENLIST_BUILD_OPTS = -C=pure-python=true
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* Re: [Buildroot] [PATCH v9 07/18] package/python-frozenlist: migrate to in-tree pep517 build backend
2024-03-31 0:41 ` [Buildroot] [PATCH v9 07/18] package/python-frozenlist: migrate to in-tree pep517 build backend James Hilliard
@ 2024-04-01 18:54 ` Arnout Vandecappelle via buildroot
0 siblings, 0 replies; 22+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-04-01 18:54 UTC (permalink / raw)
To: James Hilliard, buildroot
Cc: Louis Aussedat, Gustavo Heinz, Raphaël Mélotte,
Jugurtha BELKALEM, Gwenhael Goavec-Merou, Asaf Kahlon,
Wojciech M . Zabolotny, Joris Offouga, Angelo Compagnucci,
Marcin Niestroj, Attila Wagner, Thomas Petazzoni, Lionel Flandrin,
Giulio Benetti, Mauro Condarelli, Christian Kellermann
On 31/03/2024 01:41, James Hilliard wrote:
> When building with a pep517 frontend we need to use the specified
> build backend as opposed to the fallback setuptools build which
> only works when not building with a pep517 frontend.
>
> This package currently builds using setuptools as we do not yet
> use setuptools with a pep517 build frontend. The package contains
> a setuptools fallback which only can be used when using setuptools
> without a pep517 frontend as the pep517 frontend will only use the
> build backend specified in the package pyproject.toml which is
> hatchling and not setuptools.
I guess this should have been "custom backend" rather than hatchling. I
corrected it like that.
>
> The custom in tree backend depends on setuptools and expandvars,
> additionally it depends on cython 3 unless disabled.
>
> As we do not currently support cython 3 lets use the pure python
> build instead.
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> package/python-frozenlist/python-frozenlist.mk | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/package/python-frozenlist/python-frozenlist.mk b/package/python-frozenlist/python-frozenlist.mk
> index 9333598808..92670b3cbd 100644
> --- a/package/python-frozenlist/python-frozenlist.mk
> +++ b/package/python-frozenlist/python-frozenlist.mk
> @@ -7,8 +7,12 @@
> PYTHON_FROZENLIST_VERSION = 1.4.1
> PYTHON_FROZENLIST_SOURCE = frozenlist-$(PYTHON_FROZENLIST_VERSION).tar.gz
> PYTHON_FROZENLIST_SITE = https://files.pythonhosted.org/packages/cf/3d/2102257e7acad73efc4a0c306ad3953f68c504c16982bbdfee3ad75d8085
> -PYTHON_FROZENLIST_SETUP_TYPE = setuptools
> +PYTHON_FROZENLIST_SETUP_TYPE = pep517
> PYTHON_FROZENLIST_LICENSE = Apache-2.0
> PYTHON_FROZENLIST_LICENSE_FILES = LICENSE
> +PYTHON_FROZENLIST_DEPENDENCIES = \
> + host-python-expandvars \
> + host-python-setuptools
> +PYTHON_FROZENLIST_BUILD_OPTS = -C=pure-python=true
I added a comment here explaining that C code generation requires Cython 3.
Regards,
Arnout
>
> $(eval $(python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH v9 08/18] package/python-humanize: add setuptools-scm build dependency
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (5 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 07/18] package/python-frozenlist: migrate to in-tree pep517 build backend James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 09/18] package/python-iso8601: migrate to poetry core pep517 build backend James Hilliard
` (10 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
The host-python-setuptools-scm will be enforced once we migrate
setuptools to use a pep517 build frontend.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-humanize/python-humanize.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/python-humanize/python-humanize.mk b/package/python-humanize/python-humanize.mk
index 04cb0713fc..6155954b82 100644
--- a/package/python-humanize/python-humanize.mk
+++ b/package/python-humanize/python-humanize.mk
@@ -10,5 +10,6 @@ PYTHON_HUMANIZE_SITE = https://files.pythonhosted.org/packages/51/19/3e1adf0e7a8
PYTHON_HUMANIZE_SETUP_TYPE = setuptools
PYTHON_HUMANIZE_LICENSE = MIT
PYTHON_HUMANIZE_LICENSE_FILES = LICENCE
+PYTHON_HUMANIZE_DEPENDENCIES = host-python-setuptools-scm
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 09/18] package/python-iso8601: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (6 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 08/18] package/python-humanize: add setuptools-scm build dependency James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 10/18] package/python-cppy: add setuptools-scm build dependency James Hilliard
` (9 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate python-iso8601 to the pep517 poetry-core
backend as setuptools is not supported when building with a pep517
frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-iso8601/python-iso8601.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/python-iso8601/python-iso8601.mk b/package/python-iso8601/python-iso8601.mk
index ce25a2fb28..080daa4693 100644
--- a/package/python-iso8601/python-iso8601.mk
+++ b/package/python-iso8601/python-iso8601.mk
@@ -7,8 +7,9 @@
PYTHON_ISO8601_VERSION = 2.1.0
PYTHON_ISO8601_SOURCE = iso8601-$(PYTHON_ISO8601_VERSION).tar.gz
PYTHON_ISO8601_SITE = https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15
-PYTHON_ISO8601_SETUP_TYPE = setuptools
+PYTHON_ISO8601_SETUP_TYPE = pep517
PYTHON_ISO8601_LICENSE = MIT
PYTHON_ISO8601_LICENSE_FILES = LICENSE
+PYTHON_ISO8601_DEPENDENCIES = host-python-poetry-core
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 10/18] package/python-cppy: add setuptools-scm build dependency
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (7 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 09/18] package/python-iso8601: migrate to poetry core pep517 build backend James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 11/18] package/python-pylibftdi: migrate to poetry core pep517 build backend James Hilliard
` (8 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
The host-python-setuptools-scm dependency needs to be added
prior to migrating setuptools to pep517 as this dependency
is listed as a build requirement in the pyproject.toml.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-cppy/python-cppy.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/python-cppy/python-cppy.mk b/package/python-cppy/python-cppy.mk
index adadc352d3..5bfd5a0f16 100644
--- a/package/python-cppy/python-cppy.mk
+++ b/package/python-cppy/python-cppy.mk
@@ -10,5 +10,6 @@ PYTHON_CPPY_SITE = https://files.pythonhosted.org/packages/c5/7e/6cc5acd93752ee5
PYTHON_CPPY_LICENSE = BSD-3-Clause
PYTHON_CPPY_LICENSE_FILES = LICENSE
PYTHON_CPPY_SETUP_TYPE = setuptools
+HOST_PYTHON_CPPY_DEPENDENCIES = host-python-setuptools-scm
$(eval $(host-python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 11/18] package/python-pylibftdi: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (8 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 10/18] package/python-cppy: add setuptools-scm build dependency James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 12/18] package/python-sip: add missing setuptools dependency James Hilliard
` (7 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate python-pylibftdi to the pep517 poetry-core
backend as setuptools is not supported when building with a pep517
frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-pylibftdi/python-pylibftdi.mk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/package/python-pylibftdi/python-pylibftdi.mk b/package/python-pylibftdi/python-pylibftdi.mk
index 7dca37e416..7607c90d4a 100644
--- a/package/python-pylibftdi/python-pylibftdi.mk
+++ b/package/python-pylibftdi/python-pylibftdi.mk
@@ -9,7 +9,9 @@ PYTHON_PYLIBFTDI_SOURCE = pylibftdi-$(PYTHON_PYLIBFTDI_VERSION).tar.gz
PYTHON_PYLIBFTDI_SITE = https://files.pythonhosted.org/packages/d2/ce/ff3e83f3a14eb5b7950ff3657f07cdc3033dd0ded5c8ed093db515e1de33
PYTHON_PYLIBFTDI_LICENSE = MIT
PYTHON_PYLIBFTDI_LICENSE_FILES = LICENSE.txt
-PYTHON_PYLIBFTDI_DEPENDENCIES = libftdi
-PYTHON_PYLIBFTDI_SETUP_TYPE = setuptools
+PYTHON_PYLIBFTDI_SETUP_TYPE = pep517
+PYTHON_PYLIBFTDI_DEPENDENCIES = \
+ host-python-poetry-core \
+ libftdi
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 12/18] package/python-sip: add missing setuptools dependency
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (9 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 11/18] package/python-pylibftdi: migrate to poetry core pep517 build backend James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 13/18] package/python-rsa: migrate to poetry core pep517 build backend James Hilliard
` (6 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
The python-sip package requires distutils which is no longer included
with python but is now part of setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-sip/python-sip.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/python-sip/python-sip.mk b/package/python-sip/python-sip.mk
index 3e015fa16c..392928f01e 100644
--- a/package/python-sip/python-sip.mk
+++ b/package/python-sip/python-sip.mk
@@ -9,8 +9,8 @@ PYTHON_SIP_SOURCE = sip-$(PYTHON_SIP_VERSION).tar.gz
PYTHON_SIP_SITE = https://www.riverbankcomputing.com/static/Downloads/sip/$(PYTHON_SIP_VERSION)
PYTHON_SIP_LICENSE = SIP license or GPL-2.0 or GPL-3.0
PYTHON_SIP_LICENSE_FILES = LICENSE LICENSE-GPL2 LICENSE-GPL3
-PYTHON_SIP_DEPENDENCIES = python3 qt5base
-HOST_PYTHON_SIP_DEPENDENCIES = host-python3
+PYTHON_SIP_DEPENDENCIES = host-python-setuptools python3 qt5base
+HOST_PYTHON_SIP_DEPENDENCIES = host-python3 host-python-setuptools
define HOST_PYTHON_SIP_CONFIGURE_CMDS
(cd $(@D); \
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 13/18] package/python-rsa: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (10 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 12/18] package/python-sip: add missing setuptools dependency James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 14/18] package/python-sh: " James Hilliard
` (5 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate python-rsa to the pep517 poetry-core
backend as setuptools is not supported when building with a pep517
frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-rsa/python-rsa.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/python-rsa/python-rsa.mk b/package/python-rsa/python-rsa.mk
index d84ba8b431..69a6309b19 100644
--- a/package/python-rsa/python-rsa.mk
+++ b/package/python-rsa/python-rsa.mk
@@ -7,9 +7,10 @@
PYTHON_RSA_VERSION = 4.9
PYTHON_RSA_SOURCE = rsa-$(PYTHON_RSA_VERSION).tar.gz
PYTHON_RSA_SITE = https://files.pythonhosted.org/packages/aa/65/7d973b89c4d2351d7fb232c2e452547ddfa243e93131e7cfa766da627b52
-PYTHON_RSA_SETUP_TYPE = setuptools
+PYTHON_RSA_SETUP_TYPE = pep517
PYTHON_RSA_LICENSE = Apache-2.0
PYTHON_RSA_LICENSE_FILES = LICENSE
PYTHON_RSA_CPE_ID_VALID = YES
+PYTHON_RSA_DEPENDENCIES = host-python-poetry-core
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 14/18] package/python-sh: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (11 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 13/18] package/python-rsa: migrate to poetry core pep517 build backend James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 15/18] package/python-simplelogging: " James Hilliard
` (4 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate python-sh to the pep517 poetry-core
backend as setuptools is not supported when building with a pep517
frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-sh/python-sh.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/python-sh/python-sh.mk b/package/python-sh/python-sh.mk
index af4da3f6c9..29843d645b 100644
--- a/package/python-sh/python-sh.mk
+++ b/package/python-sh/python-sh.mk
@@ -7,8 +7,9 @@
PYTHON_SH_VERSION = 2.0.6
PYTHON_SH_SOURCE = sh-$(PYTHON_SH_VERSION).tar.gz
PYTHON_SH_SITE = https://files.pythonhosted.org/packages/cd/51/7355831d8e1cee8348157d769ccda8a31ca9fa0548e7f93d87837d83866d
-PYTHON_SH_SETUP_TYPE = setuptools
+PYTHON_SH_SETUP_TYPE = pep517
PYTHON_SH_LICENSE = MIT
PYTHON_SH_LICENSE_FILES = LICENSE.txt
+PYTHON_SH_DEPENDENCIES = host-python-poetry-core
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 15/18] package/python-simplelogging: migrate to poetry core pep517 build backend
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (12 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 14/18] package/python-sh: " James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 16/18] package/python-pyzmq: add cython for python-pyzmq James Hilliard
` (3 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
We need to migrate package/python-simplelogging to the pep517
poetry-core backend as setuptools is not supported when building
with a pep517 frontend.
This package currently builds using setuptools as we do not yet
use setuptools with a pep517 build frontend. The package contains
a setuptools fallback which only can be used when using setuptools
without a pep517 frontend as the pep517 frontend will only use the
build backend specified in the package pyproject.toml which is
poetry-core and not setuptools.
We also need to add a patch which switches from poetry to poetry
core as we do not support the full poetry package.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
...-Switch-build-backend-to-poetry-core.patch | 31 +++++++++++++++++++
.../python-simplelogging.mk | 3 +-
2 files changed, 33 insertions(+), 1 deletion(-)
create mode 100644 package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch
diff --git a/package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch b/package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch
new file mode 100644
index 0000000000..2c345fe268
--- /dev/null
+++ b/package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch
@@ -0,0 +1,31 @@
+From 76c1c545bad28f592405ca1e5bcf6081051c946a Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+Date: Tue, 13 Feb 2024 13:37:00 -0700
+Subject: [PATCH] Switch build-backend to poetry-core
+
+poetry-core is the lightweight counterpart of poetry that is intended
+to be used as a build-backend. Unlike poetry, it does not require
+installing all the dependencies of the package manager, making
+the builds much faster. The generated artifacts are the same.
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+Upstream: https://github.com/vpoulailleau/simplelogging/pull/230
+---
+ pyproject.toml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index a89ab64..79403cb 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -55,5 +55,5 @@ commands =
+ """
+
+ [build-system]
+-requires = ["poetry>=0.12"]
+-build-backend = "poetry.masonry.api"
++requires = ["poetry-core>=1.0.0"]
++build-backend = "poetry.core.masonry.api"
+--
+2.34.1
+
diff --git a/package/python-simplelogging/python-simplelogging.mk b/package/python-simplelogging/python-simplelogging.mk
index 556628613b..dbd9ce3ae3 100644
--- a/package/python-simplelogging/python-simplelogging.mk
+++ b/package/python-simplelogging/python-simplelogging.mk
@@ -7,8 +7,9 @@
PYTHON_SIMPLELOGGING_VERSION = 0.11.0
PYTHON_SIMPLELOGGING_SOURCE = simplelogging-$(PYTHON_SIMPLELOGGING_VERSION).tar.gz
PYTHON_SIMPLELOGGING_SITE = https://files.pythonhosted.org/packages/73/d6/4c06aa7f2c3b9fc09429a1196fd357357cc555de5e16c09b2d12e9db1ebb
-PYTHON_SIMPLELOGGING_SETUP_TYPE = setuptools
+PYTHON_SIMPLELOGGING_SETUP_TYPE = pep517
PYTHON_SIMPLELOGGING_LICENSE = BSD-3-Clause
PYTHON_SIMPLELOGGING_LICENSE_FILES = LICENSE
+PYTHON_SIMPLELOGGING_DEPENDENCIES = host-python-poetry-core
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 16/18] package/python-pyzmq: add cython for python-pyzmq
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (13 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 15/18] package/python-simplelogging: " James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 17/18] package/python-setuptools: bump to version 69.2.0 James Hilliard
` (2 subsequent siblings)
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
When migrating to setuptools with pep517 support we need to add
host-python-cython which is a pep517 build dependency for
python-pyzmq.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-pyzmq/python-pyzmq.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/python-pyzmq/python-pyzmq.mk b/package/python-pyzmq/python-pyzmq.mk
index 1d9a7d01cb..f1444b9124 100644
--- a/package/python-pyzmq/python-pyzmq.mk
+++ b/package/python-pyzmq/python-pyzmq.mk
@@ -13,6 +13,7 @@ PYTHON_PYZMQ_LICENSE_FILES = LICENSE.LESSER LICENSE.BSD
PYTHON_PYZMQ_SETUP_TYPE = setuptools
PYTHON_PYZMQ_BUILD_OPTS = --zmq=$(STAGING_DIR)/usr
PYTHON_PYZMQ_DEPENDENCIES = \
+ host-python-cython \
host-python-packaging \
host-python-setuptools-scm \
zeromq
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 17/18] package/python-setuptools: bump to version 69.2.0
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (14 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 16/18] package/python-pyzmq: add cython for python-pyzmq James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-03-31 0:41 ` [Buildroot] [PATCH v9 18/18] package/pkg-python.mk: migrate setuptools to pep517 James Hilliard
2024-04-01 20:12 ` [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency Arnout Vandecappelle via buildroot
17 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/python-setuptools/python-setuptools.hash | 4 ++--
package/python-setuptools/python-setuptools.mk | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/python-setuptools/python-setuptools.hash b/package/python-setuptools/python-setuptools.hash
index 7f13ac3896..123c9a1455 100644
--- a/package/python-setuptools/python-setuptools.hash
+++ b/package/python-setuptools/python-setuptools.hash
@@ -1,5 +1,5 @@
# md5, sha256 from https://pypi.org/pypi/setuptools/json
-md5 b82de45aaa6b9bb911226660212ebb83 setuptools-69.0.3.tar.gz
-sha256 be1af57fc409f93647f2e8e4573a142ed38724b8cdd389706a867bb4efcf1e78 setuptools-69.0.3.tar.gz
+md5 940ffdb3a2ce4f6a5ee80032aa115fc7 setuptools-69.2.0.tar.gz
+sha256 0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e setuptools-69.2.0.tar.gz
# Locally computed sha256 checksums
sha256 86da0f01aeae46348a3c3d465195dc1ceccde79f79e87769a64b8da04b2a4741 LICENSE
diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk
index 0aea3c6cfa..afc7348eb2 100644
--- a/package/python-setuptools/python-setuptools.mk
+++ b/package/python-setuptools/python-setuptools.mk
@@ -4,9 +4,9 @@
#
################################################################################
-PYTHON_SETUPTOOLS_VERSION = 69.0.3
+PYTHON_SETUPTOOLS_VERSION = 69.2.0
PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).tar.gz
-PYTHON_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/fc/c9/b146ca195403e0182a374e0ea4dbc69136bad3cd55bc293df496d625d0f7
+PYTHON_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/4d/5b/dc575711b6b8f2f866131a40d053e30e962e633b332acf7cd2c24843d83d
PYTHON_SETUPTOOLS_LICENSE = MIT
PYTHON_SETUPTOOLS_LICENSE_FILES = LICENSE
PYTHON_SETUPTOOLS_CPE_ID_VENDOR = python
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* [Buildroot] [PATCH v9 18/18] package/pkg-python.mk: migrate setuptools to pep517
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (15 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 17/18] package/python-setuptools: bump to version 69.2.0 James Hilliard
@ 2024-03-31 0:41 ` James Hilliard
2024-04-01 20:11 ` Arnout Vandecappelle via buildroot
2024-04-01 20:12 ` [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency Arnout Vandecappelle via buildroot
17 siblings, 1 reply; 22+ messages in thread
From: James Hilliard @ 2024-03-31 0:41 UTC (permalink / raw)
To: buildroot
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Gwenhael Goavec-Merou, Louis Aussedat,
Angelo Compagnucci, Asaf Kahlon, Wojciech M . Zabolotny,
Joris Offouga, James Hilliard, Marcin Niestroj,
Christian Kellermann, Thomas Petazzoni, Giulio Benetti,
Mauro Condarelli, Lionel Flandrin
Now that setuptools and its dependencies are using pep517 we can
migrate the setuptools infrastructure itself to use the pep517
build frontend.
As part of this we need to migrate the all python packages using
_BUILD_OPTS to the new config settings format used by the pep517
build frontend.
We need to use a setup.cfg file to pass the pg_config path when
building python-psycopg2 as this package needs the pg_config
path for all internal build stages while -C--build-option= only
passes the flag to the internal bdist_wheel stage.
Use new setup type variables to define setup type specific
dependencies instead of using the conditional block.
We also need to set --skip-dependency-check for the following
packages which specify build dependencies that are not actually
required:
- python-lxml
- python-matplotlib
- python-msgpack
- python-pymupdf
- python-uvloop
- python-wsaccel
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
---
Changes v8 -> v9:
- use setup.cfg for python-psycopg2 to pass pg_config path
Changes v7 -> v8:
- disable dependency enforcement for more packages
Changes v6 -> v7:
- just disable dependency enforcement for msgpack
- rebase
Changes v5 -> v6:
- use setup type variables for dependencies
Changes v4 -> v5:
- rebase on next
Changes v1 -> v3:
- rebase on master
- combine setuptools-rust and maturin env variables
- drop patch which is now upstream
---
package/pkg-python.mk | 160 +++++++++---------
package/python-evdev/python-evdev.mk | 4 +-
package/python-lxml/python-lxml.mk | 10 +-
package/python-m2crypto/python-m2crypto.mk | 4 +-
.../python-matplotlib/python-matplotlib.mk | 1 +
package/python-msgpack/python-msgpack.mk | 1 +
package/python-pillow/python-pillow.mk | 35 ++--
package/python-psycopg2/python-psycopg2.mk | 7 +-
package/python-pymupdf/python-pymupdf.mk | 1 +
package/python-pyzmq/python-pyzmq.mk | 4 +-
package/python-uvloop/python-uvloop.mk | 7 +-
package/python-wsaccel/python-wsaccel.mk | 1 +
12 files changed, 122 insertions(+), 113 deletions(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 94f28ff841..839f728e2f 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -52,15 +52,62 @@ HOST_PKG_PYTHON_ENV = \
PYTHONNOUSERSITE=1 \
$(HOST_CONFIGURE_OPTS)
-# Target setuptools-based packages
-PKG_PYTHON_SETUPTOOLS_ENV = \
+# Target pep517-based packages
+PKG_PYTHON_PEP517_ENV = \
$(PKG_PYTHON_ENV)
-PKG_PYTHON_SETUPTOOLS_CMD = \
- $(if $(wildcard $($(PKG)_BUILDDIR)/setup.py),setup.py,-c 'from setuptools import setup;setup()')
+PKG_PYTHON_PEP517_BUILD_CMD = \
+ -m build -n -w
+
+PKG_PYTHON_PEP517_INSTALL_OPTS = \
+ --interpreter=/usr/bin/python \
+ --script-kind=posix
+
+PKG_PYTHON_PEP517_INSTALL_TARGET_CMD = \
+ $(TOPDIR)/support/scripts/pyinstaller.py \
+ dist/* \
+ $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
+ --purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+ --headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
+ --scripts=$(TARGET_DIR)/usr/bin \
+ --data=$(TARGET_DIR)/usr
+
+PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \
+ $(TOPDIR)/support/scripts/pyinstaller.py \
+ dist/* \
+ $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
+ --purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+ --headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
+ --scripts=$(STAGING_DIR)/usr/bin \
+ --data=$(STAGING_DIR)/usr
+
+PKG_PYTHON_PEP517_DEPENDENCIES = \
+ host-python-pypa-build \
+ host-python-installer
+
+# Host pep517-based packages
+HOST_PKG_PYTHON_PEP517_ENV = \
+ $(HOST_PKG_PYTHON_ENV)
+
+HOST_PKG_PYTHON_PEP517_BUILD_CMD = \
+ -m build -n -w
+
+HOST_PKG_PYTHON_PEP517_INSTALL_CMD = \
+ $(TOPDIR)/support/scripts/pyinstaller.py \
+ dist/* \
+ --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)
+
+# Target setuptools-based packages
+PKG_PYTHON_SETUPTOOLS_ENV = \
+ $(PKG_PYTHON_PEP517_ENV)
PKG_PYTHON_SETUPTOOLS_BUILD_CMD = \
- $(PKG_PYTHON_SETUPTOOLS_CMD) build
+ $(PKG_PYTHON_PEP517_BUILD_CMD)
PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
--install-headers=/usr/include/python$(PYTHON3_VERSION_MAJOR) \
@@ -69,30 +116,24 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
--single-version-externally-managed
PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_CMD = \
- $(PKG_PYTHON_SETUPTOOLS_CMD) \
- install --no-compile \
- $(PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) \
- --root=$(TARGET_DIR)
+ $(PKG_PYTHON_PEP517_INSTALL_TARGET_CMD)
PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_CMD = \
- $(PKG_PYTHON_SETUPTOOLS_CMD) \
- install \
- $(PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) \
- --root=$(STAGING_DIR)
+ $(PKG_PYTHON_PEP517_INSTALL_STAGING_CMD)
+
+PKG_PYTHON_SETUPTOOLS_DEPENDENCIES = \
+ $(PKG_PYTHON_PEP517_DEPENDENCIES) \
+ host-python-setuptools
# Host setuptools-based packages
HOST_PKG_PYTHON_SETUPTOOLS_ENV = \
- $(HOST_PKG_PYTHON_ENV)
+ $(HOST_PKG_PYTHON_PEP517_ENV)
HOST_PKG_PYTHON_SETUPTOOLS_BUILD_CMD = \
- $(PKG_PYTHON_SETUPTOOLS_CMD) build
+ $(HOST_PKG_PYTHON_PEP517_BUILD_CMD)
HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_CMD = \
- $(PKG_PYTHON_SETUPTOOLS_CMD) \
- install \
- --prefix=$(HOST_DIR) \
- --root=/ \
- --single-version-externally-managed
+ $(HOST_PKG_PYTHON_PEP517_INSTALL_CMD)
# Target setuptools-rust-based packages
PKG_PYTHON_SETUPTOOLS_RUST_ENV = \
@@ -109,6 +150,10 @@ PKG_PYTHON_SETUPTOOLS_RUST_INSTALL_TARGET_CMD = \
PKG_PYTHON_SETUPTOOLS_RUST_INSTALL_STAGING_CMD = \
$(PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_CMD)
+PKG_PYTHON_SETUPTOOLS_RUST_DEPENDENCIES = \
+ $(PKG_PYTHON_SETUPTOOLS_DEPENDENCIES) \
+ host-python-setuptools-rust
+
# Host setuptools-rust-based packages
HOST_PKG_PYTHON_SETUPTOOLS_RUST_ENV = \
$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \
@@ -121,52 +166,6 @@ HOST_PKG_PYTHON_SETUPTOOLS_RUST_BUILD_CMD = \
HOST_PKG_PYTHON_SETUPTOOLS_RUST_INSTALL_CMD = \
$(HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_CMD)
-# Target pep517-based packages
-PKG_PYTHON_PEP517_ENV = \
- $(PKG_PYTHON_ENV)
-
-PKG_PYTHON_PEP517_BUILD_CMD = \
- -m build -n -w
-
-PKG_PYTHON_PEP517_INSTALL_OPTS = \
- --interpreter=/usr/bin/python \
- --script-kind=posix
-
-PKG_PYTHON_PEP517_INSTALL_TARGET_CMD = \
- $(TOPDIR)/support/scripts/pyinstaller.py \
- dist/* \
- $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
- --purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
- --headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
- --scripts=$(TARGET_DIR)/usr/bin \
- --data=$(TARGET_DIR)/usr
-
-PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \
- $(TOPDIR)/support/scripts/pyinstaller.py \
- dist/* \
- $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
- --purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
- --headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
- --scripts=$(STAGING_DIR)/usr/bin \
- --data=$(STAGING_DIR)/usr
-
-# Host pep517-based packages
-HOST_PKG_PYTHON_PEP517_ENV = \
- $(HOST_PKG_PYTHON_ENV)
-
-HOST_PKG_PYTHON_PEP517_BUILD_CMD = \
- -m build -n -w
-
-HOST_PKG_PYTHON_PEP517_INSTALL_CMD = \
- $(TOPDIR)/support/scripts/pyinstaller.py \
- dist/* \
- --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)
-
# Target flit packages
PKG_PYTHON_FLIT_ENV = \
$(PKG_PYTHON_PEP517_ENV)
@@ -180,6 +179,10 @@ PKG_PYTHON_FLIT_INSTALL_TARGET_CMD = \
PKG_PYTHON_FLIT_INSTALL_STAGING_CMD = \
$(PKG_PYTHON_PEP517_INSTALL_STAGING_CMD)
+PKG_PYTHON_FLIT_DEPENDENCIES = \
+ $(PKG_PYTHON_PEP517_DEPENDENCIES) \
+ host-python-flit-core
+
# Host flit packages
HOST_PKG_PYTHON_FLIT_ENV = \
$(HOST_PKG_PYTHON_PEP517_ENV)
@@ -215,6 +218,10 @@ PKG_PYTHON_MATURIN_INSTALL_TARGET_CMD = \
PKG_PYTHON_MATURIN_INSTALL_STAGING_CMD = \
$(PKG_PYTHON_PEP517_INSTALL_STAGING_CMD)
+PKG_PYTHON_MATURIN_DEPENDENCIES = \
+ $(PKG_PYTHON_PEP517_DEPENDENCIES) \
+ host-python-maturin
+
# Host maturin packages
HOST_PKG_PYTHON_MATURIN_ENV = \
$(HOST_PKG_PYTHON_PEP517_ENV) \
@@ -293,28 +300,17 @@ else
$(2)_DEPENDENCIES += host-python3
endif # ($(4),target)
-# Setuptools based packages will need setuptools for the host Python
-# interpreter (both host and target).
+# Setup type specific dependencies are the same whether we are
+# building for the host or the target.
#
-ifneq ($$(filter setuptools setuptools-rust,$$($(2)_SETUP_TYPE)),)
-$(2)_DEPENDENCIES += host-python-setuptools
-ifeq ($$($(2)_SETUP_TYPE),setuptools-rust)
-$(2)_DEPENDENCIES += host-python-setuptools-rust
-endif
-else ifneq ($$(filter flit maturin pep517,$$($(2)_SETUP_TYPE)),)
-$(2)_DEPENDENCIES += host-python-pypa-build host-python-installer
-ifeq ($$($(2)_SETUP_TYPE),flit)
-$(2)_DEPENDENCIES += host-python-flit-core
-endif
-ifeq ($$($(2)_SETUP_TYPE),maturin)
-$(2)_DEPENDENCIES += host-python-maturin
-endif
-else ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
+ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
# Don't add dependency on host-python-installer for
# host-python-installer itself, and its dependencies.
ifeq ($$(filter host-python-flit-core host-python-installer,$(1)),)
$(2)_DEPENDENCIES += host-python-installer
endif
+else
+$(2)_DEPENDENCIES += $$(PKG_PYTHON_$$($(2)_SETUP_TYPE_UPPER)_DEPENDENCIES)
endif
# Pyo3 based packages(setuptools-rust and maturin) will need rust
diff --git a/package/python-evdev/python-evdev.mk b/package/python-evdev/python-evdev.mk
index 5cf62b5160..b509b43e8a 100644
--- a/package/python-evdev/python-evdev.mk
+++ b/package/python-evdev/python-evdev.mk
@@ -12,7 +12,7 @@ PYTHON_EVDEV_LICENSE = Revised BSD License
PYTHON_EVDEV_LICENSE_FILES = LICENSE
PYTHON_EVDEV_BUILD_OPTS = \
- build_ecodes \
- --evdev-headers $(STAGING_DIR)/usr/include/linux/input.h:$(STAGING_DIR)/usr/include/linux/input-event-codes.h:$(STAGING_DIR)/usr/include/linux/uinput.h
+ -C--build-option=build_ecodes \
+ -C--build-option=--evdev-headers=$(STAGING_DIR)/usr/include/linux/input.h:$(STAGING_DIR)/usr/include/linux/input-event-codes.h:$(STAGING_DIR)/usr/include/linux/uinput.h
$(eval $(python-package))
diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk
index 519a9a77ac..336f954775 100644
--- a/package/python-lxml/python-lxml.mk
+++ b/package/python-lxml/python-lxml.mk
@@ -28,11 +28,13 @@ HOST_PYTHON_LXML_DEPENDENCIES = host-libxml2 host-libxslt host-zlib
# python-lxml needs these scripts in order to properly detect libxml2 and
# libxslt compiler and linker flags
PYTHON_LXML_BUILD_OPTS = \
- --xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
- --xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
+ --skip-dependency-check
+ -C--build-option=--xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
+ -C--build-option=--xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
HOST_PYTHON_LXML_BUILD_OPTS = \
- --xslt-config=$(HOST_DIR)/bin/xslt-config \
- --xml2-config=$(HOST_DIR)/bin/xml2-config
+ --skip-dependency-check
+ -C--build-option=--xslt-config=$(HOST_DIR)/bin/xslt-config \
+ -C--build-option=--xml2-config=$(HOST_DIR)/bin/xml2-config
$(eval $(python-package))
$(eval $(host-python-package))
diff --git a/package/python-m2crypto/python-m2crypto.mk b/package/python-m2crypto/python-m2crypto.mk
index 69a0c28df5..6c07f42d06 100644
--- a/package/python-m2crypto/python-m2crypto.mk
+++ b/package/python-m2crypto/python-m2crypto.mk
@@ -13,6 +13,8 @@ PYTHON_M2CRYPTO_LICENSE_FILES = LICENCE
PYTHON_M2CRYPTO_CPE_ID_VENDOR = m2crypto_project
PYTHON_M2CRYPTO_CPE_ID_PRODUCT = m2crypto
PYTHON_M2CRYPTO_DEPENDENCIES = openssl host-swig
-PYTHON_M2CRYPTO_BUILD_OPTS = --openssl=$(STAGING_DIR)/usr
+PYTHON_M2CRYPTO_BUILD_OPTS = \
+ -C--build-option=build_ext \
+ -C--build-option=--openssl=$(STAGING_DIR)/usr
$(eval $(python-package))
diff --git a/package/python-matplotlib/python-matplotlib.mk b/package/python-matplotlib/python-matplotlib.mk
index 4fd2b5f432..5f5d53172e 100644
--- a/package/python-matplotlib/python-matplotlib.mk
+++ b/package/python-matplotlib/python-matplotlib.mk
@@ -20,6 +20,7 @@ PYTHON_MATPLOTLIB_DEPENDENCIES = \
python-pybind \
qhull
PYTHON_MATPLOTLIB_SETUP_TYPE = setuptools
+PYTHON_MATPLOTLIB_BUILD_OPTS = --skip-dependency-check
ifeq ($(BR2_PACKAGE_PYTHON_MATPLOTLIB_QT),y)
PYTHON_MATPLOTLIB_DEPENDENCIES += python-pyqt5
diff --git a/package/python-msgpack/python-msgpack.mk b/package/python-msgpack/python-msgpack.mk
index 3ee7c54ce1..9cdf5263de 100644
--- a/package/python-msgpack/python-msgpack.mk
+++ b/package/python-msgpack/python-msgpack.mk
@@ -10,6 +10,7 @@ PYTHON_MSGPACK_SITE = https://files.pythonhosted.org/packages/c2/d5/5662032db157
PYTHON_MSGPACK_LICENSE = Apache-2.0
PYTHON_MSGPACK_LICENSE_FILES = COPYING
PYTHON_MSGPACK_SETUP_TYPE = setuptools
+PYTHON_MSGPACK_BUILD_OPTS = --skip-dependency-check
# When set in the environment, whatever the value, MSGPACK_PUREPYTHON drives
# using the pure python implementation rather than rely on the C++ native code.
diff --git a/package/python-pillow/python-pillow.mk b/package/python-pillow/python-pillow.mk
index 10939d8467..7f5b4dd0f9 100644
--- a/package/python-pillow/python-pillow.mk
+++ b/package/python-pillow/python-pillow.mk
@@ -14,61 +14,60 @@ PYTHON_PILLOW_CPE_ID_PRODUCT = pillow
PYTHON_PILLOW_SETUP_TYPE = setuptools
PYTHON_PILLOW_DEPENDENCIES = host-pkgconf
-PYTHON_PILLOW_BUILD_OPTS = build_ext --disable-platform-guessing
-PYTHON_PILLOW_INSTALL_TARGET_OPTS = $(PYTHON_PILLOW_BUILD_OPTS)
+PYTHON_PILLOW_BUILD_OPTS = -C--build-option=build_ext -C--build-option=--disable-platform-guessing
ifeq ($(BR2_PACKAGE_FREETYPE),y)
PYTHON_PILLOW_DEPENDENCIES += freetype
-PYTHON_PILLOW_BUILD_OPTS += --enable-freetype
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-freetype
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-freetype
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-freetype
endif
ifeq ($(BR2_PACKAGE_JPEG),y)
PYTHON_PILLOW_DEPENDENCIES += jpeg
-PYTHON_PILLOW_BUILD_OPTS += --enable-jpeg
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-jpeg
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-jpeg
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-jpeg
endif
ifeq ($(BR2_PACKAGE_LCMS2),y)
PYTHON_PILLOW_DEPENDENCIES += lcms2
-PYTHON_PILLOW_BUILD_OPTS += --enable-lcms
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-lcms
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-lcms
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-lcms
endif
ifeq ($(BR2_PACKAGE_LIBXCB),y)
PYTHON_PILLOW_DEPENDENCIES += libxcb
-PYTHON_PILLOW_BUILD_OPTS += --enable-xcb
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-xcb
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-xcb
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-xcb
endif
ifeq ($(BR2_PACKAGE_OPENJPEG),y)
PYTHON_PILLOW_DEPENDENCIES += openjpeg
-PYTHON_PILLOW_BUILD_OPTS += --enable-jpeg2000
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-jpeg2000
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-jpeg2000
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-jpeg2000
endif
ifeq ($(BR2_PACKAGE_TIFF),y)
PYTHON_PILLOW_DEPENDENCIES += tiff
-PYTHON_PILLOW_BUILD_OPTS += --enable-tiff
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-tiff
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-tiff
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-tiff
endif
ifeq ($(BR2_PACKAGE_WEBP),y)
PYTHON_PILLOW_DEPENDENCIES += webp
-PYTHON_PILLOW_BUILD_OPTS += --enable-webp
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-webp
ifeq ($(BR2_PACKAGE_WEBP_DEMUX)$(BR2_PACKAGE_WEBP_MUX),yy)
-PYTHON_PILLOW_BUILD_OPTS += --enable-webpmux
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--enable-webpmux
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-webpmux
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-webpmux
endif
else
-PYTHON_PILLOW_BUILD_OPTS += --disable-webp --disable-webpmux
+PYTHON_PILLOW_BUILD_OPTS += -C--build-option=--disable-webp -C--build-option=--disable-webpmux
endif
$(eval $(python-package))
diff --git a/package/python-psycopg2/python-psycopg2.mk b/package/python-psycopg2/python-psycopg2.mk
index 0149b8d185..59a3190ae1 100644
--- a/package/python-psycopg2/python-psycopg2.mk
+++ b/package/python-psycopg2/python-psycopg2.mk
@@ -11,9 +11,12 @@ PYTHON_PSYCOPG2_SETUP_TYPE = setuptools
PYTHON_PSYCOPG2_LICENSE = LGPL-3.0+
PYTHON_PSYCOPG2_LICENSE_FILES = LICENSE
PYTHON_PSYCOPG2_DEPENDENCIES = postgresql
+
# Force psycopg2 to use the Buildroot provided postgresql version
# instead of the one from the host machine
-PYTHON_PSYCOPG2_BUILD_OPTS = build_ext --pg-config=$(STAGING_DIR)/usr/bin/pg_config
-PYTHON_PSYCOPG2_INSTALL_TARGET_OPTS = build_ext --pg-config=$(STAGING_DIR)/usr/bin/pg_config
+define PYTHON_PSYCOPG2_CREATE_SETUP_CFG
+ printf "[build_ext]\ndefine=\npg_config=$(STAGING_DIR)/usr/bin/pg_config\n" > $(@D)/setup.cfg
+endef
+PYTHON_PSYCOPG2_PRE_CONFIGURE_HOOKS += PYTHON_PSYCOPG2_CREATE_SETUP_CFG
$(eval $(python-package))
diff --git a/package/python-pymupdf/python-pymupdf.mk b/package/python-pymupdf/python-pymupdf.mk
index 639ce0e00e..8825868fb5 100644
--- a/package/python-pymupdf/python-pymupdf.mk
+++ b/package/python-pymupdf/python-pymupdf.mk
@@ -13,6 +13,7 @@ PYTHON_PYMUPDF_LICENSE = AGPL-3.0+
PYTHON_PYMUPDF_LICENSE_FILES = COPYING
# No license file included in pip, but it's present on github
PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf zlib
+PYTHON_PYMUPDF_BUILD_OPTS = --skip-dependency-check
PYTHON_PYMUPDF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/mupdf -I$(STAGING_DIR)/usr/include/freetype2"
diff --git a/package/python-pyzmq/python-pyzmq.mk b/package/python-pyzmq/python-pyzmq.mk
index f1444b9124..48a298b221 100644
--- a/package/python-pyzmq/python-pyzmq.mk
+++ b/package/python-pyzmq/python-pyzmq.mk
@@ -11,7 +11,7 @@ PYTHON_PYZMQ_LICENSE = LGPL-3.0+, BSD-3-Clause, Apache-2.0
# Apache license only online: http://www.apache.org/licenses/LICENSE-2.0
PYTHON_PYZMQ_LICENSE_FILES = LICENSE.LESSER LICENSE.BSD
PYTHON_PYZMQ_SETUP_TYPE = setuptools
-PYTHON_PYZMQ_BUILD_OPTS = --zmq=$(STAGING_DIR)/usr
+PYTHON_PYZMQ_BUILD_OPTS = -C--build-option=--zmq=$(STAGING_DIR)/usr
PYTHON_PYZMQ_DEPENDENCIES = \
host-python-cython \
host-python-packaging \
@@ -27,7 +27,7 @@ endef
PYTHON_PYZMQ_POST_PATCH_HOOKS += PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION
ifeq ($(BR2_PACKAGE_ZEROMQ_DRAFTS),y)
-PYTHON_PYZMQ_BUILD_OPTS += --enable-drafts
+PYTHON_PYZMQ_BUILD_OPTS += -C--build-option=--enable-drafts
endif
$(eval $(python-package))
diff --git a/package/python-uvloop/python-uvloop.mk b/package/python-uvloop/python-uvloop.mk
index 285884a2bb..aaeab2805f 100644
--- a/package/python-uvloop/python-uvloop.mk
+++ b/package/python-uvloop/python-uvloop.mk
@@ -10,8 +10,11 @@ PYTHON_UVLOOP_SITE = https://files.pythonhosted.org/packages/9c/16/728cc5dde368e
PYTHON_UVLOOP_SETUP_TYPE = setuptools
PYTHON_UVLOOP_LICENSE = Apache-2.0, MIT
PYTHON_UVLOOP_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
-PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --use-system-libuv
-PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --use-system-libuv
PYTHON_UVLOOP_DEPENDENCIES = libuv
+PYTHON_UVLOOP_BUILD_OPTS = \
+ --skip-dependency-check \
+ -C--build-option=build_ext \
+ -C--build-option=--inplace \
+ -C--build-option=--use-system-libuv
$(eval $(python-package))
diff --git a/package/python-wsaccel/python-wsaccel.mk b/package/python-wsaccel/python-wsaccel.mk
index 1f63aa5c40..7ccb033256 100644
--- a/package/python-wsaccel/python-wsaccel.mk
+++ b/package/python-wsaccel/python-wsaccel.mk
@@ -10,5 +10,6 @@ PYTHON_WSACCEL_SITE = https://files.pythonhosted.org/packages/94/28/41c0e711b538
PYTHON_WSACCEL_LICENSE = Apache-2.0
PYTHON_WSACCEL_LICENSE_FILES = LICENSE
PYTHON_WSACCEL_SETUP_TYPE = setuptools
+PYTHON_WSACCEL_BUILD_OPTS = --skip-dependency-check
$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 22+ messages in thread* Re: [Buildroot] [PATCH v9 18/18] package/pkg-python.mk: migrate setuptools to pep517
2024-03-31 0:41 ` [Buildroot] [PATCH v9 18/18] package/pkg-python.mk: migrate setuptools to pep517 James Hilliard
@ 2024-04-01 20:11 ` Arnout Vandecappelle via buildroot
2024-04-01 20:32 ` James Hilliard
0 siblings, 1 reply; 22+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-04-01 20:11 UTC (permalink / raw)
To: James Hilliard, buildroot
Cc: Louis Aussedat, Gustavo Heinz, Raphaël Mélotte,
Jugurtha BELKALEM, Gwenhael Goavec-Merou, Asaf Kahlon,
Wojciech M . Zabolotny, Joris Offouga, Angelo Compagnucci,
Marcin Niestroj, Attila Wagner, Thomas Petazzoni, Lionel Flandrin,
Giulio Benetti, Mauro Condarelli, Christian Kellermann
On 31/03/2024 01:41, James Hilliard wrote:
> Now that setuptools and its dependencies are using pep517 we can
> migrate the setuptools infrastructure itself to use the pep517
> build frontend.
>
> As part of this we need to migrate the all python packages using
> _BUILD_OPTS to the new config settings format used by the pep517
> build frontend.
>
> We need to use a setup.cfg file to pass the pg_config path when
> building python-psycopg2 as this package needs the pg_config
> path for all internal build stages while -C--build-option= only
> passes the flag to the internal bdist_wheel stage.
>
> Use new setup type variables to define setup type specific
> dependencies instead of using the conditional block.
>
> We also need to set --skip-dependency-check for the following
> packages which specify build dependencies that are not actually
> required:
> - python-lxml
> - python-matplotlib
> - python-msgpack
> - python-pymupdf
> - python-uvloop
> - python-wsaccel
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
> Changes v8 -> v9:
> - use setup.cfg for python-psycopg2 to pass pg_config path
> Changes v7 -> v8:
> - disable dependency enforcement for more packages
> Changes v6 -> v7:
> - just disable dependency enforcement for msgpack
> - rebase
> Changes v5 -> v6:
> - use setup type variables for dependencies
> Changes v4 -> v5:
> - rebase on next
> Changes v1 -> v3:
> - rebase on master
> - combine setuptools-rust and maturin env variables
> - drop patch which is now upstream
> ---
> package/pkg-python.mk | 160 +++++++++---------
> package/python-evdev/python-evdev.mk | 4 +-
> package/python-lxml/python-lxml.mk | 10 +-
> package/python-m2crypto/python-m2crypto.mk | 4 +-
> .../python-matplotlib/python-matplotlib.mk | 1 +
> package/python-msgpack/python-msgpack.mk | 1 +
> package/python-pillow/python-pillow.mk | 35 ++--
> package/python-psycopg2/python-psycopg2.mk | 7 +-
> package/python-pymupdf/python-pymupdf.mk | 1 +
> package/python-pyzmq/python-pyzmq.mk | 4 +-
> package/python-uvloop/python-uvloop.mk | 7 +-
> package/python-wsaccel/python-wsaccel.mk | 1 +
> 12 files changed, 122 insertions(+), 113 deletions(-)
>
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index 94f28ff841..839f728e2f 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -52,15 +52,62 @@ HOST_PKG_PYTHON_ENV = \
> PYTHONNOUSERSITE=1 \
> $(HOST_CONFIGURE_OPTS)
>
> -# Target setuptools-based packages
> -PKG_PYTHON_SETUPTOOLS_ENV = \
> +# Target pep517-based packages
> +PKG_PYTHON_PEP517_ENV = \
For the review, it would have been nice to have either injected a preparatory
patch that just moves setuptools after pep517, or to have kept the ordering of
setuptools before pep517. Oh well, I managed to review it so I guess it's fine.
> $(PKG_PYTHON_ENV)
>
> -PKG_PYTHON_SETUPTOOLS_CMD = \
> - $(if $(wildcard $($(PKG)_BUILDDIR)/setup.py),setup.py,-c 'from setuptools import setup;setup()')
> +PKG_PYTHON_PEP517_BUILD_CMD = \
> + -m build -n -w
> +
> +PKG_PYTHON_PEP517_INSTALL_OPTS = \
> + --interpreter=/usr/bin/python \
> + --script-kind=posix
> +
> +PKG_PYTHON_PEP517_INSTALL_TARGET_CMD = \
> + $(TOPDIR)/support/scripts/pyinstaller.py \
> + dist/* \
> + $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
> + --purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> + --headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
> + --scripts=$(TARGET_DIR)/usr/bin \
> + --data=$(TARGET_DIR)/usr
> +
> +PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \
> + $(TOPDIR)/support/scripts/pyinstaller.py \
> + dist/* \
> + $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
> + --purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> + --headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
> + --scripts=$(STAGING_DIR)/usr/bin \
> + --data=$(STAGING_DIR)/usr
> +
> +PKG_PYTHON_PEP517_DEPENDENCIES = \
> + host-python-pypa-build \
> + host-python-installer
> +
> +# Host pep517-based packages
> +HOST_PKG_PYTHON_PEP517_ENV = \
> + $(HOST_PKG_PYTHON_ENV)
> +
> +HOST_PKG_PYTHON_PEP517_BUILD_CMD = \
> + -m build -n -w
> +
> +HOST_PKG_PYTHON_PEP517_INSTALL_CMD = \
> + $(TOPDIR)/support/scripts/pyinstaller.py \
> + dist/* \
> + --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)
> +
> +# Target setuptools-based packages
> +PKG_PYTHON_SETUPTOOLS_ENV = \
> + $(PKG_PYTHON_PEP517_ENV)
I think most of the additional variables are no longer needed now, because
everything is either pep517-based or bootstrap... So there can be a follow-up
patch simplifying things again, right?
>
> PKG_PYTHON_SETUPTOOLS_BUILD_CMD = \
> - $(PKG_PYTHON_SETUPTOOLS_CMD) build
> + $(PKG_PYTHON_PEP517_BUILD_CMD)
>
> PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
> --install-headers=/usr/include/python$(PYTHON3_VERSION_MAJOR) \
> @@ -69,30 +116,24 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
> --single-version-externally-managed
I wonder if there install opts are still needed now we're using pep517?
[snip]
> @@ -293,28 +300,17 @@ else
> $(2)_DEPENDENCIES += host-python3
> endif # ($(4),target)
>
> -# Setuptools based packages will need setuptools for the host Python
> -# interpreter (both host and target).
> +# Setup type specific dependencies are the same whether we are
> +# building for the host or the target.
> #
> -ifneq ($$(filter setuptools setuptools-rust,$$($(2)_SETUP_TYPE)),)
> -$(2)_DEPENDENCIES += host-python-setuptools
> -ifeq ($$($(2)_SETUP_TYPE),setuptools-rust)
> -$(2)_DEPENDENCIES += host-python-setuptools-rust
> -endif
> -else ifneq ($$(filter flit maturin pep517,$$($(2)_SETUP_TYPE)),)
> -$(2)_DEPENDENCIES += host-python-pypa-build host-python-installer
> -ifeq ($$($(2)_SETUP_TYPE),flit)
> -$(2)_DEPENDENCIES += host-python-flit-core
> -endif
> -ifeq ($$($(2)_SETUP_TYPE),maturin)
> -$(2)_DEPENDENCIES += host-python-maturin
> -endif
> -else ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
> +ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
> # Don't add dependency on host-python-installer for
> # host-python-installer itself, and its dependencies.
> ifeq ($$(filter host-python-flit-core host-python-installer,$(1)),)
> $(2)_DEPENDENCIES += host-python-installer
> endif
> +else
> +$(2)_DEPENDENCIES += $$(PKG_PYTHON_$$($(2)_SETUP_TYPE_UPPER)_DEPENDENCIES)
Very nice cleanup! Would have been better as a separate patch too (especially
because it's entirely independent of the pep517 business), but OK.
> endif
>
> # Pyo3 based packages(setuptools-rust and maturin) will need rust
> diff --git a/package/python-evdev/python-evdev.mk b/package/python-evdev/python-evdev.mk
> index 5cf62b5160..b509b43e8a 100644
> --- a/package/python-evdev/python-evdev.mk
> +++ b/package/python-evdev/python-evdev.mk
> @@ -12,7 +12,7 @@ PYTHON_EVDEV_LICENSE = Revised BSD License
> PYTHON_EVDEV_LICENSE_FILES = LICENSE
>
> PYTHON_EVDEV_BUILD_OPTS = \
> - build_ecodes \
> - --evdev-headers $(STAGING_DIR)/usr/include/linux/input.h:$(STAGING_DIR)/usr/include/linux/input-event-codes.h:$(STAGING_DIR)/usr/include/linux/uinput.h
> + -C--build-option=build_ecodes \
> + -C--build-option=--evdev-headers=$(STAGING_DIR)/usr/include/linux/input.h:$(STAGING_DIR)/usr/include/linux/input-event-codes.h:$(STAGING_DIR)/usr/include/linux/uinput.h
>
> $(eval $(python-package))
> diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk
> index 519a9a77ac..336f954775 100644
> --- a/package/python-lxml/python-lxml.mk
> +++ b/package/python-lxml/python-lxml.mk
> @@ -28,11 +28,13 @@ HOST_PYTHON_LXML_DEPENDENCIES = host-libxml2 host-libxslt host-zlib
> # python-lxml needs these scripts in order to properly detect libxml2 and
> # libxslt compiler and linker flags
> PYTHON_LXML_BUILD_OPTS = \
> - --xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
> - --xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
> + --skip-dependency-check
The backslash is missing here...
> + -C--build-option=--xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
... and here it's indented with spaces instead of tab...
Please do at least a very minimal final check before hitting send-email :-)
(Not that I've never made a mistake like that so I shouldn't talk perhaps.)
> + -C--build-option=--xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
> HOST_PYTHON_LXML_BUILD_OPTS = \
> - --xslt-config=$(HOST_DIR)/bin/xslt-config \
> - --xml2-config=$(HOST_DIR)/bin/xml2-config
> + --skip-dependency-check
> + -C--build-option=--xslt-config=$(HOST_DIR)/bin/xslt-config \
> + -C--build-option=--xml2-config=$(HOST_DIR)/bin/xml2-config
>
> $(eval $(python-package))
> $(eval $(host-python-package))
> diff --git a/package/python-m2crypto/python-m2crypto.mk b/package/python-m2crypto/python-m2crypto.mk
> index 69a0c28df5..6c07f42d06 100644
> --- a/package/python-m2crypto/python-m2crypto.mk
> +++ b/package/python-m2crypto/python-m2crypto.mk
> @@ -13,6 +13,8 @@ PYTHON_M2CRYPTO_LICENSE_FILES = LICENCE
> PYTHON_M2CRYPTO_CPE_ID_VENDOR = m2crypto_project
> PYTHON_M2CRYPTO_CPE_ID_PRODUCT = m2crypto
> PYTHON_M2CRYPTO_DEPENDENCIES = openssl host-swig
> -PYTHON_M2CRYPTO_BUILD_OPTS = --openssl=$(STAGING_DIR)/usr
> +PYTHON_M2CRYPTO_BUILD_OPTS = \
> + -C--build-option=build_ext \
The commit message doesn't explain why build_ext is needed now... I added an
explanation, hopefully it's correct:
In python-m2crypto, the --openssl option is a build_ext option so we need to add
-C--build-option build_ext in front of it.
> + -C--build-option=--openssl=$(STAGING_DIR)/usr
>
> $(eval $(python-package))
[snip]
> diff --git a/package/python-uvloop/python-uvloop.mk b/package/python-uvloop/python-uvloop.mk
> index 285884a2bb..aaeab2805f 100644
> --- a/package/python-uvloop/python-uvloop.mk
> +++ b/package/python-uvloop/python-uvloop.mk
> @@ -10,8 +10,11 @@ PYTHON_UVLOOP_SITE = https://files.pythonhosted.org/packages/9c/16/728cc5dde368e
> PYTHON_UVLOOP_SETUP_TYPE = setuptools
> PYTHON_UVLOOP_LICENSE = Apache-2.0, MIT
> PYTHON_UVLOOP_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
> -PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --use-system-libuv
> -PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --use-system-libuv
> PYTHON_UVLOOP_DEPENDENCIES = libuv
> +PYTHON_UVLOOP_BUILD_OPTS = \
> + --skip-dependency-check \
> + -C--build-option=build_ext \
> + -C--build-option=--inplace \
> + -C--build-option=--use-system-libuv
So, before we also needed to set the options during INSTALL_TARGET. That's no
longer needed now? Any idea why?
Regards,
Arnout
>
> $(eval $(python-package))
> diff --git a/package/python-wsaccel/python-wsaccel.mk b/package/python-wsaccel/python-wsaccel.mk
> index 1f63aa5c40..7ccb033256 100644
> --- a/package/python-wsaccel/python-wsaccel.mk
> +++ b/package/python-wsaccel/python-wsaccel.mk
> @@ -10,5 +10,6 @@ PYTHON_WSACCEL_SITE = https://files.pythonhosted.org/packages/94/28/41c0e711b538
> PYTHON_WSACCEL_LICENSE = Apache-2.0
> PYTHON_WSACCEL_LICENSE_FILES = LICENSE
> PYTHON_WSACCEL_SETUP_TYPE = setuptools
> +PYTHON_WSACCEL_BUILD_OPTS = --skip-dependency-check
>
> $(eval $(python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Buildroot] [PATCH v9 18/18] package/pkg-python.mk: migrate setuptools to pep517
2024-04-01 20:11 ` Arnout Vandecappelle via buildroot
@ 2024-04-01 20:32 ` James Hilliard
0 siblings, 0 replies; 22+ messages in thread
From: James Hilliard @ 2024-04-01 20:32 UTC (permalink / raw)
To: Arnout Vandecappelle
Cc: Jugurtha BELKALEM, Gustavo Heinz, Raphaël Mélotte,
Attila Wagner, Louis Aussedat, Gwenhael Goavec-Merou, Asaf Kahlon,
Wojciech M . Zabolotny, Joris Offouga, Angelo Compagnucci,
Marcin Niestroj, Christian Kellermann, Thomas Petazzoni,
buildroot, Lionel Flandrin, Giulio Benetti, Mauro Condarelli
On Mon, Apr 1, 2024 at 2:11 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 31/03/2024 01:41, James Hilliard wrote:
> > Now that setuptools and its dependencies are using pep517 we can
> > migrate the setuptools infrastructure itself to use the pep517
> > build frontend.
> >
> > As part of this we need to migrate the all python packages using
> > _BUILD_OPTS to the new config settings format used by the pep517
> > build frontend.
> >
> > We need to use a setup.cfg file to pass the pg_config path when
> > building python-psycopg2 as this package needs the pg_config
> > path for all internal build stages while -C--build-option= only
> > passes the flag to the internal bdist_wheel stage.
> >
> > Use new setup type variables to define setup type specific
> > dependencies instead of using the conditional block.
> >
> > We also need to set --skip-dependency-check for the following
> > packages which specify build dependencies that are not actually
> > required:
> > - python-lxml
> > - python-matplotlib
> > - python-msgpack
> > - python-pymupdf
> > - python-uvloop
> > - python-wsaccel
> >
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
> > ---
> > Changes v8 -> v9:
> > - use setup.cfg for python-psycopg2 to pass pg_config path
> > Changes v7 -> v8:
> > - disable dependency enforcement for more packages
> > Changes v6 -> v7:
> > - just disable dependency enforcement for msgpack
> > - rebase
> > Changes v5 -> v6:
> > - use setup type variables for dependencies
> > Changes v4 -> v5:
> > - rebase on next
> > Changes v1 -> v3:
> > - rebase on master
> > - combine setuptools-rust and maturin env variables
> > - drop patch which is now upstream
> > ---
> > package/pkg-python.mk | 160 +++++++++---------
> > package/python-evdev/python-evdev.mk | 4 +-
> > package/python-lxml/python-lxml.mk | 10 +-
> > package/python-m2crypto/python-m2crypto.mk | 4 +-
> > .../python-matplotlib/python-matplotlib.mk | 1 +
> > package/python-msgpack/python-msgpack.mk | 1 +
> > package/python-pillow/python-pillow.mk | 35 ++--
> > package/python-psycopg2/python-psycopg2.mk | 7 +-
> > package/python-pymupdf/python-pymupdf.mk | 1 +
> > package/python-pyzmq/python-pyzmq.mk | 4 +-
> > package/python-uvloop/python-uvloop.mk | 7 +-
> > package/python-wsaccel/python-wsaccel.mk | 1 +
> > 12 files changed, 122 insertions(+), 113 deletions(-)
> >
> > diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> > index 94f28ff841..839f728e2f 100644
> > --- a/package/pkg-python.mk
> > +++ b/package/pkg-python.mk
> > @@ -52,15 +52,62 @@ HOST_PKG_PYTHON_ENV = \
> > PYTHONNOUSERSITE=1 \
> > $(HOST_CONFIGURE_OPTS)
> >
> > -# Target setuptools-based packages
> > -PKG_PYTHON_SETUPTOOLS_ENV = \
> > +# Target pep517-based packages
> > +PKG_PYTHON_PEP517_ENV = \
>
> For the review, it would have been nice to have either injected a preparatory
> patch that just moves setuptools after pep517, or to have kept the ordering of
> setuptools before pep517. Oh well, I managed to review it so I guess it's fine.
>
> > $(PKG_PYTHON_ENV)
> >
> > -PKG_PYTHON_SETUPTOOLS_CMD = \
> > - $(if $(wildcard $($(PKG)_BUILDDIR)/setup.py),setup.py,-c 'from setuptools import setup;setup()')
> > +PKG_PYTHON_PEP517_BUILD_CMD = \
> > + -m build -n -w
> > +
> > +PKG_PYTHON_PEP517_INSTALL_OPTS = \
> > + --interpreter=/usr/bin/python \
> > + --script-kind=posix
> > +
> > +PKG_PYTHON_PEP517_INSTALL_TARGET_CMD = \
> > + $(TOPDIR)/support/scripts/pyinstaller.py \
> > + dist/* \
> > + $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
> > + --purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> > + --headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
> > + --scripts=$(TARGET_DIR)/usr/bin \
> > + --data=$(TARGET_DIR)/usr
> > +
> > +PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \
> > + $(TOPDIR)/support/scripts/pyinstaller.py \
> > + dist/* \
> > + $(PKG_PYTHON_PEP517_INSTALL_OPTS) \
> > + --purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> > + --headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
> > + --scripts=$(STAGING_DIR)/usr/bin \
> > + --data=$(STAGING_DIR)/usr
> > +
> > +PKG_PYTHON_PEP517_DEPENDENCIES = \
> > + host-python-pypa-build \
> > + host-python-installer
> > +
> > +# Host pep517-based packages
> > +HOST_PKG_PYTHON_PEP517_ENV = \
> > + $(HOST_PKG_PYTHON_ENV)
> > +
> > +HOST_PKG_PYTHON_PEP517_BUILD_CMD = \
> > + -m build -n -w
> > +
> > +HOST_PKG_PYTHON_PEP517_INSTALL_CMD = \
> > + $(TOPDIR)/support/scripts/pyinstaller.py \
> > + dist/* \
> > + --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)
> > +
> > +# Target setuptools-based packages
> > +PKG_PYTHON_SETUPTOOLS_ENV = \
> > + $(PKG_PYTHON_PEP517_ENV)
>
> I think most of the additional variables are no longer needed now, because
> everything is either pep517-based or bootstrap... So there can be a follow-up
> patch simplifying things again, right?
I'll go over this all again and look for ways to further simplify things.
>
> >
> > PKG_PYTHON_SETUPTOOLS_BUILD_CMD = \
> > - $(PKG_PYTHON_SETUPTOOLS_CMD) build
> > + $(PKG_PYTHON_PEP517_BUILD_CMD)
> >
> > PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
> > --install-headers=/usr/include/python$(PYTHON3_VERSION_MAJOR) \
> > @@ -69,30 +116,24 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
> > --single-version-externally-managed
>
> I wonder if there install opts are still needed now we're using pep517?
Well there's a few packages not using python-infrastructure that appear to
still be using this, I'll look at migrating those.
>
> [snip]
> > @@ -293,28 +300,17 @@ else
> > $(2)_DEPENDENCIES += host-python3
> > endif # ($(4),target)
> >
> > -# Setuptools based packages will need setuptools for the host Python
> > -# interpreter (both host and target).
> > +# Setup type specific dependencies are the same whether we are
> > +# building for the host or the target.
> > #
> > -ifneq ($$(filter setuptools setuptools-rust,$$($(2)_SETUP_TYPE)),)
> > -$(2)_DEPENDENCIES += host-python-setuptools
> > -ifeq ($$($(2)_SETUP_TYPE),setuptools-rust)
> > -$(2)_DEPENDENCIES += host-python-setuptools-rust
> > -endif
> > -else ifneq ($$(filter flit maturin pep517,$$($(2)_SETUP_TYPE)),)
> > -$(2)_DEPENDENCIES += host-python-pypa-build host-python-installer
> > -ifeq ($$($(2)_SETUP_TYPE),flit)
> > -$(2)_DEPENDENCIES += host-python-flit-core
> > -endif
> > -ifeq ($$($(2)_SETUP_TYPE),maturin)
> > -$(2)_DEPENDENCIES += host-python-maturin
> > -endif
> > -else ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
> > +ifeq ($$($(2)_SETUP_TYPE),flit-bootstrap)
> > # Don't add dependency on host-python-installer for
> > # host-python-installer itself, and its dependencies.
> > ifeq ($$(filter host-python-flit-core host-python-installer,$(1)),)
> > $(2)_DEPENDENCIES += host-python-installer
> > endif
> > +else
> > +$(2)_DEPENDENCIES += $$(PKG_PYTHON_$$($(2)_SETUP_TYPE_UPPER)_DEPENDENCIES)
>
> Very nice cleanup! Would have been better as a separate patch too (especially
> because it's entirely independent of the pep517 business), but OK.
>
> > endif
> >
> > # Pyo3 based packages(setuptools-rust and maturin) will need rust
> > diff --git a/package/python-evdev/python-evdev.mk b/package/python-evdev/python-evdev.mk
> > index 5cf62b5160..b509b43e8a 100644
> > --- a/package/python-evdev/python-evdev.mk
> > +++ b/package/python-evdev/python-evdev.mk
> > @@ -12,7 +12,7 @@ PYTHON_EVDEV_LICENSE = Revised BSD License
> > PYTHON_EVDEV_LICENSE_FILES = LICENSE
> >
> > PYTHON_EVDEV_BUILD_OPTS = \
> > - build_ecodes \
> > - --evdev-headers $(STAGING_DIR)/usr/include/linux/input.h:$(STAGING_DIR)/usr/include/linux/input-event-codes.h:$(STAGING_DIR)/usr/include/linux/uinput.h
> > + -C--build-option=build_ecodes \
> > + -C--build-option=--evdev-headers=$(STAGING_DIR)/usr/include/linux/input.h:$(STAGING_DIR)/usr/include/linux/input-event-codes.h:$(STAGING_DIR)/usr/include/linux/uinput.h
> >
> > $(eval $(python-package))
> > diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk
> > index 519a9a77ac..336f954775 100644
> > --- a/package/python-lxml/python-lxml.mk
> > +++ b/package/python-lxml/python-lxml.mk
> > @@ -28,11 +28,13 @@ HOST_PYTHON_LXML_DEPENDENCIES = host-libxml2 host-libxslt host-zlib
> > # python-lxml needs these scripts in order to properly detect libxml2 and
> > # libxslt compiler and linker flags
> > PYTHON_LXML_BUILD_OPTS = \
> > - --xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
> > - --xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
> > + --skip-dependency-check
>
> The backslash is missing here...
>
> > + -C--build-option=--xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
>
> ... and here it's indented with spaces instead of tab...
>
> Please do at least a very minimal final check before hitting send-email :-)
> (Not that I've never made a mistake like that so I shouldn't talk perhaps.)
>
> > + -C--build-option=--xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
> > HOST_PYTHON_LXML_BUILD_OPTS = \
> > - --xslt-config=$(HOST_DIR)/bin/xslt-config \
> > - --xml2-config=$(HOST_DIR)/bin/xml2-config
> > + --skip-dependency-check
> > + -C--build-option=--xslt-config=$(HOST_DIR)/bin/xslt-config \
> > + -C--build-option=--xml2-config=$(HOST_DIR)/bin/xml2-config
> >
> > $(eval $(python-package))
> > $(eval $(host-python-package))
> > diff --git a/package/python-m2crypto/python-m2crypto.mk b/package/python-m2crypto/python-m2crypto.mk
> > index 69a0c28df5..6c07f42d06 100644
> > --- a/package/python-m2crypto/python-m2crypto.mk
> > +++ b/package/python-m2crypto/python-m2crypto.mk
> > @@ -13,6 +13,8 @@ PYTHON_M2CRYPTO_LICENSE_FILES = LICENCE
> > PYTHON_M2CRYPTO_CPE_ID_VENDOR = m2crypto_project
> > PYTHON_M2CRYPTO_CPE_ID_PRODUCT = m2crypto
> > PYTHON_M2CRYPTO_DEPENDENCIES = openssl host-swig
> > -PYTHON_M2CRYPTO_BUILD_OPTS = --openssl=$(STAGING_DIR)/usr
> > +PYTHON_M2CRYPTO_BUILD_OPTS = \
> > + -C--build-option=build_ext \
>
> The commit message doesn't explain why build_ext is needed now... I added an
> explanation, hopefully it's correct:
>
> In python-m2crypto, the --openssl option is a build_ext option so we need to add
> -C--build-option build_ext in front of it.
>
>
> > + -C--build-option=--openssl=$(STAGING_DIR)/usr
> >
> > $(eval $(python-package))
>
> [snip]
> > diff --git a/package/python-uvloop/python-uvloop.mk b/package/python-uvloop/python-uvloop.mk
> > index 285884a2bb..aaeab2805f 100644
> > --- a/package/python-uvloop/python-uvloop.mk
> > +++ b/package/python-uvloop/python-uvloop.mk
> > @@ -10,8 +10,11 @@ PYTHON_UVLOOP_SITE = https://files.pythonhosted.org/packages/9c/16/728cc5dde368e
> > PYTHON_UVLOOP_SETUP_TYPE = setuptools
> > PYTHON_UVLOOP_LICENSE = Apache-2.0, MIT
> > PYTHON_UVLOOP_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
> > -PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --use-system-libuv
> > -PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --use-system-libuv
> > PYTHON_UVLOOP_DEPENDENCIES = libuv
> > +PYTHON_UVLOOP_BUILD_OPTS = \
> > + --skip-dependency-check \
> > + -C--build-option=build_ext \
> > + -C--build-option=--inplace \
> > + -C--build-option=--use-system-libuv
>
> So, before we also needed to set the options during INSTALL_TARGET. That's no
> longer needed now? Any idea why?
So legacy setup.py builds are kinda weird in that the install operation will
internally also call the build stage but it's separated out in pep517. So we
sometimes had to pass options to both stages due to install calling the
build stage internally.
>
> Regards,
> Arnout
>
> >
> > $(eval $(python-package))
> > diff --git a/package/python-wsaccel/python-wsaccel.mk b/package/python-wsaccel/python-wsaccel.mk
> > index 1f63aa5c40..7ccb033256 100644
> > --- a/package/python-wsaccel/python-wsaccel.mk
> > +++ b/package/python-wsaccel/python-wsaccel.mk
> > @@ -10,5 +10,6 @@ PYTHON_WSACCEL_SITE = https://files.pythonhosted.org/packages/94/28/41c0e711b538
> > PYTHON_WSACCEL_LICENSE = Apache-2.0
> > PYTHON_WSACCEL_LICENSE_FILES = LICENSE
> > PYTHON_WSACCEL_SETUP_TYPE = setuptools
> > +PYTHON_WSACCEL_BUILD_OPTS = --skip-dependency-check
> >
> > $(eval $(python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency
2024-03-31 0:41 [Buildroot] [PATCH v9 01/18] package/python-canopen: add setuptools-scm build dependency James Hilliard
` (16 preceding siblings ...)
2024-03-31 0:41 ` [Buildroot] [PATCH v9 18/18] package/pkg-python.mk: migrate setuptools to pep517 James Hilliard
@ 2024-04-01 20:12 ` Arnout Vandecappelle via buildroot
17 siblings, 0 replies; 22+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-04-01 20:12 UTC (permalink / raw)
To: James Hilliard, buildroot
Cc: Louis Aussedat, Gustavo Heinz, Raphaël Mélotte,
Jugurtha BELKALEM, Gwenhael Goavec-Merou, Asaf Kahlon,
Wojciech M . Zabolotny, Joris Offouga, Angelo Compagnucci,
Marcin Niestroj, Attila Wagner, Thomas Petazzoni, Lionel Flandrin,
Giulio Benetti, Mauro Condarelli, Christian Kellermann
On 31/03/2024 01:41, James Hilliard wrote:
> The host-python-setuptools-scm dependency needs to be added
> prior to migrating setuptools to pep517 as this dependency
> is listed as a build requirement in the pyproject.toml.
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Applied series to master, thanks, with a few changes as indicated in
individual replies.
Regards,
Arnout
> ---
> package/python-canopen/python-canopen.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/python-canopen/python-canopen.mk b/package/python-canopen/python-canopen.mk
> index 963c4ab801..09ec595ec6 100644
> --- a/package/python-canopen/python-canopen.mk
> +++ b/package/python-canopen/python-canopen.mk
> @@ -10,5 +10,6 @@ PYTHON_CANOPEN_SITE = https://files.pythonhosted.org/packages/49/55/67e555f6f4ea
> PYTHON_CANOPEN_SETUP_TYPE = setuptools
> PYTHON_CANOPEN_LICENSE = MIT
> PYTHON_CANOPEN_LICENSE_FILES = LICENSE.txt
> +PYTHON_CANOPEN_DEPENDENCIES = host-python-setuptools-scm
>
> $(eval $(python-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 22+ messages in thread