diff options
| author | tarek <none@none> | 2010-01-24 23:17:23 +0100 |
|---|---|---|
| committer | tarek <none@none> | 2010-01-24 23:17:23 +0100 |
| commit | 5c528f51ae4ce4dd5359c350af9f0b3cacee36ba (patch) | |
| tree | ecd4a234e53c6ac67a177bd4ddaeb822641c9cfe /pkg_resources.py | |
| parent | 8b3effb4f5fc0ee84fdf1e36d8bb7d8a17f1258d (diff) | |
| download | python-setuptools-git-5c528f51ae4ce4dd5359c350af9f0b3cacee36ba.tar.gz | |
Python 2.7 compat
--HG--
branch : distribute
extra : rebase_source : f60f3110e0dd27c406f8fc48c4ed49da4dec8cac
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: |
