Skip to content

Commit 4f8b962

Browse files
authored
Replace pkg_resources with importlib.metadata for version
1 parent 69e630f commit 4f8b962

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pylib/gyp/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ def gyp_main(args):
491491

492492
options, build_files_arg = parser.parse_args(args)
493493
if options.version:
494-
import pkg_resources # noqa: PLC0415
494+
from importlib.metadata import version
495495

496-
print(f"v{pkg_resources.get_distribution('gyp-next').version}")
496+
print(f"v{version('gyp-next')")
497497
return 0
498498
build_files = build_files_arg
499499

0 commit comments

Comments
 (0)