package/python-diskcache: new package

The package imports itself in setup.py to get the package-name and
version number. Dping this during the buildroot build would require
buisling host-python with sqlite support, which we are currently not set
up for. It also seems wasteful for just extracting the version number
and package name, so instead we replace the import by using a hardcoded
package-name and the version number stored in buildroot.

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Marcus Hoffmann
2025-10-21 14:05:47 +02:00
committed by Thomas Petazzoni
parent 1a6e81fa13
commit 934d3e62e6
7 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
from diskcache import Cache
cache = Cache()
cache['test'] = 123
assert cache['test'] == 123
del cache['test']
assert 'test' not in cache
cache.close()