Skip to content

Commit

Permalink
update show versions
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonk committed Nov 6, 2024
1 parent f6fa1de commit c08a2df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/spei/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@


def show_versions() -> str:
msg = f"Versions\npython: {python_version()}\nspei: {__version__}\n"
msg = f"python: {python_version()}\nspei: {__version__}\n"

requirements = metadata.requires("spei")
if requirements:
deps = [x for x in requirements if "extra" not in x]
for dep in deps:
msg += f"{dep}: {metadata.version(dep)}\n"
msg += f"{dep}: {metadata.version(dep)}"
msg += "\n" if deps.index(dep) < len(deps) - 1 else ""

return msg

0 comments on commit c08a2df

Please sign in to comment.