diff options
Diffstat (limited to 'pkg_resources.py')
-rw-r--r-- | pkg_resources.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 3660a2a5..f31789e9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -207,7 +207,11 @@ def get_build_platform(): XXX Currently this is the same as ``distutils.util.get_platform()``, but it needs some hacks for Linux and Mac OS X. """ - from distutils.util import get_platform + try: + from distutils.util import get_platform + except ImportError: + from sysconfig import get_platform + plat = get_platform() if sys.platform == "darwin" and not plat.startswith('macosx-'): try: |