From 03c091b2023103a15c681e65ca5c0b0420bf2b99 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 19:46:51 +0000 Subject: [PATCH 1/2] Initial plan From 3c2a8390f36bc58b4fa09d38e6dd8b9d2a86ed8e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 19:49:25 +0000 Subject: [PATCH 2/2] Replace pkg_resources with importlib.resources Co-authored-by: inducer <352067+inducer@users.noreply.github.com> --- codepy/libraries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)], [], [])