Skip to content

Commit

Permalink
__init__.py: Dynamically read version from package metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Nov 12, 2023
1 parent 772b9ee commit 060a535
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mesa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Core Objects: Model, and Agent.
"""
import datetime
import importlib.metadata

import mesa.space as space
import mesa.time as time
Expand All @@ -25,7 +26,7 @@
]

__title__ = "mesa"
__version__ = "2.1.4"
__version__ = importlib.metadata.version("mesa")
__license__ = "Apache 2.0"
_this_year = datetime.datetime.now(tz=datetime.timezone.utc).date().year
__copyright__ = f"Copyright {_this_year} Project Mesa Team"

0 comments on commit 060a535

Please sign in to comment.