]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Fix importlib usage
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 5 Jan 2024 08:23:55 +0000 (09:23 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 5 Jan 2024 11:45:21 +0000 (12:45 +0100)
commitbb1bf18f2e3ce6c1920e0d9953eeabb751deebf6
tree2fa72b716050485d08a7dcca38b3f04c24b20f7e
parent36c63f3cd9de9196d57bc09ecfe2af8659eafd50
Fix importlib usage
We have to use as_file() on the final path, not the module path.

Because as_file() only learned to support directories in python 3.12,
we backport the 3.12 implementation temporarily in mkosi itself.

Because as_file() does not apply the executable bit, we apply it
ourselves after parsing the config. This requires delaying the check
if scripts are executable to some later point so we can parse the
config without failing because scripts are not executable.

This fixes mkosi zipapps.
.github/workflows/ci.yml
mkosi/__init__.py
mkosi/config.py
mkosi/util.py