Skip to content

Commit

Permalink
fix: Improve xml2rfc version information logic (ietf-tools#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara authored Jan 17, 2024
1 parent 007abf6 commit 9c47d64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xml2rfc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def get_versions():
versions = []
try:
from importlib import metadata
from re import split
this = metadata.distribution(NAME)
for p in [x.split()[0] for x in this.requires]:
for p in [split(r'[\s=<>!]', x)[0] for x in this.requires]:
try:
dist = metadata.distribution(p)
versions.append((dist.metadata['name'], dist.metadata['version']))
Expand Down

0 comments on commit 9c47d64

Please sign in to comment.