From 2bfd65de3d45ac250968196f3dd3173f01d096ef Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 10 Jun 2024 13:36:32 -0500 Subject: [PATCH] fix: use `importlib-metadata` backport for older systems --- pyproject.toml | 1 + src/wuttjamaican/_version.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a0fb57..255beaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ ] requires-python = ">= 3.6" dependencies = [ + 'importlib-metadata; python_version < "3.10"', "python-configuration", ] diff --git a/src/wuttjamaican/_version.py b/src/wuttjamaican/_version.py index 9cd05c1..7c2ff3b 100644 --- a/src/wuttjamaican/_version.py +++ b/src/wuttjamaican/_version.py @@ -1,6 +1,9 @@ # -*- coding: utf-8; -*- -from importlib.metadata import version +try: + from importlib.metadata import version +except ImportError: + from importlib_metadata import version __version__ = version('WuttJamaican')