Skip to contentSkip to conversation

package/avahi: drop unneeded am_cv_path_PYTHON

PATCH In review Peter Korsgaard 2 participants 7 messages Feb 6, 2022 – Feb 7, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/avahi: drop unneeded am_cv_path_PYTHON

It is not used by the configure script and refer to PYTHON_TARGET_BINARY which was dropped back in 2010 by commit e3418f69cf (python: convert to autotargets, bump to 2.7.1, many improvements), so drop it.

---
 package/avahi/avahi.mk | 1 -
 1 file changed, 1 deletion(-)
package/avahi/avahi.mk +0 -1
index 13e2106014..04c4164af6 100644
@@ -107,7 +107,6 @@ endif
 ifeq ($(BR2_PACKAGE_PYTHON),y)
 AVAHI_CONF_ENV += \
 	am_cv_pathless_PYTHON=python \
-	am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \
 	am_cv_python_version=$(PYTHON_VERSION) \
 	am_cv_python_platform=linux2 \
 	am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
Signature · 6 lines
2.20.1

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

PATCH 2/2 package/avahi: add pygobject support, move to python3

The python support in avahi needs pygobjet to do anything:

Building avahi-python: no (You need python, pygobject and python-dbus!)

So add optional support for it. Python-gobject is only available for python3, so change the python logic to use python 3.

---
 package/avahi/avahi.mk | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
package/avahi/avahi.mk +14 -8
index 04c4164af6..1992669a92 100644
@@ -40,7 +40,6 @@ AVAHI_CONF_OPTS = \
 	--disable-gtk \
 	--disable-gtk3 \
 	--disable-gdbm \
-	--disable-pygobject \
 	--disable-mono \
 	--disable-monodoc \
 	--disable-stack-protector \
@@ -104,16 +103,16 @@ else
 AVAHI_CONF_OPTS += --disable-glib --disable-gobject
 endif
 
-ifeq ($(BR2_PACKAGE_PYTHON),y)
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
 AVAHI_CONF_ENV += \
-	am_cv_pathless_PYTHON=python \
-	am_cv_python_version=$(PYTHON_VERSION) \
-	am_cv_python_platform=linux2 \
-	am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
-	am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+	am_cv_pathless_PYTHON=python3 \
+	am_cv_python_version=$(PYTHON3_VERSION) \
+	am_cv_python_platform=linux5 \
+	am_cv_python_pythondir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+	am_cv_python_pyexecdir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
 	py_cv_mod_socket_=yes
 
-AVAHI_DEPENDENCIES += python
+AVAHI_DEPENDENCIES += python3
 AVAHI_CONF_OPTS += --enable-python
 else
 AVAHI_CONF_OPTS += --disable-python
@@ -127,6 +126,13 @@ else
 AVAHI_CONF_OPTS += --disable-python-dbus
 endif
 
+ifeq ($(BR2_PACKAGE_PYTHON_GOBJECT),y)
+AVAHI_CONF_OPTS += --enable-pygobject
+AVAHI_DEPENDENCIES += python-gobject
+else
+AVAHI_CONF_OPTS += --disable-pygobject
+endif
+
 AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
 
 AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)
Signature · 6 lines
2.20.1

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

Re: [Buildroot] [PATCH 2/2] package/avahi: add pygobject support, move to python3

Quoted 3 lines · Peter Korsgaard

The python support in avahi needs pygobjet to do anything:

Building avahi-python: no (You need python, pygobject and python-dbus!)

So, doesn't that mean that...

Quoted 22 lines

So add optional support for it. Python-gobject is only available for python3, so change the python logic to use python 3.

---
  package/avahi/avahi.mk | 22 ++++++++++++++--------
  1 file changed, 14 insertions(+), 8 deletions(-)
package/avahi/avahi.mk +0 -1
index 04c4164af6..1992669a92 100644
@@ -40,7 +40,6 @@ AVAHI_CONF_OPTS = \
  	--disable-gtk \
  	--disable-gtk3 \
  	--disable-gdbm \
