Skip to content

Commit 61334d2

Browse files
Copilotinducer
andauthored
Replace pkg_resources with importlib.resources (#65)
* Initial plan * Replace pkg_resources with importlib.resources Co-authored-by: inducer <352067+inducer@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: inducer <352067+inducer@users.noreply.github.com>
1 parent 1190597 commit 61334d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

codepy/libraries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ def get_numpy_incpath() -> str:
185185

186186
def add_py_module(toolchain: Toolchain, name: str) -> None:
187187
def get_module_include_path(name: str) -> str:
188-
from pkg_resources import Requirement, resource_filename
189-
return resource_filename(Requirement.parse(name), f"{name}/include")
188+
from importlib.resources import files
189+
return str(files(name) / "include")
190190

191191
toolchain.add_library(name, [get_module_include_path(name)], [], [])
192192

0 commit comments

Comments
 (0)