package/gst1-validate: allow to use host-python3 and target python3
PATCH 1/1 package/gst1-validate: allow to use host-python3 and target python3
--- package/gstreamer1/gst1-validate/Config.in | 6 ++++-- package/gstreamer1/gst1-validate/gst1-validate.mk | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-)
package/gstreamer1/gst1-validate/Config.in +4 -2
@@ -1,9 +1,10 @@ config BR2_PACKAGE_GST1_VALIDATE bool "gst1-validate" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_GST1_PLUGINS_BASE select BR2_PACKAGE_JSON_GLIB - select BR2_PACKAGE_PYTHON_PYEXPAT + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # cairo is autodetected but needs PNG support select BR2_PACKAGE_CAIRO_PNG if BR2_PACKAGE_CAIRO help
@@ -15,3 +16,4 @@ config BR2_PACKAGE_GST1_VALIDATE comment "gst1-validate depends on python" depends on !BR2_PACKAGE_PYTHON + depends on !BR2_PACKAGE_PYTHON3
package/gstreamer1/gst1-validate/gst1-validate.mk +6 -2
@@ -14,10 +14,14 @@ GST1_VALIDATE_DEPENDENCIES = \ gstreamer1 \ gst1-plugins-base \ json-glib \ - host-python \ - python \ $(if $(BR2_PACKAGE_CAIRO),cairo) +ifeq ($(BR2_PACKAGE_PYTHON3),y) +GST1_VALIDATE_DEPENDENCIES += host-python3 python3 +else +GST1_VALIDATE_DEPENDENCIES += host-python python +endif + GST1_VALIDATE_CONF_OPTS += --disable-sphinx-doc $(eval $(autotools-package))
Signature · 1 line
2.21.0
PATCH 1/1 package/gst1-validate: allow to use host-python3 and target python3
Quoted 11 lines · Titouan Christophe
Signed-off-by Titouan Christophe <[email protected]>--- package/gstreamer1/gst1-validate/Config.in | 6 ++++-- package/gstreamer1/gst1-validate/gst1-validate.mk | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-)package/gstreamer1/gst1-validate/Config.in +0
-0
package/gstreamer1/gst1-validate/Config.in line 3
Quoted 4 lines
package/gstreamer1/gst1-validate/Config.in +1
-1@@ -1,9 +1,10 @@ config BR2_PACKAGE_GST1_VALIDATE bool "gst1-validate" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
Not directly related to this patch, but it would be better to use a select
instead of a depends here. 'depends' is for packages that are really Python-related. 'select' is for when it's a package that just happens to be implemented in python, like e.g. dstat. The boundary is sometimes a bit thin, but I think in this case it's clearly the latter. But anyway, that's a separate patch.
package/gstreamer1/gst1-validate/Config.in line 7
Quoted 5 lines
package/gstreamer1/gst1-validate/Config.in +2
-1select BR2_PACKAGE_GST1_PLUGINS_BASE select BR2_PACKAGE_JSON_GLIB - select BR2_PACKAGE_PYTHON_PYEXPAT + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3
There is no python3-pyexpat package. Target packages will automatically use the
python3 version if python3 is selected for the target. It is only when a python3-only host package depends on some module that we need those python3-foo packages.
package/gstreamer1/gst1-validate/Config.in config BR2_PACKAGE_GST1_VALIDATE · line 19
Quoted 8 lines
package/gstreamer1/gst1-validate/Config.in +1
-0# cairo is autodetected but needs PNG support select BR2_PACKAGE_CAIRO_PNG if BR2_PACKAGE_CAIRO help@@ -15,3 +16,4 @@ config BR2_PACKAGE_GST1_VALIDATE comment "gst1-validate depends on python" depends on !BR2_PACKAGE_PYTHON + depends on !BR2_PACKAGE_PYTHON3
Although correct, we typically write this as
depends on !(BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3)
Regards,
Arnout
Quoted 22 lines
package/gstreamer1/gst1-validate/gst1-validate.mk +6
-2@@ -14,10 +14,14 @@ GST1_VALIDATE_DEPENDENCIES = \ gstreamer1 \ gst1-plugins-base \ json-glib \ - host-python \ - python \ $(if $(BR2_PACKAGE_CAIRO),cairo) +ifeq ($(BR2_PACKAGE_PYTHON3),y) +GST1_VALIDATE_DEPENDENCIES += host-python3 python3 +else +GST1_VALIDATE_DEPENDENCIES += host-python python +endif + GST1_VALIDATE_CONF_OPTS += --disable-sphinx-doc $(eval $(autotools-package))
PATCH 1/1 package/gst1-validate: allow to use host-python3 and target python3
Good evening Arnout,
Quoted 16 lines · Arnout Vandecappelle
package/gstreamer1/gst1-validate/Config.in line 3
Quoted 6 lines · Titouan Christophe
+++ b/package/gstreamer1/gst1-validate/Config.in
package/gstreamer1/gst1-validate/Config.in +1
-1@@ -1,9 +1,10 @@ config BR2_PACKAGE_GST1_VALIDATE bool "gst1-validate" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3Not directly related to this patch, but it would be better to use a select
instead of a depends here. 'depends' is for packages that are really Python-related. 'select' is for when it's a package that just happens to be implemented in python, like e.g. dstat. The boundary is sometimes a bit thin, but I think in this case it's clearly the latter. But anyway, that's a separate patch.
Ok
Quoted 11 lines
package/gstreamer1/gst1-validate/Config.in line 7
Quoted 6 lines
package/gstreamer1/gst1-validate/Config.in +2
-1select BR2_PACKAGE_GST1_PLUGINS_BASE select BR2_PACKAGE_JSON_GLIB - select BR2_PACKAGE_PYTHON_PYEXPAT + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3There is no python3-pyexpat package. Target packages will automatically use the
python3 version if python3 is selected for the target. It is only when a python3-only host package depends on some module that we need those python3-foo packages.
Then, there is something I probably do not understand well:
$ git grep BR2_PACKAGE_PYTHON3_PYEXPAT | wc -l 20
Quoted 6 lines
Quoted 6 lines
package/gstreamer1/gst1-validate/Config.in +0
-0# cairo is autodetected but needs PNG support select BR2_PACKAGE_CAIRO_PNG if BR2_PACKAGE_CAIRO help@@ -15,3 +16,4 @@ config BR2_PACKAGE_GST1_VALIDATE
Quoted 7 lines
package/gstreamer1/gst1-validate/Config.in config BR2_PACKAGE_GST1_VALIDATE · line 19
Quoted 3 lines
package/gstreamer1/gst1-validate/Config.in +1
-0comment "gst1-validate depends on python" depends on !BR2_PACKAGE_PYTHON + depends on !BR2_PACKAGE_PYTHON3Although correct, we typically write this as
depends on !(BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3)
I already submitted some accepted patche(s?) that had the 2 "depends on" form, for instance supervisor. Is there a style guide somewhere I could follow ?
(IMHO, the 2 lines form is prettier and easier to understand for humans and diffs, but this is definitely a matter of taste </my2cents>)
Quoted 3 lines
Regards,
Arnout
Best regards,
Titouan
PATCH 1/1 package/gst1-validate: allow to use host-python3 and target python3
Quoted 35 lines · Titouan Christophe
Good evening Arnout,
Quoted 16 lines · Arnout Vandecappelle
Quoted 6 lines · Titouan Christophe
+++ b/package/gstreamer1/gst1-validate/Config.in
(quoted diff) +0
-0@@ -1,9 +1,10 @@? config
BR2_PACKAGE_GST1_VALIDATE
????? bool "gst1-validate"
-??? depends onBR2_PACKAGE_PYTHON
+??? depends onBR2_PACKAGE_PYTHON||BR2_PACKAGE_PYTHON3? Not directly related to this patch, but it would be better to use a select instead of a depends here. 'depends' is for packages that are really Python-related. 'select' is for when it's a package that just happens to be implemented in python, like e.g. dstat. The boundary is sometimes a bit thin, but I think in this case it's clearly the latter. But anyway, that's a separate patch.
Ok
Quoted 11 lines
Quoted 6 lines
????? select
BR2_PACKAGE_GST1_PLUGINS_BASE
????? selectBR2_PACKAGE_JSON_GLIB
-??? selectBR2_PACKAGE_PYTHON_PYEXPAT
+??? selectBR2_PACKAGE_PYTHON_PYEXPATifBR2_PACKAGE_PYTHON+??? selectBR2_PACKAGE_PYTHON3_PYEXPATifBR2_PACKAGE_PYTHON3? There is no python3-pyexpat package. Target packages will automatically use the python3 version if python3 is selected for the target. It is only when a python3-only host package depends on some module that we need those python3-foo packages.
Quoted 4 lines
Then, there is something I probably do not understand well:
$ git grep BR2_PACKAGE_PYTHON3_PYEXPAT | wc -l 20
That is my stupidity. I didn't find a python3-pyexpat package. But that's
because it's not a separate package, but rather a suboption of python/python3.
So your patch was perfectly fine.
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
????? # cairo is autodetected but needs PNG support ????? select
BR2_PACKAGE_CAIRO_PNGifBR2_PACKAGE_CAIRO????? help(quoted diff) +0
-0@@ -15,3 +16,4 @@ config BR2_PACKAGE_GST1_VALIDATE? ? comment "gst1-validate depends on python"
????? depends on !BR2_PACKAGE_PYTHON
+??? depends on !BR2_PACKAGE_PYTHON3? Although correct, we typically write this as
Quoted 7 lines
Quoted 1 line
????depends on !(BR2_PACKAGE_PYTHON ||
BR2_PACKAGE_PYTHON3)I already submitted some accepted patche(s?) that had the 2 "depends on" form, for instance supervisor. Is there a style guide somewhere I could follow ?
(IMHO, the 2 lines form is prettier and easier to understand for humans and diffs, but this is definitely a matter of taste </my2cents>)
In matters of taste we aim for consistency. But that makes my proposal wrong as
well, because in two places we have:
depends on !BR2_PACKAGE_PYTHON && !BR2_PACKAGE_PYTHON3
(which IMO is the worst option: it's less readable than the two lines that you have, and it's not an exact negation of the dependency line in the package itself.)
Since your patch was perfectly OK, I've now applied to master, thanks.
Regards,
Arnout