Skip to contentSkip to conversation

docs/manual/adding-packages-python.doc: clarify how _BUILD_OPTS work

PATCH Applied Marcus Hoffmann via buildroot 2 participants 5 messages Jan 8, 2025 – May 31, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/manual/adding-packages-python.doc: clarify how _BUILD_OPTS work

PYTHON_FOO_BUILD_OPTS are passed to the build module call of the package build, this allows passing options to the python build *backend* by using the --config-setting= option. setup.py is no longer involved since even the setuptools backend now used the pep517 build method.

The note about the options being passed to support/scripts/pyinstaller.py seems to be no longer accurate.

---
 docs/manual/adding-packages-python.adoc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
docs/manual/adding-packages-python.adoc +2 -4
index b42c06e54c..43cf0baed4 100644
@@ -128,10 +128,8 @@ therefore only use a few of them, or none.
   and +HOST_PKG_PYTHON_PEP517_ENV+ (for flit/pep517 host packages).
 
 * +PYTHON_FOO_BUILD_OPTS+, to specify additional options to pass to
-  the Python +setup.py+ script during the build step, this generally
-  only makes sense to use for setuptools based packages as flit/pep517
-  based packages do not pass these options to a +setup.py+ script but
-  instead pass them to +support/scripts/pyinstaller.py+.
+  the Python +python -m build+ call. To pass additional options to the
+  build backend use the +--config-setting=+ flag of the +build+ module.
 
 * +PYTHON_FOO_INSTALL_TARGET_OPTS+, +PYTHON_FOO_INSTALL_STAGING_OPTS+,
   +HOST_PYTHON_FOO_INSTALL_OPTS+ to specify additional options to pass
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 17 lines · Marcus Hoffmann via buildroot

PYTHON_FOO_BUILD_OPTS are passed to the build module call of the package build, this allows passing options to the python build *backend* by using the --config-setting= option. setup.py is no longer involved since even the setuptools backend now used the pep517 build method.

The note about the options being passed to support/scripts/pyinstaller.py seems to be no longer accurate.

---
 docs/manual/adding-packages-python.adoc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
docs/manual/adding-packages-python.adoc +0 -0
index b42c06e54c..43cf0baed4 100644

docs/manual/adding-packages-python.adoc therefore only use a few of them, or none. · line 132

Quoted 9 lines
docs/manual/adding-packages-python.adoc +2 -4
@@ -128,10 +128,8 @@ therefore only use a few of them, or none.
   and +HOST_PKG_PYTHON_PEP517_ENV+ (for flit/pep517 host packages).
 
 * +PYTHON_FOO_BUILD_OPTS+, to specify additional options to pass to
-  the Python +setup.py+ script during the build step, this generally
-  only makes sense to use for setuptools based packages as flit/pep517
-  based packages do not pass these options to a +setup.py+ script but
-  instead pass them to +support/scripts/pyinstaller.py+.
+  the Python +python -m build+ call. To pass additional options to the
+  build backend use the +--config-setting=+ flag of the +build+ module.

We normally use the short option variant -C instead of --config-setting.

Quoted 10 lines
docs/manual/adding-packages-python.adoc +0 -1
 * +PYTHON_FOO_INSTALL_TARGET_OPTS+, +PYTHON_FOO_INSTALL_STAGING_OPTS+,
   +HOST_PYTHON_FOO_INSTALL_OPTS+ to specify additional options to pass
--

2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Marcus Hoffmann via buildroot
Quoted 7 lines · Marcus Hoffmann via buildroot

PYTHON_FOO_BUILD_OPTS are passed to the build module call of the package build, this allows passing options to the python build *backend* by using the --config-setting= option. setup.py is no longer involved since even the setuptools backend now used the pep517 build method.

The note about the options being passed to support/scripts/pyinstaller.py seems to be no longer accurate.

Your SoB is missing. I added it, you already made plenty of other
contributions with SoB that suggest you actually did mean to add it. Please confirm by replying with your SoB (so that it is tracked correctly in the mailing list archive and in patchwork).

Quoted 9 lines
---
  docs/manual/adding-packages-python.adoc | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
docs/manual/adding-packages-python.adoc +0 -0
index b42c06e54c..43cf0baed4 100644

docs/manual/adding-packages-python.adoc therefore only use a few of them, or none. · line 132

Quoted 9 lines
docs/manual/adding-packages-python.adoc +2 -4
@@ -128,10 +128,8 @@ therefore only use a few of them, or none.
    and +HOST_PKG_PYTHON_PEP517_ENV+ (for flit/pep517 host packages).
 
  * +PYTHON_FOO_BUILD_OPTS+, to specify additional options to pass to
