]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Use resource_path() to access files in our own module 3420/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 23 Jan 2025 20:19:38 +0000 (21:19 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 24 Jan 2025 08:26:38 +0000 (09:26 +0100)
commit7727b2a8046ba5acbc8ff3cf0a83d35b8c37b438
tree6f764a97bc1e3937546c5423ecc258e6a77b2202
parent09c8d0a5e043db34b46243f14745e949ab957d84
Use resource_path() to access files in our own module

__file__ doesn't work if mkosi is packaged up as a zipapp, let's
use resource_path() which is specifically intended to solve this
problem and works regardless of whether we're in a zipapp or not.
mkosi/__init__.py
mkosi/run.py