diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-04-26 20:07:23 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-04-26 20:07:23 -0400 |
commit | 826fc6620a5a978fcf6fa0fe2244a38597bd81b7 (patch) | |
tree | 7e4844a998bb9725de3b3c3f32b766e9ba2d707f /pkg_resources | |
parent | e741ada4fe51cfe1b06abbf95918ca927698cb39 (diff) | |
download | python-setuptools-bitbucket-826fc6620a5a978fcf6fa0fe2244a38597bd81b7.tar.gz |
Restore compatibility for Python 3.2 and earlier.
Diffstat (limited to 'pkg_resources')
-rw-r--r-- | pkg_resources/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 51c2bb00..79384174 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -21,7 +21,6 @@ import os import io import time import re -import _imp import types import zipfile import zipimport @@ -40,6 +39,12 @@ import tempfile import textwrap from pkgutil import get_importer +try: + import _imp +except ImportError: + # Python 3.2 compatibility + import imp as _imp + PY3 = sys.version_info > (3,) PY2 = not PY3 |