Skip to content

Commit

Permalink
get version from pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeliza committed Dec 20, 2024
1 parent 96173d9 commit 205b0f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion nbank/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
Copyright (C) 2013--2024 Dan Meliza <[email protected]>
"""
__version__ = "0.10.10"
try:
from importlib.metadata import version
__version__ = version("neurobank")
except Exception:
# If package is not installed (e.g. during development)
__version__ = "unknown"



# Variables:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "neurobank"
dynamic = ["version"]
version = "0.10.10"
description = "Simple data management system for neuroscience"
readme = "README.rst"
license = {text = "BSD 3-Clause License"}
Expand Down

0 comments on commit 205b0f7

Please sign in to comment.