diff options
| author | PJ Eby <distutils-sig@python.org> | 2006-02-04 00:03:25 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2006-02-04 00:03:25 +0000 |
| commit | 41e25d5f6f4da0c7b7afe13baab1ec8a16949fdb (patch) | |
| tree | 297bae87e1bdb6c825ffe908628e44d3719b5a7f /pkg_resources.py | |
| parent | cc46483ce7dc8a2d88bb8cbc670b172cf09de9e5 (diff) | |
| download | python-setuptools-git-41e25d5f6f4da0c7b7afe13baab1ec8a16949fdb.tar.gz | |
Honor get_platform() for Mac OS X if it starts with 'macosx-'
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042231
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index d31a65fa..50e68ecc 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -142,7 +142,9 @@ def get_platform(): XXX Currently this is the same as ``distutils.util.get_platform()``, but it needs some hacks for Linux and Mac OS X. """ - if sys.platform == "darwin": + from distutils.util import get_platform + plat = get_platform() + if sys.platform == "darwin" and not plat.startswith('macosx-'): try: version = _macosx_vers() machine = os.uname()[4].replace(" ", "_") @@ -152,9 +154,7 @@ def get_platform(): # if someone is running a non-Mac darwin system, this will fall # through to the default implementation pass - - from distutils.util import get_platform - return get_platform() + return plat macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") |
