diff --git a/codepy/libraries.py b/codepy/libraries.py index 35b3ede..cdc5032 100644 --- a/codepy/libraries.py +++ b/codepy/libraries.py @@ -185,8 +185,8 @@ def get_numpy_incpath() -> str: def add_py_module(toolchain: Toolchain, name: str) -> None: def get_module_include_path(name: str) -> str: - from pkg_resources import Requirement, resource_filename - return resource_filename(Requirement.parse(name), f"{name}/include") + from importlib.resources import files + return str(files(name) / "include") toolchain.add_library(name, [get_module_include_path(name)], [], [])