Commit e7b68f2b authored by Hanno Schlichting's avatar Hanno Schlichting

Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API...

Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API instead. Based on a patch from ronaldoussoren. This closes #5.

--HG--
branch : distribute
extra : rebase_source : a608bd596af3fab7caaed024b5699341ba8d9a5a
parent a239dfea
......@@ -29,6 +29,10 @@ setuptools
pkg_resources
-------------
* Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API
instead. Based on a patch from ronaldoussoren. This closes
http://bitbucket.org/tarek/distribute/issue/5.
* Fixed a SandboxViolation for mkdir that could occur in certain cases.
This closes http://bitbucket.org/tarek/distribute/issue/13.
......
......@@ -166,14 +166,9 @@ def get_provider(moduleOrReq):
def _macosx_vers(_cache=[]):
if not _cache:
info = os.popen('/usr/bin/sw_vers').read().splitlines()
for line in info:
key, value = line.split(None, 1)
if key == 'ProductVersion:':
_cache.append(value.strip().split("."))
break
else:
raise ValueError, "What?!"
import platform
version = platform.mac_ver()[0]
_cache.append(version.split('.'))
return _cache[0]
def _macosx_arch(machine):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment