Skip to content

Commit

Permalink
Add dunamai support for if version is not set by build system
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewcarbone committed Feb 15, 2024
1 parent e6b1a51 commit 73bedce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gpax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@
# build.
__version__ = ... # semantic-version-placeholder
# DO NOT CHANGE ABOVE ---------------------------------------------------------

# Useful for local development
if __version__ == ...:
try:
from dunamai import Version
version = Version.from_any_vcs()
__version__ = version.serialize()
except ImportError:
print("You are running a local copy of gpax (not installed via pip)")
print("__version__ = ...; pip install dunamai to track local version")
pass

0 comments on commit 73bedce

Please sign in to comment.