Skip to content

Commit

Permalink
Use importlib to find package version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdewar committed May 28, 2024
1 parent da25d1e commit fb2f488
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion myproject/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""The main module for MyProject."""

__version__ = "0.1.0"
from importlib.metadata import version

__version__ = version(__name__)

0 comments on commit fb2f488

Please sign in to comment.