aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/py34compat.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-10-28 21:52:40 -0400
committerJason R. Coombs <jaraco@jaraco.com>2019-10-28 21:52:40 -0400
commit3a0520b43dfac9f6ba507c6d09a60290219a0802 (patch)
tree1554961d791f0ccae876eec933ff6e678254016a /setuptools/py34compat.py
parent2f4952927e41643100e6e6f58124f34331c14add (diff)
downloadexternal_python_setuptools-3a0520b43dfac9f6ba507c6d09a60290219a0802.tar.gz
external_python_setuptools-3a0520b43dfac9f6ba507c6d09a60290219a0802.tar.bz2
external_python_setuptools-3a0520b43dfac9f6ba507c6d09a60290219a0802.zip
Extract compatibility function into compatibility module.
Diffstat (limited to 'setuptools/py34compat.py')
-rw-r--r--setuptools/py34compat.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/setuptools/py34compat.py b/setuptools/py34compat.py
new file mode 100644
index 00000000..bc7eefa9
--- /dev/null
+++ b/setuptools/py34compat.py
@@ -0,0 +1,8 @@
+import importlib.util
+
+
+try:
+ module_from_spec = importlib.util.module_from_spec
+except AttributeError:
+ def module_from_spec(spec):
+ return spec.loader.load_module(spec.name)