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