diff mbox series

python3-setuptools: drop python3-2to3 from RDEPENDS

Message ID 20240619170307.4351-1-gudni.m.g@gmail.com
State Accepted, archived
Commit be952c7b370b064673331e40b4dc0836c9c0b153
Headers show
Series python3-setuptools: drop python3-2to3 from RDEPENDS | expand

Commit Message

Guðni Már Gilbert June 19, 2024, 5:03 p.m. UTC
2to3 module was dropped as a dependency in setuptools 58.0

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
---
 meta/recipes-devtools/python/python3-setuptools_69.5.1.bb | 1 -
 1 file changed, 1 deletion(-)

Comments

Guðni Már Gilbert June 19, 2024, 5:06 p.m. UTC | #1
Noticed this when trying to optimize my minimal image. I would love to see this in Scarthgap as well if the patch is accepted.

This change saves ~600KiB according to buildhistory output (given no other recipe is asking for python3-2to3).
Ross Burton June 20, 2024, 9:57 a.m. UTC | #2
> On 19 Jun 2024, at 18:06, Guðni Már Gilbert via lists.openembedded.org <gudnimar=noxmedical.com@lists.openembedded.org> wrote:
> 
> Noticed this when trying to optimize my minimal image. I would love to see this in Scarthgap as well if the patch is accepted.
> 
> This change saves ~600KiB according to buildhistory output (given no other recipe is asking for python3-2to3).

That does beg the question of why setuptools was part of a minimal image in the first place? Was that a requirement of yours, or is something pulling setuptools into all images?

Ross
Guðni Már Gilbert June 20, 2024, 11:19 a.m. UTC | #3
On Thu, Jun 20, 2024 at 09:57 AM, Ross Burton wrote:

> 
> That does beg the question of why setuptools was part of a minimal image
> in the first place? Was that a requirement of yours, or is something
> pulling setuptools into all images?
> 
> Ross

Hi Ross,

My minimal image requires gobject-introspection which for some reason is requiring setuptools at runtime. This was not a requirement in Kirkstone, and only appeared when I migrated my project to Scarthgap.

See: https://git.openembedded.org/openembedded-core/tree/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb?h=scarthgap#n192

I haven't looked into if this is correct or what part of gobject-introspection requires setuptools at runtime. On Kirkstone, my image ran fine without both distutils and setuptools at runtime.
Guðni Már Gilbert June 20, 2024, 11:30 a.m. UTC | #4
To add to this topic, I found https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/395

I wonder if setuptools is a build-time dependency only.
Ross Burton June 20, 2024, 12:46 p.m. UTC | #5
> On 20 Jun 2024, at 12:30, Guðni Már Gilbert via lists.openembedded.org <gudnimar=noxmedical.com@lists.openembedded.org> wrote:
> 
> To add to this topic, I found https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/395
> 
> I wonder if setuptools is a build-time dependency only. 

Yes, quite possibly.

Ross
Alexander Kanavin June 21, 2024, 7:47 a.m. UTC | #6
On Thu, 20 Jun 2024 at 14:47, Ross Burton via lists.openembedded.org
<ross.burton=arm.com@lists.openembedded.org> wrote:
> > On 20 Jun 2024, at 12:30, Guðni Már Gilbert via lists.openembedded.org <gudnimar=noxmedical.com@lists.openembedded.org> wrote:
> >
> > To add to this topic, I found https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/395
> >
> > I wonder if setuptools is a build-time dependency only.
>
> Yes, quite possibly.

I think the real issue is that we place *.typelib data,
libgirepository library and g-i tools into the same target package.
The tools are what requires setuptools, but almost everyone would not
need them on the target. No idea why this wasn't raised or noticed
until now.

I guess the tools could be split into ${PN}-tools?

Alex
Guðni Már Gilbert June 21, 2024, 11:14 a.m. UTC | #7
Creating a ${PN}-tools package sounds reasonable to me.
Ross Burton June 24, 2024, 10:58 a.m. UTC | #8
On 21 Jun 2024, at 12:14, Guðni Már Gilbert via lists.openembedded.org <gudnimar=noxmedical.com@lists.openembedded.org> wrote:
> 
> Creating a ${PN}-tools package sounds reasonable to me. 

As you’ve a vested interest here, will you be able to produce a patch?

Thanks,
Ross
Guðni Már Gilbert June 24, 2024, 1:15 p.m. UTC | #9
On Mon, Jun 24, 2024 at 10:59 AM, Ross Burton wrote:

> 
> As you’ve a vested interest here, will you be able to produce a patch?

I can try, it's not very high priority for me but should be doable within 2 weeks given I don't see any unexpected problems :) In my mind adding tools to PACKAGES and creating FILES:${PN}-tools should do the trick (And perhaps a separate RDEPENDS for tools package).
Guðni Már Gilbert June 27, 2024, 8:17 a.m. UTC | #10
I don’t mean to push but will this patch be accepted? It will be required anyway once Python 3.13 is released. The 2to3 module will be removed from the standard library in Python 3.13.
Alexander Kanavin June 27, 2024, 8:22 a.m. UTC | #11
Normally I'd say there's no need to worry and it's in a staging
branch, but I don't see it there this time:
https://git.yoctoproject.org/poky/log/?h=master-next
https://git.yoctoproject.org/poky-contrib/log/?h=abelloni/master-next

Alex

On Thu, 27 Jun 2024 at 10:17, Guðni Már Gilbert via
lists.openembedded.org
<gudnimar=noxmedical.com@lists.openembedded.org> wrote:
>
> I don’t mean to push but will this patch be accepted? It will be required anyway once Python 3.13 is released. The 2to3 module will be removed from the standard library in Python 3.13.
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#201194): https://lists.openembedded.org/g/openembedded-core/message/201194
> Mute This Topic: https://lists.openembedded.org/mt/106764629/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-setuptools_69.5.1.bb b/meta/recipes-devtools/python/python3-setuptools_69.5.1.bb
index 8261b09d16..cc6256db80 100644
--- a/meta/recipes-devtools/python/python3-setuptools_69.5.1.bb
+++ b/meta/recipes-devtools/python/python3-setuptools_69.5.1.bb
@@ -16,7 +16,6 @@  SRC_URI[sha256sum] = "6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611
 DEPENDS += "python3"
 
 RDEPENDS:${PN} = "\
-    python3-2to3 \
     python3-compile \
     python3-compression \
     python3-ctypes \