-	--disable-pygobject \
  	--disable-mono \
  	--disable-monodoc \
  	--disable-stack-protector \

package/avahi/avahi.mk else · line 106

Quoted 5 lines
package/avahi/avahi.mk +1 -1
@@ -104,16 +103,16 @@ else
  AVAHI_CONF_OPTS += --disable-glib --disable-gobject
  endif
 
-ifeq ($(BR2_PACKAGE_PYTHON),y)
+ifeq ($(BR2_PACKAGE_PYTHON3),y)

... this condition should be

ifeq ($(BR2_PACKAGE_PYTHON_GOBJECT)$(BR2_PACKAGE_PYTHON_DBUS_NEXT),yy)

(python3 is implied by python-gobject).

If what I'm saying is true, then actually I'd go a bit further than that and add

select BR2_PACKAGE_PYTHON_DBUS_NEXT if BR2_PACKAGE_PYTHON_GOBJECT

to Config.in. Automatically selecting python-gobject would go a little too far since it depends on gobject-introspection and we really don't want to enable that beast unless it's really needed...

Regards,
Arnout

Quoted 22 lines
package/avahi/avahi.mk +6 -6
  AVAHI_CONF_ENV += \
-	am_cv_pathless_PYTHON=python \
-	am_cv_python_version=$(PYTHON_VERSION) \
-	am_cv_python_platform=linux2 \
-	am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
-	am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+	am_cv_pathless_PYTHON=python3 \
+	am_cv_python_version=$(PYTHON3_VERSION) \
+	am_cv_python_platform=linux5 \
+	am_cv_python_pythondir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+	am_cv_python_pyexecdir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
  	py_cv_mod_socket_=yes
 
-AVAHI_DEPENDENCIES += python
+AVAHI_DEPENDENCIES += python3
  AVAHI_CONF_OPTS += --enable-python
  else
  AVAHI_CONF_OPTS += --disable-python
@@ -127,6 +126,13 @@ else
  AVAHI_CONF_OPTS += --disable-python-dbus
  endif
 

package/avahi/avahi.mk else · line 138

Quoted 10 lines
package/avahi/avahi.mk +7 -0
+ifeq ($(BR2_PACKAGE_PYTHON_GOBJECT),y)
+AVAHI_CONF_OPTS += --enable-pygobject
+AVAHI_DEPENDENCIES += python-gobject
+else
+AVAHI_CONF_OPTS += --disable-pygobject
+endif
+
  AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
 
  AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)

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

#3 lore raw

Re: [Buildroot] [PATCH 2/2] package/avahi: add pygobject support, move to python3

Quoted 38 lines · Arnout Vandecappelle
Quoted 3 lines · Peter Korsgaard

The python support in avahi needs pygobjet to do anything:

Building avahi-python:              no   (You need python, pygobject and python-dbus!)

 So, doesn't that mean that...

Quoted 22 lines

So add optional support for it.  Python-gobject is only available for python3, so change the python logic to use python 3.

---
  package/avahi/avahi.mk | 22 ++++++++++++++--------

  1 file changed, 14 insertions(+), 8 deletions(-)
package/avahi/avahi.mk +0 -1
index 04c4164af6..1992669a92 100644
@@ -40,7 +40,6 @@ AVAHI_CONF_OPTS = \
       --disable-gtk \
       --disable-gtk3 \
       --disable-gdbm \
-    --disable-pygobject \
       --disable-mono \
       --disable-monodoc \
       --disable-stack-protector \
@@ -104,16 +103,16 @@ else
Quoted 4 lines

  AVAHI_CONF_OPTS += --disable-glib --disable-gobject endif
  -ifeq ($(BR2_PACKAGE_PYTHON),y)
+ifeq ($(BR2_PACKAGE_PYTHON3),y)

... this condition should be

Quoted 7 lines

ifeq ($(BR2_PACKAGE_PYTHON_GOBJECT)$(BR2_PACKAGE_PYTHON_DBUS_NEXT),yy)

