speccpu/x264: fix importlib deprecation warning

This commit is contained in:
2025-04-23 11:16:18 +08:00
parent 819f08fb8d
commit 498667ba5f

View File

@@ -13,7 +13,7 @@ class MCBuilder:
@staticmethod
def get_src():
assert __package__ is not None
with importlib.resources.open_text(__package__, "mc.c") as f:
with (importlib.resources.files(__package__) / "mc.c").open("r") as f:
mc_src = f.read()
return mc_src