diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-09-09 12:39:43 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-09-09 12:39:43 -0400 |
| commit | b6f2fee975c570d2beadb9007e6302411f91ab4b (patch) | |
| tree | 775b9637580605b4b6d7b647f035fb1d8d0bec41 /setuptools/py26compat.py | |
| parent | 5cc0ec25c0ef816de01b7416aa6bef172f91566d (diff) | |
| download | python-setuptools-git-b6f2fee975c570d2beadb9007e6302411f91ab4b.tar.gz | |
Consolidate function patching and resolution of unpatched function, aligning pattern with the patched classes.
Diffstat (limited to 'setuptools/py26compat.py')
| -rw-r--r-- | setuptools/py26compat.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 90cd695a..5778cdf1 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -22,3 +22,10 @@ def strip_fragment(url): if sys.version_info >= (2, 7): strip_fragment = lambda x: x + + +try: + from importlib import import_module +except ImportError: + def import_module(module_name): + return __import__(module_name, fromlist=['__name__']) |
