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 35 36 37 38
|
--- a/dijitso/__init__.py
+++ b/dijitso/__init__.py
@@ -16,13 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with DIJITSO. If not, see <http://www.gnu.org/licenses/>.
-from pkg_resources import get_distribution
+import importlib.metadata
"""This is dijitso -- a lightweight distributed just-in-time shared
library builder."""
__author__ = "Martin Sandve Alnæs"
-__version__ = get_distribution('fenics-dijitso').version
+__version__ = importlib.metadata.version('fenics-dijitso')
__all__ = ["validate_params", "jit", "extract_factory_function",
"set_log_level"]
--- a/doc/sphinx/source/conf.py
+++ b/doc/sphinx/source/conf.py
@@ -17,7 +17,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
-import pkg_resources
+import importlib.metadata
import datetime
# import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -59,7 +59,7 @@
this_year = datetime.date.today().year
copyright = u'%s, FEniCS Project' % this_year
author = u'FEniCS Project'
-version = pkg_resources.get_distribution("fenics-dijitso").version
+version = importlib.metadata.version('fenics-dijitso')
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
|