Skip to content

Commit

Permalink
Add a __version__ attribute to the top-level package
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhelba committed Dec 13, 2020
1 parent c81a7bb commit 6a36cbf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions composed_configuration/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from importlib.metadata import PackageNotFoundError, version

from ._allauth import AllauthMixin
from ._base import ComposedConfiguration, ConfigMixin
from ._celery import CeleryMixin
Expand Down Expand Up @@ -47,3 +49,9 @@
'TestingBaseConfiguration',
'WhitenoiseStaticFileMixin',
]

try:
__version__ = version('django-composed-configuration')
except PackageNotFoundError:
# package is not installed
pass

0 comments on commit 6a36cbf

Please sign in to comment.