[Buildroot] [PATCH v2] package/python-diskcache: new package
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Tue Oct 21 11:41:03 UTC 2025
On Tue, 21 Oct 2025 13:31:14 +0200
Marcus Hoffmann <buildroot at bubu1.eu> wrote:
> This was, unfortunately, a very common pattern in setup.py builds but
> it's going away with projects switching to declarative build definitions
> via pyproject.toml. (Which diskcache hasn't done yet, but I assume will
> do eventually, maintenance is a bit slow currently). setup.py is just a
> python script and python allows importing modules from $CWD, even if
> they are not installed. That's how that works in general.
>
> Now I was confused why past me claimed that the same doesn't work inside
> the buildroot build and the reason for that is that host-python3 doesn't
> build with sqlite support, so the diskcache import (at build-time) fails.
>
> Perhaps a less hacky, but also more wasteful, approach to solving this
> is enforcing host-python sqlite support is built when diskcache is
> selected. I just tested that and it works, unsure what approach to chose
> now. WDYT?
Sounds "meh" to me, because important diskcache during the build is
actually... useless, it's just used to retrieve the version number,
which certainly could be done another way. Having to build host-sqlite,
and sqlite support in host-python just for the sake of doing this seems
really wasteful, and is generally not a approach that would work well:
imagine something more complex than diskcache, that has more
dependencies. It means we would have not only to package these
dependencies for the target, but also for the host, just for the sake
of being able to retrieve <foo>.version? Seems not very efficient to me.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
More information about the buildroot
mailing list