1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
--- a/doc/sphinx/source/conf.py
+++ b/doc/sphinx/source/conf.py
@@ -15,7 +15,7 @@
import sys
import os
import shlex
-import pkg_resources
+import importlib.metadata
import datetime
# If extensions (or modules to document with autodoc) are in another directory,
@@ -60,7 +60,7 @@
this_year = datetime.date.today().year
copyright = u'%s, FEniCS Project' % this_year
author = u'FEniCS Project'
-version = pkg_resources.get_distribution("fenics-ffc").version
+version = importlib.metadata.version("fenics-ffc")
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
--- a/ffc/__init__.py
+++ b/ffc/__init__.py
@@ -14,9 +14,9 @@
ufc_signature - Signature of UFC interface (SHA-1 hash of ufc.h)
"""
-import pkg_resources
+import importlib.metadata
-__version__ = pkg_resources.get_distribution("fenics-ffc").version
+__version__ = importlib.metadata.version("fenics-ffc")
from ffc.git_commit_hash import git_commit_hash
|