-  the Python +setup.py+ script during the build step, this generally
-  only makes sense to use for setuptools based packages as flit/pep517
-  based packages do not pass these options to a +setup.py+ script but
-  instead pass them to +support/scripts/pyinstaller.py+.
+  the Python +python -m build+ call. To pass additional options to the
+  build backend use the +--config-setting=+ flag of the +build+ module.

I also mentioned -C as suggested by James.

Applied to master, thanks.

Regards,
Arnout

docs/manual/adding-packages-python.adoc therefore only use a few of them, or none. · line 135

Quoted 3 lines
docs/manual/adding-packages-python.adoc +0 -0
  * +PYTHON_FOO_INSTALL_TARGET_OPTS+, +PYTHON_FOO_INSTALL_STAGING_OPTS+,
    +HOST_PYTHON_FOO_INSTALL_OPTS+ to specify additional options to pass

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
Quoted 8 lines · Arnout Vandecappelle via buildroot
Quoted 5 lines · Marcus Hoffmann via buildroot

PYTHON_FOO_BUILD_OPTS are passed to the build module call of the package build, this allows passing options to the python build *backend* by using the --config-setting= option. setup.py is no longer involved since even the setuptools backend now used the pep517 build method.

Quoted 5 lines
Quoted 2 lines

The note about the options being passed to support/scripts/pyinstaller.py seems to be no longer accurate.

 Your SoB is missing. I added it, you already made plenty of other
contributions with SoB that suggest you actually did mean to add it. Please confirm by replying with your SoB (so that it is tracked correctly in the mailing list archive and in patchwork).

Thanks!

Quoted 26 lines
Quoted 10 lines

---
  docs/manual/adding-packages-python.adoc | 6 ++----

  1 file changed, 2 insertions(+), 4 deletions(-)
docs/manual/adding-packages-python.adoc +0 -0
index b42c06e54c..43cf0baed4 100644
@@ -128,10 +128,8 @@ therefore only use a few of them, or none.
Quoted 8 lines

    and +HOST_PKG_PYTHON_PEP517_ENV+ (for flit/pep517 host packages).
  * +PYTHON_FOO_BUILD_OPTS+, to specify additional options to pass to -  the Python +setup.py+ script during the build step, this generally -  only makes sense to use for setuptools based packages as flit/pep517 -  based packages do not pass these options to a +setup.py+ script but -  instead pass them to +support/scripts/pyinstaller.py+.
+  the Python +python -m build+ call. To pass additional options to the +  build backend use the +--config-setting=+ flag of the +build+ module.

 I also mentioned -C as suggested by James.

 Applied to master, thanks.

 Regards,
 Arnout

Quoted 7 lines
Quoted 2 lines

  * +PYTHON_FOO_INSTALL_TARGET_OPTS+, +PYTHON_FOO_INSTALL_STAGING_OPTS+, +HOST_PYTHON_FOO_INSTALL_OPTS+ to specify additional options to pass

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
In reply to Marcus Hoffmann via buildroot
Quoted 7 lines · Marcus Hoffmann via buildroot

PYTHON_FOO_BUILD_OPTS are passed to the build module call of the package build, this allows passing options to the python build *backend* by using the --config-setting= option. setup.py is no longer involved since even the setuptools backend now used the pep517 build method.

The note about the options being passed to support/scripts/pyinstaller.py seems to be no longer accurate.

Applied to 2025.02.x, thanks.

Regards,
Arnout

Quoted 11 lines
---
  docs/manual/adding-packages-python.adoc | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
docs/manual/adding-packages-python.adoc +0 -0
index b42c06e54c..43cf0baed4 100644
@@ -128,10 +128,8 @@ therefore only use a few of them, or none.
    and +HOST_PKG_PYTHON_PEP517_ENV+ (for flit/pep517 host packages).
 

docs/manual/adding-packages-python.adoc therefore only use a few of them, or none. · line 135

Quoted 10 lines
docs/manual/adding-packages-python.adoc +2 -4
  * +PYTHON_FOO_BUILD_OPTS+, to specify additional options to pass to
-  the Python +setup.py+ script during the build step, this generally
-  only makes sense to use for setuptools based packages as flit/pep517
-  based packages do not pass these options to a +setup.py+ script but
-  instead pass them to +support/scripts/pyinstaller.py+.
+  the Python +python -m build+ call. To pass additional options to the
+  build backend use the +--config-setting=+ flag of the +build+ module.
 
  * +PYTHON_FOO_INSTALL_TARGET_OPTS+, +PYTHON_FOO_INSTALL_STAGING_OPTS+,
    +HOST_PYTHON_FOO_INSTALL_OPTS+ to specify additional options to pass

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot