Skip to contentSkip to conversation

python3-pygobject: move python3-setuptools from RDEPENDS to DEPENDS

PATCH In review [email protected] 4 participants 10 messages Aug 5, 2019 – Aug 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-pygobject: move python3-setuptools from RDEPENDS to DEPENDS

From: Luca Boccassi <[email protected]>

python3-setuptools is necessary to build pygobject but not to run it, as also documented by the upstream packaging guide:

https://gitlab.gnome.org/GNOME/pygobject/blob/master/docs/packagingguide.rst

Move it to DEPENDS to shrink the runtime dependency chain, as setuptools includes scripts to download other packages, which might not be desired on a minimal image.

---
 meta/recipes-devtools/python/python3-pygobject_3.32.2.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +1 -3
index 05688be603..58a251f8eb 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
 GNOMEBASEBUILDCLASS = "meson"
 inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even
 
-DEPENDS += "python3 glib-2.0"
+DEPENDS += "python3 python3-setuptools glib-2.0"
 
 SRCNAME="pygobject"
 
@@ -27,7 +27,5 @@ PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wa
 # we don't link against python3-pycairo -> RDEPENDS
 PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo"
 
-RDEPENDS_${PN} += "python3-setuptools"
-
 BBCLASSEXTEND = "native"
 PACKAGECONFIG_class-native = ""
Signature · 1 line
2.20.1
#1 lore raw

meta/recipes-devtools/python/python3-pygobject_3.32.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" · line 9

Quoted 4 lines · On 05/08/2019 11:52, [email protected] wrote:

inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even

meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +1 -1
-DEPENDS += "python3 glib-2.0"
+DEPENDS += "python3 python3-setuptools glib-2.0"

If setuptools is a build dependency then surely you mean python3-setuptools-native. And if you need python3-setuptools-native, then just inherit setuptools3 instead of distutils3-base.

Ross

#2 lore raw

PATCH v2 1/1 python3-pygobject: move python3-setuptools from RDEPENDS to DEPENDS

In reply to [email protected]

From: Luca Boccassi <[email protected]>

python3-setuptools is necessary to build pygobject but not to run it, as also documented by the upstream packaging guide:

https://gitlab.gnome.org/GNOME/pygobject/blob/master/docs/packagingguide.rst

Move it to DEPENDS to shrink the runtime dependency chain, as setuptools includes scripts to download other packages, which might not be desired on a minimal image.

---
v2: use -native suffix as requested during the code review

 meta/recipes-devtools/python/python3-pygobject_3.32.2.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +1 -3
index 05688be603..9e4ce31d8c 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
 GNOMEBASEBUILDCLASS = "meson"
 inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even
 
-DEPENDS += "python3 glib-2.0"
+DEPENDS += "python3 python3-setuptools-native glib-2.0"
 
 SRCNAME="pygobject"
 
@@ -27,7 +27,5 @@ PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wa
 # we don't link against python3-pycairo -> RDEPENDS
 PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo"
 
-RDEPENDS_${PN} += "python3-setuptools"
-
 BBCLASSEXTEND = "native"
 PACKAGECONFIG_class-native = ""
Signature · 1 line
2.20.1
#3 lore raw

meta/recipes-devtools/python/python3-pygobject_3.32.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" · line 9

Quoted 3 lines · On Thu, 8 Aug 2019 at 13:47, <[email protected]> wrote:
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +1 -1
-DEPENDS += "python3 glib-2.0"
+DEPENDS += "python3 python3-setuptools-native glib-2.0"

If this is required, then the build should fail, and it doesn't (neither on the autobuilder, nor in my local setup). Is this really needed? Does the build fail for you?

Alex

#4 lore raw
Quoted 9 lines · Alexander Kanavin

meta/recipes-devtools/python/python3-pygobject_3.32.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" · line 9

Quoted 2 lines · On Thu, 8 Aug 2019 at 13:47, <[email protected]> wrote:
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +1 -1
-DEPENDS += "python3 glib-2.0"
+DEPENDS += "python3 python3-setuptools-native glib-2.0"

If this is required, then the build should fail, and it doesn't (neither on the autobuilder, nor in my local setup). Is this really needed? Does the build fail for you?

Alex

Hi,

You are right, it doesn't fail - upstream lists it as optional. I do not know enough about this package to know how important it is - so I'll send a v3 that just removes the RDEPENDS, which is the one thing I cared about.

Thanks!

Signature · 2 lines
Kind regards,
Luca Boccassi
#5 lore raw
In reply to [email protected]
Quoted 12 lines · On 05/08/2019 11:52, [email protected] wrote:
Quoted 1 line

inherit gnomebase distutils3-base gobject-introspection upstream-

version-is-even

meta/recipes-devtools/python/python3-pygobject_3.32.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" · line 9

Quoted 3 lines
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +1 -1
-DEPENDS += "python3 glib-2.0"
+DEPENDS += "python3 python3-setuptools glib-2.0"

If setuptools is a build dependency then surely you mean python3-setuptools-native. And if you need python3-setuptools- native,
then just inherit setuptools3 instead of distutils3-base.

Quoted 1 line

Ross

Hi,

inheriting setuptools3 does not seem to work, the build fails:

