Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Looking for a solution to the distutils/setuptools .egg-info mess
Date: Tue, 11 Jan 2022 01:19:38
Message-Id: CAJ0EP42Z2=ykf3QWp+qJc_EQfZhSsugchafFhxZBLF_iGBYzLQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] Looking for a solution to the distutils/setuptools .egg-info mess by "Michał Górny"
1 On Mon, Jan 10, 2022 at 9:43 AM Michał Górny <mgorny@g.o> wrote:
2 >
3 > On Mon, 2022-01-10 at 06:39 +0100, Michał Górny wrote:
4 > > 4. We could have the eclasses switch to "local" model and rename
5 > > the .egg-info files somehow at some point. The main question is "rename
6 > > how?"
7 > >
8 >
9 > If anyone's interested, I've published a proof-of-concept for this:
10 >
11 > https://github.com/gentoo/gentoo/pull/23721
12 >
13 > Long story short, the eclass detects if vendored distutils are being
14 > used and renames the directories from .egg-info to .g.egg-info then.
15 > This basically means the tag changes from e.g. "py3.8" to "py3.8.g".
16 > I'm testing this approach now and it doesn't seem to break anything.
17
18 A possible alternative would be to define pkg_preinst in the eclass
19 and have it move the .egg-info file out of the way before portage
20 tries to replace it with a directory. That would be a significant API
21 change for distutils-r1 though.

Replies