1
0
Files
python-helpdev/python38.patch
Tomáš Chvátal 9d841b1982 - Switch to github tarball to get tests and license
- Run the tests

- Format with spec cleaner
- Add patch to work with python 3.8:
  * python38.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-helpdev?expand=0&rev=2
2020-01-28 08:42:10 +00:00

18 lines
484 B
Diff

diff --git a/helpdev/__init__.py b/helpdev/__init__.py
index ca739c8ee30e8899a33ef98a60a59d458b376261..41bf220cf890fae1eb1aae557c75e8d404dd9a13 100644
--- a/helpdev/__init__.py
+++ b/helpdev/__init__.py
@@ -26,7 +26,11 @@ import sys
import time
import warnings
-import importlib_metadata
+try:
+ import importlib.metadata as importlib_metadata
+except ImportError:
+ # python < 3.8
+ import importlib_metadata
if sys.version_info >= (3, 4):
import importlib.util