2019-08-07T20:29:11.4006600Z [INFO] [10443] | /source/build-

project/tmp/work/aarch64-project-linux/python3-pygobject/3.28.3- r0/recipe-sysroot-native/usr/bin/python3-native/python3: can't open file 'setup.py': [Errno 2] No such file or directory

Using the -native suffix works, so sent a v2 doing that.

Thanks!

Signature · 2 lines
Kind regards,
Luca Boccassi
#6 lore raw

PATCH v3 1/1 python3-pygobject: move python3-setuptools from RDEPENDS to DEPENDS

In reply to [email protected]

From: Luca Boccassi <[email protected]>

python3-setuptools is necessary to build pygobject but not to run it, as also documented by the upstream packaging guide:

https://gitlab.gnome.org/GNOME/pygobject/blob/master/docs/packagingguide.rst

Move it to DEPENDS to shrink the runtime dependency chain, as setuptools includes scripts to download other packages, which might not be desired on a minimal image.

---
v2: use -native suffix as requested during the code review
v3: do not add setuptools to DEPENDS - it is optional and it builds without it

 meta/recipes-devtools/python/python3-pygobject_3.32.2.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +0 -2
index 05688be603..453fdac2c8 100644
@@ -27,7 +27,5 @@ PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wa
 # we don't link against python3-pycairo -> RDEPENDS
 PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo"
 
-RDEPENDS_${PN} += "python3-setuptools"
-
 BBCLASSEXTEND = "native"
 PACKAGECONFIG_class-native = ""
Signature · 1 line
2.20.1
#7 lore raw

Hi Luca,

Quoted 11 lines · On 8/8/19 3:58 PM, [email protected] wrote:

From: Luca Boccassi <[email protected]>

python3-setuptools is necessary to build pygobject but not to run it, as also documented by the upstream packaging guide:

https://gitlab.gnome.org/GNOME/pygobject/blob/master/docs/packagingguide.rst

Move it to DEPENDS to shrink the runtime dependency chain, as setuptools includes scripts to download other packages, which might not be desired on a minimal image.

This commmit message should be rephrased now.
/Jacob

Quoted 14 lines

---
v2: use -native suffix as requested during the code review
v3: do not add setuptools to DEPENDS - it is optional and it builds without it

  meta/recipes-devtools/python/python3-pygobject_3.32.2.bb | 2 --
  1 file changed, 2 deletions(-)
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +0 -0
index 05688be603..453fdac2c8 100644

meta/recipes-devtools/python/python3-pygobject_3.32.2.bb PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wa · line 31

Quoted 7 lines
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +0 -2
@@ -27,7 +27,5 @@ PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wa
  # we don't link against python3-pycairo -> RDEPENDS
  PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo"
 
-RDEPENDS_${PN} += "python3-setuptools"
-
  BBCLASSEXTEND = "native"
  PACKAGECONFIG_class-native = ""

[mikrodidakt]
Jacob Kroon • +46 46325040

mikrodidakt.se • Skiffervägen 48, SE-224 78 LUND, Sweden

Consultans since 1980 • SW, HW, Embedded Systems, Linux

#8 lore raw
Quoted 23 lines · Jacob Kroon

Hi Luca,

Quoted 8 lines · On 8/8/19 3:58 PM, [email protected] wrote:

From: Luca Boccassi <
[email protected]

Quoted 1 line

python3-setuptools is necessary to build pygobject but not to run it, as
also documented by the upstream packaging guide:

Quoted 9 lines

https://gitlab.gnome.org/GNOME/pygobject/blob/master/docs/packagingguide.rst

Move it to DEPENDS to shrink the runtime dependency chain, as setuptools
includes scripts to download other packages, which might not be desired on
a minimal image.

Quoted 2 lines

This commmit message should be rephrased now.
/Jacob

Hi,

Yes I realised 0.1 seconds after git send-email completed :-) Already sent v4:

https://patchwork.openembedded.org/patch/163798/

Signature · 2 lines
Kind regards,
Luca Boccassi
#9 lore raw

PATCH v4 1/1 python3-pygobject: remove python3-setuptools from RDEPENDS

In reply to [email protected]

From: Luca Boccassi <[email protected]>

python3-setuptools is an optional build-dependency of pygobject but it is not necessary to run it, as also documented by the upstream packaging guide:

https://gitlab.gnome.org/GNOME/pygobject/blob/master/docs/packagingguide.rst

Remove it from RDEPENDS to shrink the runtime dependency chain, as setuptools includes scripts to download other packages, which might not be desired on a minimal image.

---
v2: use -native suffix as requested during the code review
v3: do not add setuptools to DEPENDS - it is optional and it builds without it
v4: fix commit message to reflect latest changes

 meta/recipes-devtools/python/python3-pygobject_3.32.2.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/python/python3-pygobject_3.32.2.bb +0 -2
index 05688be603..453fdac2c8 100644
@@ -27,7 +27,5 @@ PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wa
 # we don't link against python3-pycairo -> RDEPENDS
 PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo"
 
-RDEPENDS_${PN} += "python3-setuptools"
-
 BBCLASSEXTEND = "native"
 PACKAGECONFIG_class-native = ""
Signature · 1 line
2.20.1