Skip to content

Commit

Permalink
Use importlib.metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
emlowe committed Mar 6, 2024
1 parent 55a8de6 commit 0bf7fd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
dependencies = [
"clvm>=0.9.2",
"clvm_tools_rs>=0.1.37",
"importlib_metadata~=6.11.0",
"setuptools",
]

Expand Down
8 changes: 3 additions & 5 deletions tests/cmds_test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import importlib
import io
import os
import pkg_resources
import shlex
import sys
import unittest


# If the REPAIR environment variable is set, any tests failing due to
# wrong output will be corrected. Be sure to do a "git diff" to validate that
# you're getting changes you expect.
Expand Down Expand Up @@ -57,9 +56,8 @@ def invoke_tool(self, cmd_line):
sys.stderr = stderr_buffer

args = shlex.split(cmd_line)
v = pkg_resources.load_entry_point("clvm_tools", "console_scripts", args[0])(
args
)
[entry_point] = importlib.metadata.entry_points(group="console_scripts", name=args[0])
v = entry_point.load()(args)

sys.stdout = old_stdout
sys.stderr = old_stderr
Expand Down

0 comments on commit 0bf7fd3

Please sign in to comment.