(python3 is implied by python-gobject).

 If what I'm saying is true, then actually I'd go a bit further than that and add

    select BR2_PACKAGE_PYTHON_DBUS_NEXT if BR2_PACKAGE_PYTHON_GOBJECT

 Actually, we could make it

    select BR2_PACKAGE_PYTHON_GOBJECT if BR2_PACKAGE_PYTHON3 && BR2_PACKAGE_GOBJECT_INTROSPECTION

    select BR2_PACKAGE_PYTHON_DBUS_NEXT if BR2_PACKAGE_PYTHON3 && BR2_PACKAGE_GOBJECT_INTROSPECTION

(with probably some comment to explain why the weird dependencies)

 Regards,
 Arnout

Quoted 27 lines

to Config.in. Automatically selecting python-gobject would go a little too far since it depends on gobject-introspection and we really don't want to enable that beast unless it's really needed...

 Regards,
 Arnout

Quoted 21 lines

  AVAHI_CONF_ENV += \
-    am_cv_pathless_PYTHON=python \
-    am_cv_python_version=$(PYTHON_VERSION) \
-    am_cv_python_platform=linux2 \
- am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
- am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+    am_cv_pathless_PYTHON=python3 \
+    am_cv_python_version=$(PYTHON3_VERSION) \
+    am_cv_python_platform=linux5 \
+ am_cv_python_pythondir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+ am_cv_python_pyexecdir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
      py_cv_mod_socket_=yes
  -AVAHI_DEPENDENCIES += python
+AVAHI_DEPENDENCIES += python3
  AVAHI_CONF_OPTS += --enable-python
  else
  AVAHI_CONF_OPTS += --disable-python

package/avahi/avahi.mk +0 -0
@@ -127,6 +126,13 @@ else

  AVAHI_CONF_OPTS += --disable-python-dbus
  endif
  +ifeq ($(BR2_PACKAGE_PYTHON_GOBJECT),y)

Quoted 8 lines
Quoted 8 lines
package/avahi/avahi.mk +6 -0
+AVAHI_CONF_OPTS += --enable-pygobject
+AVAHI_DEPENDENCIES += python-gobject
+else
+AVAHI_CONF_OPTS += --disable-pygobject
+endif
+

  AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
    AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)

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

#4 lore raw

Re: [Buildroot] [PATCH 2/2] package/avahi: add pygobject support, move to python3

In reply to Arnout Vandecappelle
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Quoted 3 lines · Peter Korsgaard

The python support in avahi needs pygobjet to do anything:

Building avahi-python: no (You need python, pygobject and python-dbus!)

So, doesn't that mean that...

Quoted 8 lines

package/avahi/avahi.mk else · line 106

Quoted 2 lines
package/avahi/avahi.mk +1 -1
-ifeq ($(BR2_PACKAGE_PYTHON),y)
+ifeq ($(BR2_PACKAGE_PYTHON3),y)

... this condition should be

ifeq ($(BR2_PACKAGE_PYTHON_GOBJECT)$(BR2_PACKAGE_PYTHON_DBUS_NEXT),yy)

(python3 is implied by python-gobject).

Well, it could - But there is no harm in passing --enable-python without dbus/gobject, it will just not do anything.

Notice that it is dbus-python, not python-dbus-next.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH 2/2] package/avahi: add pygobject support, move to python3

In reply to Peter Korsgaard
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

The python support in avahi needs pygobjet to do anything:
Building avahi-python: no (You need python, pygobject and python-dbus!)

So add optional support for it. Python-gobject is only available for python3, so change the python logic to use python 3.

Committed, thanks.

The further cleanup to only pass --enable-python if all the dependencies are present can be done later.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw
In reply to Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

It is not used by the configure script and refer to PYTHON_TARGET_BINARY which was dropped back in 2010 by commit e3418f69cf (python: convert to autotargets, bump to 2.7.1, many improvements), so drop it.

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot