Skip to content

Commit

Permalink
Derive version from importlib (#697)
Browse files Browse the repository at this point in the history
This removes the dependency on setuptools, which is no longer
automatically installed in virtual environments starting in Python 3.12.
  • Loading branch information
robinchow authored Jan 15, 2024
1 parent 5439591 commit 001b5d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions silk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import version

try:
__version__ = get_distribution("django-silk").version
except DistributionNotFound:
pass
__version__ = version("django-silk")

0 comments on commit 001b5d5

Please sign in to comment.